Selaa lähdekoodia

1

样式分支
fyf 2 vuotta sitten
vanhempi
commit
30db79c7f5
3 muutettua tiedostoa jossa 39 lisäystä ja 32 poistoa
  1. +1
    -1
      BeDesignerSCADA/Common/PropertyHelper.cs
  2. +33
    -30
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml
  3. +5
    -1
      BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs

+ 1
- 1
BeDesignerSCADA/Common/PropertyHelper.cs Näytä tiedosto

@@ -20,7 +20,7 @@ namespace BeDesignerSCADA.Common
"IsChecked", "Value", "CurValue",
"StatusValue", "NumberValue", "Text",
"Direction","RefreshData",
"ChangedText","Content","SendText"
"ChangedText","Content","SendText","LeftTogIsChecked","RightTogIsChecked"
};
public static List<ControlName> GetCustomerControlProperty(List<FrameworkElement> selectItems)
{


+ 33
- 30
BeDesignerSCADA/Controls/MainCanvasPanel.xaml Näytä tiedosto

@@ -148,7 +148,7 @@
<icon:Material Kind="FileCode"/>
</ToggleButton>

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

@@ -164,37 +164,40 @@
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Compiler:CanvasPanel x:Name="cav" 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">
<VisualBrush.Visual>
<Rectangle Width="20" Height="20" StrokeDashArray="4,2" StrokeThickness="0.5" Stroke="#CBCBCB">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding UseAutoAlignment, RelativeSource={RelativeSource AncestorType={x:Type Compiler:CanvasPanel}, Mode=FindAncestor}}" Value="True">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
<DataTrigger Binding="{Binding UseAutoAlignment, RelativeSource={RelativeSource AncestorType={x:Type Compiler:CanvasPanel}, Mode=FindAncestor}}" Value="False">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle>
</VisualBrush.Visual>
</VisualBrush>
</Compiler:CanvasPanel.Background>

<Compiler:CanvasPanel.RenderTransform>
<TransformGroup>
<TranslateTransform x:Name="CanvasTranslate"/>
</TransformGroup>
</Compiler:CanvasPanel.RenderTransform>
</Compiler:CanvasPanel>

<ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible">
<Viewbox Width="auto" Height="auto" Grid.Row="1">
<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">
<VisualBrush.Visual>
<Rectangle Width="20" Height="20" StrokeDashArray="4,2" StrokeThickness="0.5" Stroke="#CBCBCB">
<Rectangle.Style>
<Style TargetType="{x:Type Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding UseAutoAlignment, RelativeSource={RelativeSource AncestorType={x:Type Compiler:CanvasPanel}, Mode=FindAncestor}}" Value="True">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
<DataTrigger Binding="{Binding UseAutoAlignment, RelativeSource={RelativeSource AncestorType={x:Type Compiler:CanvasPanel}, Mode=FindAncestor}}" Value="False">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle>
</VisualBrush.Visual>
</VisualBrush>
</Compiler:CanvasPanel.Background>

<Compiler:CanvasPanel.RenderTransform>
<TransformGroup>
<TranslateTransform x:Name="CanvasTranslate"/>
</TransformGroup>
</Compiler:CanvasPanel.RenderTransform>
</Compiler:CanvasPanel>
</Viewbox>
</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}}"/>
</Grid>
</Border>


+ 5
- 1
BeDesignerSCADA/Controls/MainCanvasPanel.xaml.cs Näytä tiedosto

@@ -487,6 +487,7 @@ namespace BeDesignerSCADA.Controls
}
}


#endregion

#region 不需要的
@@ -588,7 +589,10 @@ namespace BeDesignerSCADA.Controls
//}
#endregion


private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
}
}




Ladataan…
Peruuta
Tallenna