Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
smourier committed Oct 11, 2024
1 parent c00c1bf commit 7442839
Show file tree
Hide file tree
Showing 66 changed files with 341,380 additions and 341,380 deletions.
5,550 changes: 2,775 additions & 2,775 deletions Amalgamation/SheetReader.cs

Large diffs are not rendered by default.

25,202 changes: 12,601 additions & 12,601 deletions SheetReader.Test/Financial Sample Array.json

Large diffs are not rendered by default.

25,244 changes: 12,622 additions & 12,622 deletions SheetReader.Test/Financial Sample Columns.json

Large diffs are not rendered by default.

25,202 changes: 12,601 additions & 12,601 deletions SheetReader.Test/Financial Sample Raw.json

Large diffs are not rendered by default.

25,208 changes: 12,604 additions & 12,604 deletions SheetReader.Test/Financial Sample.json

Large diffs are not rendered by default.

Binary file modified SheetReader.Test/Free_Test_Data_1MB_XLSX.xlsx
Binary file not shown.
7,200 changes: 3,600 additions & 3,600 deletions SheetReader.Test/products.json

Large diffs are not rendered by default.

3,600 changes: 1,800 additions & 1,800 deletions SheetReader.Test/products2.json

Large diffs are not rendered by default.

454,152 changes: 227,076 additions & 227,076 deletions SheetReader.Test/test.json

Large diffs are not rendered by default.

100,028 changes: 50,014 additions & 50,014 deletions SheetReader.Test/test2.json

Large diffs are not rendered by default.

56 changes: 28 additions & 28 deletions SheetReader.Wpf.Test/App.xaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<Application
x:Class="SheetReader.Wpf.Test.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

<Style x:Key="ValidationTextBox" TargetType="{x:Type TextBox}">
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<Border
Width="1"
Height="23"
BorderBrush="Red"
BorderThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="true">
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}" />
</Trigger>
</Style.Triggers>
</Style>
</Application.Resources>
</Application>
<Application
x:Class="SheetReader.Wpf.Test.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

<Style x:Key="ValidationTextBox" TargetType="{x:Type TextBox}">
<Setter Property="Validation.ErrorTemplate">
<Setter.Value>
<ControlTemplate>
<Border
Width="1"
Height="23"
BorderBrush="Red"
BorderThickness="1" />
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Validation.HasError" Value="true">
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=(Validation.Errors).CurrentItem.ErrorContent}" />
</Trigger>
</Style.Triggers>
</Style>
</Application.Resources>
</Application>
16 changes: 8 additions & 8 deletions SheetReader.Wpf.Test/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using System.Windows;

namespace SheetReader.Wpf.Test
{
public partial class App : Application
{
}
}
using System.Windows;

namespace SheetReader.Wpf.Test
{
public partial class App : Application
{
}
}
118 changes: 59 additions & 59 deletions SheetReader.Wpf.Test/CsvOptions.xaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
<Window
x:Class="SheetReader.Wpf.Test.CsvOptions"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Csv Options"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner">
<Grid MinWidth="320" MinHeight="110">
<Label
Margin="10,10,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="Write Columns:" />
<CheckBox
Margin="165,16,10,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
IsChecked="{Binding CsvWriteColumns}" />
<Label
Margin="10,40,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="First Row Defines Columns:" />
<CheckBox
Margin="165,46,90,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
IsChecked="{Binding FirstRowDefinesColumns}" />
<Button
Height="23"
Margin="0,0,170,10"
Padding="5,0,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="OnOKOpenClick"
Content="Export And Open" />
<Button
Width="75"
Height="23"
Margin="0,0,90,10"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="OnOKClick"
Content="OK"
IsDefault="True" />
<Button
Width="75"
Height="23"
Margin="0,40,10,10"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="OnCancelClick"
Content="Cancel"
IsCancel="True" />
</Grid>
</Window>
<Window
x:Class="SheetReader.Wpf.Test.CsvOptions"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Csv Options"
ResizeMode="NoResize"
SizeToContent="WidthAndHeight"
WindowStartupLocation="CenterOwner">
<Grid MinWidth="320" MinHeight="110">
<Label
Margin="10,10,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="Write Columns:" />
<CheckBox
Margin="165,16,10,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
IsChecked="{Binding CsvWriteColumns}" />
<Label
Margin="10,40,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Content="First Row Defines Columns:" />
<CheckBox
Margin="165,46,90,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
VerticalContentAlignment="Center"
IsChecked="{Binding FirstRowDefinesColumns}" />
<Button
Height="23"
Margin="0,0,170,10"
Padding="5,0,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="OnOKOpenClick"
Content="Export And Open" />
<Button
Width="75"
Height="23"
Margin="0,0,90,10"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="OnOKClick"
Content="OK"
IsDefault="True" />
<Button
Width="75"
Height="23"
Margin="0,40,10,10"
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Click="OnCancelClick"
Content="Cancel"
IsCancel="True" />
</Grid>
</Window>
158 changes: 79 additions & 79 deletions SheetReader.Wpf.Test/CsvOptions.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Input;

namespace SheetReader.Wpf.Test
{
public partial class CsvOptions : Window, INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;

private bool _firstRowDefinesColumns;
private bool _csvWriteColumns;

public CsvOptions()
{
InitializeComponent();
DataContext = this;

#if DEBUG
CsvWriteColumns = true;
#endif
}

public bool Open { get; set; }

public bool FirstRowDefinesColumns
{
get => _firstRowDefinesColumns;
set
{
if (_firstRowDefinesColumns == value)
return;

_firstRowDefinesColumns = value;
OnPropertyChanged();
}
}

public bool CsvWriteColumns
{
get => _csvWriteColumns;
set
{
if (_csvWriteColumns == value)
return;

_csvWriteColumns = value;
OnPropertyChanged();
}
}

private void OnPropertyChanged([CallerMemberName] string? name = null) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));

protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.Key == Key.Escape)
{
e.Handled = true;
Close();
}
}

private void OnCancelClick(object sender, RoutedEventArgs e) => Close();
private void OnOKClick(object sender, RoutedEventArgs e)
{
DialogResult = true;
Close();
}

private void OnOKOpenClick(object sender, RoutedEventArgs e)
{
Open = true;
DialogResult = true;
Close();
}
}
}
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Input;

namespace SheetReader.Wpf.Test
{
public partial class CsvOptions : Window, INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;

private bool _firstRowDefinesColumns;
private bool _csvWriteColumns;

public CsvOptions()
{
InitializeComponent();
DataContext = this;

#if DEBUG
CsvWriteColumns = true;
#endif
}

public bool Open { get; set; }

public bool FirstRowDefinesColumns
{
get => _firstRowDefinesColumns;
set
{
if (_firstRowDefinesColumns == value)
return;

_firstRowDefinesColumns = value;
OnPropertyChanged();
}
}

public bool CsvWriteColumns
{
get => _csvWriteColumns;
set
{
if (_csvWriteColumns == value)
return;

_csvWriteColumns = value;
OnPropertyChanged();
}
}

private void OnPropertyChanged([CallerMemberName] string? name = null) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));

protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.Key == Key.Escape)
{
e.Handled = true;
Close();
}
}

private void OnCancelClick(object sender, RoutedEventArgs e) => Close();
private void OnOKClick(object sender, RoutedEventArgs e)
{
DialogResult = true;
Close();
}

private void OnOKOpenClick(object sender, RoutedEventArgs e)
{
Open = true;
DialogResult = true;
Close();
}
}
}
Loading

0 comments on commit 7442839

Please sign in to comment.