Layout buttons in the bottom of the progrart editor is now working.
This commit is contained in:
@@ -18,11 +18,19 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition/>
|
<ColumnDefinition/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition/>
|
||||||
|
<RowDefinition Height="Auto"/>
|
||||||
|
<RowDefinition/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
<controls:BaseEditor Name="CodeEditor"/>
|
<controls:BaseEditor Name="CodeEditor"/>
|
||||||
<Grid Grid.Column="1" Name="VerticalSplitterVisualElement">
|
<Grid Grid.Column="1" Grid.RowSpan="3" Name="VerticalSplitterVisualElement">
|
||||||
<Border Width="2" HorizontalAlignment="Center" Background="#4888"></Border>
|
<Border Width="2" HorizontalAlignment="Center" Background="#4888"></Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<GridSplitter Grid.Column="1" Opacity="0.01"/>
|
<Grid Grid.Row="1" Grid.ColumnSpan="3" Name="HorizontalSplitterVisualElement">
|
||||||
|
<Border Height="2" VerticalAlignment="Center" Background="#4888"></Border>
|
||||||
|
</Grid>
|
||||||
|
<GridSplitter Grid.Column="1" Name="Splitter" Grid.RowSpan="3" Opacity="0.01"/>
|
||||||
<Grid Name="PreviewHolder" Grid.Column="2">
|
<Grid Name="PreviewHolder" Grid.Column="2">
|
||||||
<controls:ImageViewer Name="PreviewImage"/>
|
<controls:ImageViewer Name="PreviewImage"/>
|
||||||
<Grid Name="ProgressRing" IsVisible="False">
|
<Grid Name="ProgressRing" IsVisible="False">
|
||||||
@@ -51,20 +59,20 @@
|
|||||||
<Border Margin="16,8,16,0" Background="#2888" BorderBrush="Transparent" BorderThickness="1" CornerRadius="18">
|
<Border Margin="16,8,16,0" Background="#2888" BorderBrush="Transparent" BorderThickness="1" CornerRadius="18">
|
||||||
<ScrollViewer Margin="16,0" HorizontalScrollBarVisibility="Auto">
|
<ScrollViewer Margin="16,0" HorizontalScrollBarVisibility="Auto">
|
||||||
<StackPanel Orientation="Horizontal" Margin="2">
|
<StackPanel Orientation="Horizontal" Margin="2">
|
||||||
<RadioButton GroupName="Layout0">
|
<RadioButton GroupName="Layout0" Name="LayoutButtonV" IsChecked="true" IsCheckedChanged="LayoutButtonV_IsCheckedChanged">
|
||||||
<PathIcon Data="F1 M 2.52 4.799999 C 2.36 4.799999 2.233333 4.846666 2.14 4.940001 C 2.046667 5.033333 2 5.153334 2 5.299999 C 2 5.446667 2.046667 5.566668 2.14 5.66 C 2.233333 5.753334 2.36 5.799999 2.52 5.799999 L 17.52 5.799999 C 17.653332 5.799999 17.766666 5.753334 17.859999 5.66 C 17.953331 5.566668 18 5.446667 18 5.299999 C 18 5.153334 17.953331 5.033333 17.859999 4.940001 C 17.766666 4.846666 17.653332 4.799999 17.52 4.799999 Z M 2.52 17.799999 C 2.36 17.799999 2.233333 17.846666 2.14 17.939999 C 2.046667 18.033333 2 18.153332 2 18.299999 C 2 18.446667 2.046667 18.566666 2.14 18.66 C 2.233333 18.753332 2.36 18.799999 2.52 18.799999 L 17.52 18.799999 C 17.653332 18.799999 17.766666 18.753332 17.859999 18.66 C 17.953331 18.566666 18 18.446667 18 18.299999 C 18 18.153332 17.953331 18.033333 17.859999 17.939999 C 17.766666 17.846666 17.653332 17.799999 17.52 17.799999 Z M 4 14.799999 C 4 15.36 4.193333 15.833333 4.58 16.219999 C 4.966666 16.606667 5.44 16.799999 6 16.799999 L 7 16.799999 C 7.559999 16.799999 8.033333 16.606667 8.42 16.219999 C 8.806666 15.833333 9 15.36 9 14.799999 L 9 8.799999 C 9 8.24 8.806666 7.766666 8.42 7.379999 C 8.033333 6.993334 7.559999 6.8 7 6.799999 L 6 6.799999 C 5.44 6.8 4.966666 6.993334 4.58 7.379999 C 4.193333 7.766666 4 8.24 4 8.799999 Z M 13 16.799999 C 12.439999 16.799999 11.966665 16.606667 11.58 16.219999 C 11.193333 15.833333 11 15.36 11 14.799999 L 11 8.799999 C 11 8.24 11.193333 7.766666 11.58 7.379999 C 11.966665 6.993334 12.439999 6.8 13 6.799999 L 14 6.799999 C 14.559999 6.8 15.033333 6.993334 15.42 7.379999 C 15.806666 7.766666 16 8.24 16 8.799999 L 16 14.799999 C 16 15.36 15.806666 15.833333 15.42 16.219999 C 15.033333 16.606667 14.559999 16.799999 14 16.799999 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
<PathIcon Data="F1 M 2.52 4.799999 C 2.36 4.799999 2.233333 4.846666 2.14 4.940001 C 2.046667 5.033333 2 5.153334 2 5.299999 C 2 5.446667 2.046667 5.566668 2.14 5.66 C 2.233333 5.753334 2.36 5.799999 2.52 5.799999 L 17.52 5.799999 C 17.653332 5.799999 17.766666 5.753334 17.859999 5.66 C 17.953331 5.566668 18 5.446667 18 5.299999 C 18 5.153334 17.953331 5.033333 17.859999 4.940001 C 17.766666 4.846666 17.653332 4.799999 17.52 4.799999 Z M 2.52 17.799999 C 2.36 17.799999 2.233333 17.846666 2.14 17.939999 C 2.046667 18.033333 2 18.153332 2 18.299999 C 2 18.446667 2.046667 18.566666 2.14 18.66 C 2.233333 18.753332 2.36 18.799999 2.52 18.799999 L 17.52 18.799999 C 17.653332 18.799999 17.766666 18.753332 17.859999 18.66 C 17.953331 18.566666 18 18.446667 18 18.299999 C 18 18.153332 17.953331 18.033333 17.859999 17.939999 C 17.766666 17.846666 17.653332 17.799999 17.52 17.799999 Z M 4 14.799999 C 4 15.36 4.193333 15.833333 4.58 16.219999 C 4.966666 16.606667 5.44 16.799999 6 16.799999 L 7 16.799999 C 7.559999 16.799999 8.033333 16.606667 8.42 16.219999 C 8.806666 15.833333 9 15.36 9 14.799999 L 9 8.799999 C 9 8.24 8.806666 7.766666 8.42 7.379999 C 8.033333 6.993334 7.559999 6.8 7 6.799999 L 6 6.799999 C 5.44 6.8 4.966666 6.993334 4.58 7.379999 C 4.193333 7.766666 4 8.24 4 8.799999 Z M 13 16.799999 C 12.439999 16.799999 11.966665 16.606667 11.58 16.219999 C 11.193333 15.833333 11 15.36 11 14.799999 L 11 8.799999 C 11 8.24 11.193333 7.766666 11.58 7.379999 C 11.966665 6.993334 12.439999 6.8 13 6.799999 L 14 6.799999 C 14.559999 6.8 15.033333 6.993334 15.42 7.379999 C 15.806666 7.766666 16 8.24 16 8.799999 L 16 14.799999 C 16 15.36 15.806666 15.833333 15.42 16.219999 C 15.033333 16.606667 14.559999 16.799999 14 16.799999 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
<RadioButton GroupName="Layout0">
|
<RadioButton GroupName="Layout0" Name="LayoutButtonH" IsCheckedChanged="LayoutButtonH_IsCheckedChanged">
|
||||||
<PathIcon Data="F1 M 3 19.279999 C 3 19.439999 3.046667 19.566666 3.14 19.66 C 3.233333 19.753332 3.353333 19.799999 3.5 19.799999 C 3.646667 19.799999 3.766666 19.753332 3.86 19.66 C 3.953333 19.566666 4 19.439999 4 19.279999 L 4 4.279999 C 4 4.146667 3.953333 4.033333 3.86 3.940001 C 3.766666 3.846668 3.646667 3.799999 3.5 3.799999 C 3.353333 3.799999 3.233333 3.846668 3.14 3.940001 C 3.046667 4.033333 3 4.146667 3 4.279999 Z M 16 19.279999 C 16 19.439999 16.046665 19.566666 16.139999 19.66 C 16.233332 19.753332 16.353333 19.799999 16.5 19.799999 C 16.646666 19.799999 16.766666 19.753332 16.859999 19.66 C 16.953333 19.566666 17 19.439999 17 19.279999 L 17 4.279999 C 17 4.146667 16.953333 4.033333 16.859999 3.940001 C 16.766666 3.846668 16.646666 3.799999 16.5 3.799999 C 16.353333 3.799999 16.233332 3.846668 16.139999 3.940001 C 16.046665 4.033333 16 4.146667 16 4.279999 Z M 13 17.799999 C 13.559999 17.799999 14.033333 17.606667 14.42 17.219999 C 14.806665 16.833332 14.999999 16.360001 15 15.799999 L 15 14.799999 C 14.999999 14.24 14.806665 13.766666 14.42 13.379999 C 14.033333 12.993333 13.559999 12.799999 13 12.799999 L 7 12.799999 C 6.44 12.799999 5.966666 12.993333 5.58 13.379999 C 5.193333 13.766666 5 14.24 5 14.799999 L 5 15.799999 C 5 16.360001 5.193333 16.833332 5.58 17.219999 C 5.966666 17.606667 6.44 17.799999 7 17.799999 Z M 15 8.799999 C 14.999999 9.360001 14.806665 9.833334 14.42 10.219999 C 14.033333 10.606667 13.559999 10.799999 13 10.799999 L 7 10.799999 C 6.44 10.799999 5.966666 10.606667 5.58 10.219999 C 5.193333 9.833334 5 9.360001 5 8.799999 L 5 7.799999 C 5 7.24 5.193333 6.766666 5.58 6.379999 C 5.966666 5.993333 6.44 5.799999 7 5.799999 L 13 5.799999 C 13.559999 5.799999 14.033333 5.993333 14.42 6.379999 C 14.806665 6.766666 14.999999 7.24 15 7.799999 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
<PathIcon Data="F1 M 3 19.279999 C 3 19.439999 3.046667 19.566666 3.14 19.66 C 3.233333 19.753332 3.353333 19.799999 3.5 19.799999 C 3.646667 19.799999 3.766666 19.753332 3.86 19.66 C 3.953333 19.566666 4 19.439999 4 19.279999 L 4 4.279999 C 4 4.146667 3.953333 4.033333 3.86 3.940001 C 3.766666 3.846668 3.646667 3.799999 3.5 3.799999 C 3.353333 3.799999 3.233333 3.846668 3.14 3.940001 C 3.046667 4.033333 3 4.146667 3 4.279999 Z M 16 19.279999 C 16 19.439999 16.046665 19.566666 16.139999 19.66 C 16.233332 19.753332 16.353333 19.799999 16.5 19.799999 C 16.646666 19.799999 16.766666 19.753332 16.859999 19.66 C 16.953333 19.566666 17 19.439999 17 19.279999 L 17 4.279999 C 17 4.146667 16.953333 4.033333 16.859999 3.940001 C 16.766666 3.846668 16.646666 3.799999 16.5 3.799999 C 16.353333 3.799999 16.233332 3.846668 16.139999 3.940001 C 16.046665 4.033333 16 4.146667 16 4.279999 Z M 13 17.799999 C 13.559999 17.799999 14.033333 17.606667 14.42 17.219999 C 14.806665 16.833332 14.999999 16.360001 15 15.799999 L 15 14.799999 C 14.999999 14.24 14.806665 13.766666 14.42 13.379999 C 14.033333 12.993333 13.559999 12.799999 13 12.799999 L 7 12.799999 C 6.44 12.799999 5.966666 12.993333 5.58 13.379999 C 5.193333 13.766666 5 14.24 5 14.799999 L 5 15.799999 C 5 16.360001 5.193333 16.833332 5.58 17.219999 C 5.966666 17.606667 6.44 17.799999 7 17.799999 Z M 15 8.799999 C 14.999999 9.360001 14.806665 9.833334 14.42 10.219999 C 14.033333 10.606667 13.559999 10.799999 13 10.799999 L 7 10.799999 C 6.44 10.799999 5.966666 10.606667 5.58 10.219999 C 5.193333 9.833334 5 9.360001 5 8.799999 L 5 7.799999 C 5 7.24 5.193333 6.766666 5.58 6.379999 C 5.966666 5.993333 6.44 5.799999 7 5.799999 L 13 5.799999 C 13.559999 5.799999 14.033333 5.993333 14.42 6.379999 C 14.806665 6.766666 14.999999 7.24 15 7.799999 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
<Border VerticalAlignment="Stretch" Background="#4888" Margin="5,2" Width="2"/>
|
<Border VerticalAlignment="Stretch" Background="#4888" Margin="5,2" Width="2"/>
|
||||||
<RadioButton GroupName="Layout1">
|
<RadioButton GroupName="Layout1" Name="LayoutSplited" IsCheckedChanged="LayoutSplited_IsCheckedChanged" IsChecked="true">
|
||||||
<PathIcon Data="F1 M 6 5.799999 L 7 5.799999 C 7.559999 5.799999 8.033333 5.993333 8.42 6.379999 C 8.806666 6.766666 9 7.24 9 7.799999 L 9 15.799999 C 9 16.360001 8.806666 16.833332 8.42 17.219999 C 8.033333 17.606667 7.559999 17.799999 7 17.799999 L 6 17.799999 C 5.44 17.799999 4.966666 17.606667 4.58 17.219999 C 4.193333 16.833332 4 16.360001 4 15.799999 L 4 7.799999 C 4 7.24 4.193333 6.766666 4.58 6.379999 C 4.966666 5.993333 5.44 5.799999 6 5.799999 Z M 5 7.799999 L 5 15.799999 C 5 16.066666 5.099999 16.299999 5.3 16.5 C 5.5 16.700001 5.733333 16.799999 6 16.799999 L 7 16.799999 C 7.266666 16.799999 7.5 16.700001 7.7 16.5 C 7.9 16.299999 8 16.066666 8 15.799999 L 8 7.799999 C 8 7.533333 7.9 7.299999 7.7 7.099999 C 7.5 6.9 7.266666 6.8 7 6.799999 L 6 6.799999 C 5.733333 6.8 5.5 6.9 5.3 7.099999 C 5.099999 7.299999 5 7.533333 5 7.799999 Z M 13 5.799999 C 12.439999 5.799999 11.966665 5.993333 11.58 6.379999 C 11.193333 6.766666 11 7.24 11 7.799999 L 11 15.799999 C 11 16.360001 11.193333 16.833332 11.58 17.219999 C 11.966665 17.606667 12.439999 17.799999 13 17.799999 L 14 17.799999 C 14.559999 17.799999 15.033333 17.606667 15.42 17.219999 C 15.806666 16.833332 16 16.360001 16 15.799999 L 16 7.799999 C 16 7.24 15.806666 6.766666 15.42 6.379999 C 15.033333 5.993333 14.559999 5.799999 14 5.799999 Z M 12 7.799999 C 12 7.533333 12.1 7.299999 12.3 7.099999 C 12.499999 6.9 12.733332 6.8 13 6.799999 L 14 6.799999 C 14.266666 6.8 14.5 6.9 14.7 7.099999 C 14.9 7.299999 14.999999 7.533333 15 7.799999 L 15 15.799999 C 14.999999 16.066666 14.9 16.299999 14.7 16.5 C 14.5 16.700001 14.266666 16.799999 14 16.799999 L 13 16.799999 C 12.733332 16.799999 12.499999 16.700001 12.3 16.5 C 12.1 16.299999 12 16.066666 12 15.799999 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
<PathIcon Data="F1 M 6 5.799999 L 7 5.799999 C 7.559999 5.799999 8.033333 5.993333 8.42 6.379999 C 8.806666 6.766666 9 7.24 9 7.799999 L 9 15.799999 C 9 16.360001 8.806666 16.833332 8.42 17.219999 C 8.033333 17.606667 7.559999 17.799999 7 17.799999 L 6 17.799999 C 5.44 17.799999 4.966666 17.606667 4.58 17.219999 C 4.193333 16.833332 4 16.360001 4 15.799999 L 4 7.799999 C 4 7.24 4.193333 6.766666 4.58 6.379999 C 4.966666 5.993333 5.44 5.799999 6 5.799999 Z M 5 7.799999 L 5 15.799999 C 5 16.066666 5.099999 16.299999 5.3 16.5 C 5.5 16.700001 5.733333 16.799999 6 16.799999 L 7 16.799999 C 7.266666 16.799999 7.5 16.700001 7.7 16.5 C 7.9 16.299999 8 16.066666 8 15.799999 L 8 7.799999 C 8 7.533333 7.9 7.299999 7.7 7.099999 C 7.5 6.9 7.266666 6.8 7 6.799999 L 6 6.799999 C 5.733333 6.8 5.5 6.9 5.3 7.099999 C 5.099999 7.299999 5 7.533333 5 7.799999 Z M 13 5.799999 C 12.439999 5.799999 11.966665 5.993333 11.58 6.379999 C 11.193333 6.766666 11 7.24 11 7.799999 L 11 15.799999 C 11 16.360001 11.193333 16.833332 11.58 17.219999 C 11.966665 17.606667 12.439999 17.799999 13 17.799999 L 14 17.799999 C 14.559999 17.799999 15.033333 17.606667 15.42 17.219999 C 15.806666 16.833332 16 16.360001 16 15.799999 L 16 7.799999 C 16 7.24 15.806666 6.766666 15.42 6.379999 C 15.033333 5.993333 14.559999 5.799999 14 5.799999 Z M 12 7.799999 C 12 7.533333 12.1 7.299999 12.3 7.099999 C 12.499999 6.9 12.733332 6.8 13 6.799999 L 14 6.799999 C 14.266666 6.8 14.5 6.9 14.7 7.099999 C 14.9 7.299999 14.999999 7.533333 15 7.799999 L 15 15.799999 C 14.999999 16.066666 14.9 16.299999 14.7 16.5 C 14.5 16.700001 14.266666 16.799999 14 16.799999 L 13 16.799999 C 12.733332 16.799999 12.499999 16.700001 12.3 16.5 C 12.1 16.299999 12 16.066666 12 15.799999 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
<RadioButton GroupName="Layout1">
|
<RadioButton GroupName="Layout1" Name="LayoutCodeOnly" IsCheckedChanged="LayoutCodeOnly_IsCheckedChanged">
|
||||||
<PathIcon Data="F1 M 6 4.799999 C 5.173333 4.799999 4.466666 5.093334 3.88 5.68 C 3.293333 6.266667 3 6.973333 3 7.799999 L 3 15.799999 C 3 16.626667 3.293333 17.333332 3.88 17.92 C 4.466666 18.506666 5.173333 18.799999 6 18.799999 L 14 18.799999 C 14.826666 18.799999 15.533332 18.506666 16.119999 17.92 C 16.706665 17.333332 17 16.626667 17 15.799999 L 17 7.799999 C 17 6.973333 16.706665 6.266667 16.119999 5.68 C 15.533332 5.093334 14.826666 4.799999 14 4.799999 Z M 4 7.799999 C 4 7.24 4.193333 6.766666 4.58 6.379999 C 4.966666 5.993333 5.44 5.799999 6 5.799999 L 14 5.799999 C 14.559999 5.799999 15.033333 5.993333 15.42 6.379999 C 15.806666 6.766666 16 7.24 16 7.799999 L 16 15.799999 C 16 16.360001 15.806666 16.833332 15.42 17.219999 C 15.033333 17.606667 14.559999 17.799999 14 17.799999 L 6 17.799999 C 5.44 17.799999 4.966666 17.606667 4.58 17.219999 C 4.193333 16.833332 4 16.360001 4 15.799999 Z M 8.84 9.639999 C 8.973333 9.506667 9.02 9.346667 8.98 9.16 C 8.94 8.973333 8.826666 8.86 8.639999 8.82 C 8.453333 8.78 8.293333 8.826666 8.16 8.959999 L 5.64 11.44 C 5.533333 11.546667 5.48 11.666666 5.48 11.799999 C 5.48 11.933332 5.533333 12.053333 5.64 12.16 L 8.16 14.639999 C 8.24 14.746666 8.353333 14.799999 8.5 14.799999 C 8.646667 14.799999 8.766666 14.753332 8.86 14.66 C 8.953333 14.566666 9 14.446667 9 14.299999 C 9 14.153334 8.946667 14.04 8.84 13.959999 L 6.72 11.799999 Z M 11.84 8.959999 C 11.759999 8.853333 11.646666 8.799999 11.5 8.799999 C 11.353333 8.799999 11.233333 8.846666 11.139999 8.94 C 11.046666 9.033334 11 9.153334 11 9.299999 C 11 9.446667 11.053333 9.56 11.16 9.639999 L 13.28 11.799999 L 11.16 13.959999 C 11.053333 14.04 11 14.153334 11 14.299999 C 11 14.446667 11.046666 14.566666 11.139999 14.66 C 11.233333 14.753332 11.353333 14.799999 11.5 14.799999 C 11.646666 14.799999 11.759999 14.746666 11.84 14.639999 L 14.36 12.16 C 14.466666 12.053333 14.52 11.933332 14.52 11.799999 C 14.52 11.666666 14.466666 11.546667 14.36 11.44 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
<PathIcon Data="F1 M 6 4.799999 C 5.173333 4.799999 4.466666 5.093334 3.88 5.68 C 3.293333 6.266667 3 6.973333 3 7.799999 L 3 15.799999 C 3 16.626667 3.293333 17.333332 3.88 17.92 C 4.466666 18.506666 5.173333 18.799999 6 18.799999 L 14 18.799999 C 14.826666 18.799999 15.533332 18.506666 16.119999 17.92 C 16.706665 17.333332 17 16.626667 17 15.799999 L 17 7.799999 C 17 6.973333 16.706665 6.266667 16.119999 5.68 C 15.533332 5.093334 14.826666 4.799999 14 4.799999 Z M 4 7.799999 C 4 7.24 4.193333 6.766666 4.58 6.379999 C 4.966666 5.993333 5.44 5.799999 6 5.799999 L 14 5.799999 C 14.559999 5.799999 15.033333 5.993333 15.42 6.379999 C 15.806666 6.766666 16 7.24 16 7.799999 L 16 15.799999 C 16 16.360001 15.806666 16.833332 15.42 17.219999 C 15.033333 17.606667 14.559999 17.799999 14 17.799999 L 6 17.799999 C 5.44 17.799999 4.966666 17.606667 4.58 17.219999 C 4.193333 16.833332 4 16.360001 4 15.799999 Z M 8.84 9.639999 C 8.973333 9.506667 9.02 9.346667 8.98 9.16 C 8.94 8.973333 8.826666 8.86 8.639999 8.82 C 8.453333 8.78 8.293333 8.826666 8.16 8.959999 L 5.64 11.44 C 5.533333 11.546667 5.48 11.666666 5.48 11.799999 C 5.48 11.933332 5.533333 12.053333 5.64 12.16 L 8.16 14.639999 C 8.24 14.746666 8.353333 14.799999 8.5 14.799999 C 8.646667 14.799999 8.766666 14.753332 8.86 14.66 C 8.953333 14.566666 9 14.446667 9 14.299999 C 9 14.153334 8.946667 14.04 8.84 13.959999 L 6.72 11.799999 Z M 11.84 8.959999 C 11.759999 8.853333 11.646666 8.799999 11.5 8.799999 C 11.353333 8.799999 11.233333 8.846666 11.139999 8.94 C 11.046666 9.033334 11 9.153334 11 9.299999 C 11 9.446667 11.053333 9.56 11.16 9.639999 L 13.28 11.799999 L 11.16 13.959999 C 11.053333 14.04 11 14.153334 11 14.299999 C 11 14.446667 11.046666 14.566666 11.139999 14.66 C 11.233333 14.753332 11.353333 14.799999 11.5 14.799999 C 11.646666 14.799999 11.759999 14.746666 11.84 14.639999 L 14.36 12.16 C 14.466666 12.053333 14.52 11.933332 14.52 11.799999 C 14.52 11.666666 14.466666 11.546667 14.36 11.44 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
<RadioButton GroupName="Layout1">
|
<RadioButton GroupName="Layout1" Name="LayoutImageOnly" IsCheckedChanged="LayoutImageOnly_IsCheckedChanged">
|
||||||
<PathIcon Data="F1 M 7.52 4.799999 C 6.719999 4.799999 5.986666 4.986666 5.32 5.359999 C 4.653333 5.733334 4.113333 6.246666 3.7 6.9 C 3.286666 7.553333 3.053333 8.273333 3 9.059999 C 2.946666 9.846666 3.093333 10.586666 3.44 11.28 C 3.786666 11.973333 4.273333 12.54 4.9 12.98 C 5.526667 13.42 6.226666 13.679999 7 13.759999 L 7 14.759999 C 6.04 14.679999 5.173333 14.379999 4.4 13.859999 C 3.626667 13.339999 3.026667 12.66 2.6 11.82 C 2.173333 10.98 1.973333 10.086666 2 9.139999 C 2.026667 8.193333 2.28 7.313334 2.76 6.5 C 3.24 5.686666 3.886667 5.039999 4.7 4.559999 C 5.513333 4.08 6.393333 3.826668 7.34 3.799999 C 8.286667 3.773335 9.179999 3.973333 10.02 4.4 C 10.86 4.826666 11.539999 5.426666 12.059999 6.2 C 12.58 6.973333 12.879999 7.84 12.96 8.799999 L 11.96 8.799999 C 11.853333 7.653334 11.366667 6.7 10.5 5.94 C 9.633333 5.18 8.626666 4.799999 7.48 4.799999 Z M 10.52 9.799999 C 9.826666 9.799999 9.233333 10.046667 8.74 10.54 C 8.246666 11.033334 8 11.626667 8 12.32 L 8 17.279999 C 8 17.973333 8.246666 18.566666 8.74 19.059999 C 9.233333 19.553333 9.813333 19.799999 10.48 19.799999 L 15.52 19.799999 C 16.186666 19.799999 16.766666 19.553333 17.26 19.059999 C 17.753332 18.566666 18 17.986666 18 17.32 L 18 12.28 C 18 11.613334 17.753332 11.033334 17.26 10.54 C 16.766666 10.046667 16.173332 9.799999 15.48 9.799999 Z M 9 12.28 C 9 11.88 9.146666 11.533333 9.44 11.24 C 9.733334 10.946667 10.093333 10.799999 10.52 10.799999 L 15.52 10.799999 C 15.919998 10.799999 16.266665 10.946667 16.559999 11.24 C 16.853333 11.533333 17 11.893333 17 12.32 L 17 17.279999 C 17 17.706665 16.853333 18.066666 16.559999 18.359999 C 16.266665 18.653332 15.906665 18.799999 15.48 18.799999 L 10.52 18.799999 C 10.093333 18.799999 9.733334 18.653332 9.44 18.359999 C 9.146666 18.066666 9 17.706665 9 17.279999 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
<PathIcon Data="F1 M 7.52 4.799999 C 6.719999 4.799999 5.986666 4.986666 5.32 5.359999 C 4.653333 5.733334 4.113333 6.246666 3.7 6.9 C 3.286666 7.553333 3.053333 8.273333 3 9.059999 C 2.946666 9.846666 3.093333 10.586666 3.44 11.28 C 3.786666 11.973333 4.273333 12.54 4.9 12.98 C 5.526667 13.42 6.226666 13.679999 7 13.759999 L 7 14.759999 C 6.04 14.679999 5.173333 14.379999 4.4 13.859999 C 3.626667 13.339999 3.026667 12.66 2.6 11.82 C 2.173333 10.98 1.973333 10.086666 2 9.139999 C 2.026667 8.193333 2.28 7.313334 2.76 6.5 C 3.24 5.686666 3.886667 5.039999 4.7 4.559999 C 5.513333 4.08 6.393333 3.826668 7.34 3.799999 C 8.286667 3.773335 9.179999 3.973333 10.02 4.4 C 10.86 4.826666 11.539999 5.426666 12.059999 6.2 C 12.58 6.973333 12.879999 7.84 12.96 8.799999 L 11.96 8.799999 C 11.853333 7.653334 11.366667 6.7 10.5 5.94 C 9.633333 5.18 8.626666 4.799999 7.48 4.799999 Z M 10.52 9.799999 C 9.826666 9.799999 9.233333 10.046667 8.74 10.54 C 8.246666 11.033334 8 11.626667 8 12.32 L 8 17.279999 C 8 17.973333 8.246666 18.566666 8.74 19.059999 C 9.233333 19.553333 9.813333 19.799999 10.48 19.799999 L 15.52 19.799999 C 16.186666 19.799999 16.766666 19.553333 17.26 19.059999 C 17.753332 18.566666 18 17.986666 18 17.32 L 18 12.28 C 18 11.613334 17.753332 11.033334 17.26 10.54 C 16.766666 10.046667 16.173332 9.799999 15.48 9.799999 Z M 9 12.28 C 9 11.88 9.146666 11.533333 9.44 11.24 C 9.733334 10.946667 10.093333 10.799999 10.52 10.799999 L 15.52 10.799999 C 15.919998 10.799999 16.266665 10.946667 16.559999 11.24 C 16.853333 11.533333 17 11.893333 17 12.32 L 17 17.279999 C 17 17.706665 16.853333 18.066666 16.559999 18.359999 C 16.266665 18.653332 15.906665 18.799999 15.48 18.799999 L 10.52 18.799999 C 10.093333 18.799999 9.733334 18.653332 9.44 18.359999 C 9.146666 18.066666 9 17.706665 9 17.279999 Z " VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|||||||
@@ -23,10 +23,13 @@ public partial class ProgrartEditorPage : UserControl, ITabPage, IEditorPage
|
|||||||
TabButton? btn = null;
|
TabButton? btn = null;
|
||||||
Bitmap? image;
|
Bitmap? image;
|
||||||
string lastSave = "";
|
string lastSave = "";
|
||||||
|
LayoutDirection direction = LayoutDirection.Vertical;
|
||||||
|
LayoutMode mode = LayoutMode.Splitted;
|
||||||
public ProgrartEditorPage()
|
public ProgrartEditorPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
CodeEditor.onSaveCmd = Save;
|
CodeEditor.onSaveCmd = Save;
|
||||||
|
ApplyLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void BindButton(TabButton button)
|
public void BindButton(TabButton button)
|
||||||
@@ -194,4 +197,135 @@ public partial class ProgrartEditorPage : UserControl, ITabPage, IEditorPage
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void LayoutButtonV_IsCheckedChanged(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (LayoutButtonV.IsChecked == true)
|
||||||
|
{
|
||||||
|
|
||||||
|
direction = LayoutDirection.Vertical;
|
||||||
|
ApplyLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LayoutButtonH_IsCheckedChanged(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (LayoutButtonH.IsChecked == true)
|
||||||
|
{
|
||||||
|
|
||||||
|
direction = LayoutDirection.Horizontal;
|
||||||
|
ApplyLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LayoutSplited_IsCheckedChanged(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (LayoutSplited?.IsChecked == true)
|
||||||
|
{
|
||||||
|
mode = LayoutMode.Splitted;
|
||||||
|
ApplyLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LayoutCodeOnly_IsCheckedChanged(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (LayoutCodeOnly.IsChecked == true)
|
||||||
|
{
|
||||||
|
mode = LayoutMode.Code;
|
||||||
|
ApplyLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LayoutImageOnly_IsCheckedChanged(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (LayoutImageOnly.IsChecked == true)
|
||||||
|
{
|
||||||
|
mode = LayoutMode.Image;
|
||||||
|
ApplyLayout();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void ApplyLayout()
|
||||||
|
{
|
||||||
|
switch (mode)
|
||||||
|
{
|
||||||
|
case LayoutMode.Splitted:
|
||||||
|
CodeEditor.IsVisible = true;
|
||||||
|
PreviewHolder.IsVisible = true;
|
||||||
|
if (direction == LayoutDirection.Vertical)
|
||||||
|
{
|
||||||
|
Grid.SetColumn(Splitter, 1);
|
||||||
|
Grid.SetRow(Splitter, 0);
|
||||||
|
Grid.SetRowSpan(Splitter, 3);
|
||||||
|
Grid.SetColumnSpan(Splitter, 1);
|
||||||
|
|
||||||
|
Grid.SetRow(CodeEditor, 0);
|
||||||
|
Grid.SetColumn(CodeEditor, 0);
|
||||||
|
Grid.SetRowSpan(CodeEditor, 3);
|
||||||
|
Grid.SetColumnSpan(CodeEditor, 1);
|
||||||
|
|
||||||
|
Grid.SetColumn(PreviewHolder, 2);
|
||||||
|
Grid.SetRow(PreviewHolder, 0);
|
||||||
|
Grid.SetRowSpan(PreviewHolder, 3);
|
||||||
|
Grid.SetColumnSpan(PreviewHolder, 1);
|
||||||
|
VerticalSplitterVisualElement.IsVisible = true;
|
||||||
|
HorizontalSplitterVisualElement.IsVisible = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Grid.SetColumn(Splitter, 0);
|
||||||
|
Grid.SetRow(Splitter, 1);
|
||||||
|
Grid.SetRowSpan(Splitter, 1);
|
||||||
|
Grid.SetColumnSpan(Splitter, 3);
|
||||||
|
|
||||||
|
Grid.SetRow(CodeEditor, 0);
|
||||||
|
Grid.SetColumn(CodeEditor, 0);
|
||||||
|
Grid.SetRowSpan(CodeEditor, 1);
|
||||||
|
Grid.SetColumnSpan(CodeEditor, 3);
|
||||||
|
|
||||||
|
Grid.SetRow(PreviewHolder, 2);
|
||||||
|
Grid.SetColumn(PreviewHolder, 0);
|
||||||
|
Grid.SetRowSpan(PreviewHolder, 1);
|
||||||
|
Grid.SetColumnSpan(PreviewHolder, 3);
|
||||||
|
VerticalSplitterVisualElement.IsVisible = false;
|
||||||
|
HorizontalSplitterVisualElement.IsVisible = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case LayoutMode.Code:
|
||||||
|
CodeEditor.IsVisible = true;
|
||||||
|
PreviewHolder.IsVisible = false;
|
||||||
|
Grid.SetRow(CodeEditor, 0);
|
||||||
|
Grid.SetRow(PreviewHolder, 0);
|
||||||
|
Grid.SetColumn(CodeEditor, 0);
|
||||||
|
Grid.SetColumn(PreviewHolder, 0);
|
||||||
|
Grid.SetRowSpan(CodeEditor, 3);
|
||||||
|
Grid.SetRowSpan(PreviewHolder, 3);
|
||||||
|
Grid.SetColumnSpan(CodeEditor, 3);
|
||||||
|
Grid.SetColumnSpan(PreviewHolder, 3);
|
||||||
|
VerticalSplitterVisualElement.IsVisible = false;
|
||||||
|
HorizontalSplitterVisualElement.IsVisible = false;
|
||||||
|
break;
|
||||||
|
case LayoutMode.Image:
|
||||||
|
CodeEditor.IsVisible = false;
|
||||||
|
PreviewHolder.IsVisible = true;
|
||||||
|
Grid.SetRow(CodeEditor, 0);
|
||||||
|
Grid.SetRow(PreviewHolder, 0);
|
||||||
|
Grid.SetColumn(CodeEditor, 0);
|
||||||
|
Grid.SetColumn(PreviewHolder, 0);
|
||||||
|
Grid.SetRowSpan(CodeEditor, 3);
|
||||||
|
Grid.SetRowSpan(PreviewHolder, 3);
|
||||||
|
Grid.SetColumnSpan(CodeEditor, 3);
|
||||||
|
Grid.SetColumnSpan(PreviewHolder, 3);
|
||||||
|
VerticalSplitterVisualElement.IsVisible = false;
|
||||||
|
HorizontalSplitterVisualElement.IsVisible = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
enum LayoutDirection
|
||||||
|
{
|
||||||
|
Vertical, Horizontal
|
||||||
|
}
|
||||||
|
enum LayoutMode
|
||||||
|
{
|
||||||
|
Splitted, Code, Image
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user