Browse Source

1

样式分支
fyf 2 years ago
parent
commit
041f518424
2 changed files with 16 additions and 25 deletions
  1. +2
    -1
      BPASmart.Model/用户/UserManager.cs
  2. +14
    -24
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml

+ 2
- 1
BPASmart.Model/用户/UserManager.cs View File

@@ -1,4 +1,5 @@
using System;
using BPASmart.Model.用户;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;


+ 14
- 24
BeDesignerSCADA/Controls/MainCanvasPanel.xaml View File

@@ -25,19 +25,16 @@
<Grid.ColumnDefinitions>
<ColumnDefinition Width="240"/>
<ColumnDefinition/>
<ColumnDefinition Width="350"/>
<ColumnDefinition Width="320"/>
</Grid.ColumnDefinitions>

<!--左侧选择区域-->
<Grid >
<Border BorderThickness="1" BorderBrush="{StaticResource AccentBrush}" Background="Transparent" Margin="4">
<ListBox x:Name="CtlList" Background="Transparent" ItemTemplate="{DynamicResource ToolBoxStyle}" BorderThickness="0" PreviewMouseMove="CtlList_PreviewMouseMove">
</ListBox>
<ListBox x:Name="CtlList" Background="Transparent" ItemTemplate="{DynamicResource ToolBoxStyle}" BorderThickness="0" PreviewMouseMove="CtlList_PreviewMouseMove"/>
</Border>
</Grid>



<!--中间控制区域-->
<DockPanel Grid.Column="1">
<!--按钮控制-->
@@ -77,8 +74,6 @@
<Button Margin="4 0 0 0" Width="24" Padding="0" ToolTip="删除" Command="{Binding ElementName=cav, Path=DeleteSelectItemsCommand}">
<icon:PackIconModern Kind="Delete"/>
</Button>

<Button x:Name="RunBtn" Margin="16 0 0 0" Padding="0" Click="RunBtn_Click" Command="{Binding RunUiCommand}">
<Button.Style>
@@ -137,21 +132,16 @@
</StackPanel>
</Button>

<!--<Button x:Name="MNBtn" Margin="4 0 0 0" Padding="0" Click="MNBtn_Click">
<StackPanel Orientation="Horizontal" Margin="8 0">
<icon:PackIconModern Kind="MessageSend" VerticalAlignment="Center" Width="14"/>
<TextBlock Text="模拟消息" Margin="4 0" VerticalAlignment="Center"/>
</StackPanel>
</Button>-->

<ToggleButton x:Name="showCode" Click="showCode_Click" DockPanel.Dock="Right" Margin="4 0 0 0" Padding="4 0">
<icon:Material Kind="FileCode"/>
</ToggleButton>

<Slider DockPanel.Dock="Right" x:Name="slikl" Width="100" Maximum="16" Minimum="1" Margin="4 0 0 0"
HorizontalContentAlignment="Center" Value="{Binding ElementName=cav,Path=GridPxiel}" ></Slider>
<TextBlock DockPanel.Dock="Right" Text="对齐:" VerticalAlignment="Center" Margin="16 0 0 0"/>
<!--<Slider DockPanel.Dock="Right" x:Name="slikl" Width="100" Maximum="16" Minimum="1" Margin="4 0 0 0"
HorizontalContentAlignment="Center" Value="{Binding ElementName=cav,Path=GridPxiel}" />-->
<!--<TextBlock DockPanel.Dock="Right" Text="对齐:" VerticalAlignment="Center" Margin="16 0 0 0"/>-->

<CheckBox x:Name="IsYSSX" Content="原生属性" DockPanel.Dock="Right" VerticalAlignment="Center" Margin="0 0 0 0"></CheckBox>
</DockPanel>

<!--中间画布-->
@@ -166,7 +156,7 @@
</Grid.ColumnDefinitions>

<ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible">
<Viewbox Width="auto" Height="auto" Grid.Row="1">
<Grid>
<Compiler:CanvasPanel x:Name="cav" Width="1920" Height="1080" Visibility="{Binding CanvasPanelVisibility}" SelectedItem="{Binding CanSelectedItem,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AllowDrop="True" RenderTransformOrigin="0.5,0.5" ClipToBounds="True" UseLayoutRounding="True" Focusable="True" SnapsToDevicePixels="True">
<Compiler:CanvasPanel.Background>
<VisualBrush TileMode="Tile" Viewport="0,0,20,20" ViewportUnits="Absolute">
@@ -195,10 +185,11 @@
</TransformGroup>
</Compiler:CanvasPanel.RenderTransform>
</Compiler:CanvasPanel>
</Viewbox>
<ctl:RunCanvas x:Name="runCanvas" Visibility="{Binding RunCanvasVisibility}" />
</Grid>
</ScrollViewer>
<ctl:RunCanvas x:Name="runCanvas" Visibility="{Binding RunCanvasVisibility}" />
<avae:TextEditor x:Name="codeEditor" ShowLineNumbers="True" Padding="4" WordWrap="True" IsReadOnly="True" SyntaxHighlighting="XML" BorderThickness="1 0 0 0" BorderBrush="{StaticResource ControlBorderBrush}" Grid.Column="1" Width="480" Visibility="{Binding ElementName=showCode, Path=IsChecked, Converter={x:Static s:BoolToVisibilityConverter.Instance}}"/>
<TextBlock HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20" FontSize="16" Foreground="Red">分辨率:1920×1080</TextBlock>
</Grid>
</Border>
</DockPanel>
@@ -424,13 +415,12 @@
</mypro:PropertyGrid.EditorDefinitions>
</mypro:PropertyGrid>
</TabItem>
<!--<TabItem Header="所有属性">
<mypro:PropertyGrid x:Name="dsdsdsd"
Margin="10" ShowAdvancedOptions="True" ShowDescriptionByTooltip="True"
<TabItem Header="原生属性" Visibility="{Binding ElementName=IsYSSX, Path=IsChecked, Converter={x:Static s:BoolToVisibilityConverter.Instance}}">
<mypro:PropertyGrid Margin="10" ShowAdvancedOptions="True" ShowDescriptionByTooltip="True"
FontSize="14" ShowTitle="False" ShowSortOptions="False" ShowSearchBox="False"
CategoryGroupHeaderTemplate="{DynamicResource Category}" SelectedObject="{Binding SelectedItem,ElementName=cav,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" />
</TabItem>-->
</TabItem>
</TabControl>
</Grid>
</Grid>


Loading…
Cancel
Save