Skip to content

Commit

Permalink
v0.2.0
Browse files Browse the repository at this point in the history
Added Decimal CheckBox
Added Sum CheckBox
Changed Row Generation
Changed Font Size Update
  • Loading branch information
MattMcManis committed Jul 23, 2018
1 parent 003013e commit e7ab76b
Show file tree
Hide file tree
Showing 8 changed files with 362 additions and 50 deletions.
Binary file added examples/example-01.txt
Binary file not shown.
Binary file added examples/example-02.txt
Binary file not shown.
Binary file added examples/example-03.txt
Binary file not shown.
Binary file added examples/example-04.txt
Binary file not shown.
76 changes: 52 additions & 24 deletions source/Triangulum/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program.If not, see<http://www.gnu.org/licenses/> .
-->

<Window x:Class="Triangulum.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Expand All @@ -36,10 +36,10 @@

RenderOptions.BitmapScalingMode="Fant"
UseLayoutRounding="True"
Height="494"
MinHeight="494"
Width="850"
MinWidth="850"
Height="615"
MinHeight="615"
Width="960"
MinWidth="960"
>

<Window.Background>
Expand All @@ -53,6 +53,7 @@
<Grid>

<!-- Display -->
<!--FontSize="{Binding Value, ElementName=slFontSize, UpdateSourceTrigger=PropertyChanged}"-->
<TextBox x:Name="tbxDisplay"
FontFamily="{DynamicResource RobotoMono}"
Text="{Binding Display_Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Expand All @@ -61,7 +62,7 @@
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
TextWrapping="{Binding Wrap_Text}"
FontSize="{Binding Value, ElementName=slFontSize, UpdateSourceTrigger=PropertyChanged}"
FontSize="{Binding Display_FontSize}"
Foreground="White"
Background="Black"
IsReadOnly="True"
Expand All @@ -74,19 +75,44 @@
</TextBox.Resources>
</TextBox>

<!-- Sum -->
<CheckBox x:Name="cbxSum"
IsChecked="{Binding Sum_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Content="Sum"
Margin="0,0,257,18"
Height="15"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="52"
Checked="cbxSum_Checked"
Unchecked="cbxSum_Unchecked"/>

<!-- Decimal -->
<CheckBox x:Name="cbxDecimal"
IsChecked="{Binding Decimal_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
IsEnabled="{Binding Decimal_IsEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Content="Decimal"
Margin="0,0,319,18"
Height="15"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="66" Checked="cbxDecimal_Checked" />

<!-- Center -->
<CheckBox x:Name="cbxCenter"
IsChecked="{Binding Center_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Content="Center"
Margin="0,0,525,18"
Margin="0,0,641,18"
Height="15"
VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="70" />
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="64" Checked="cbxCenter_Checked" />

<!-- Display Wrap -->
<CheckBox x:Name="cbxWrap"
IsChecked="{Binding Wrap_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Content="Wrap"
Margin="0,0,475,18"
Margin="0,0,523,18"
Height="15"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Expand Down Expand Up @@ -153,27 +179,28 @@
<!-- Font Size -->
<Label Content="Size"
HorizontalAlignment="Left"
Margin="98,0,0,11"
Width="37"
Margin="100,0,0,11"
Width="32"
Height="28"
VerticalAlignment="Bottom"/>
<Slider x:Name="slFontSize"
HorizontalAlignment="Left"
Margin="132,0,0,16"
Width="65"
Width="60"
IsMoveToPointEnabled="True"
Minimum="1"
Maximum="16"
Value="10"
Maximum="18"
Value="12"
IsSnapToTickEnabled="True"
TickFrequency="1"
PreviewMouseUp="slFontSize_PreviewMouseUp"
MouseDoubleClick="slFontSize_MouseDoubleClick"
Height="18"
VerticalAlignment="Bottom"/>
<TextBox x:Name="tbxFontSize"
Text="{Binding Value, ElementName=slFontSize, UpdateSourceTrigger=PropertyChanged}"
TextWrapping="Wrap"
Margin="202,0,0,14"
Margin="197,0,0,14"
Padding="2,0,2,0"
HorizontalAlignment="Left"
Width="30"
Expand All @@ -184,17 +211,17 @@
<CheckBox x:Name="cbxInline"
IsChecked="{Binding Inline_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Content="Inline"
Margin="0,0,412,18"
Margin="0,0,586,18"
Height="15"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="50"/>
Width="50" Checked="cbxInline_Checked"/>

<!-- ASCII -->
<CheckBox x:Name="cbxASCII"
IsChecked="{Binding ASCII_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Content="ASCII"
Margin="0,0,350,18"
Margin="0,0,206,18"
Height="15"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Expand All @@ -205,7 +232,7 @@
<CheckBox x:Name="cbxBinary"
IsChecked="{Binding Binary_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Content="Binary"
Margin="0,0,283,18"
Margin="0,0,455,18"
Height="15"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Expand All @@ -217,7 +244,7 @@
<CheckBox x:Name="cbx0"
IsChecked="{Binding Binary0_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Content="0"
Margin="0,0,256,18"
Margin="0,0,428,18"
Height="15"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Expand All @@ -227,15 +254,15 @@
<CheckBox x:Name="cbx1"
Content="1"
IsChecked="{Binding Binary1_IsChecked, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Margin="0,0,225,18"
Margin="0,0,397,18"
HorizontalAlignment="Right"
Width="26"
Height="15"
VerticalAlignment="Bottom" Checked="cbx1_Checked"/>

<!-- Rows -->
<Label Content="Rows"
Margin="0,0,171,11"
Margin="0,0,161,11"
Height="28"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Expand All @@ -248,7 +275,7 @@
MaxLines="1"
PreviewKeyDown="tbxRows_PreviewKeyDown"
HorizontalAlignment="Right"
Width="75"
Width="65"
Height="22"
VerticalAlignment="Bottom"/>

Expand All @@ -258,9 +285,10 @@
Cursor="Hand"
Margin="0,0,10,14"
Click="btnGo_Click"
Width="75"
Height="22"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
Width="75" Background="#FFF0F0F0"/>
Background="#FFF0F0F0"/>
</Grid>
</Window>
Loading

0 comments on commit e7ab76b

Please sign in to comment.