Browse Source

临时提交

谢翼翔 1 year ago
parent
commit
270bfa21c7

+ 23 - 27
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/Uct/BedNetworkInformation/UctBedMeshCloth.xaml

@@ -8,44 +8,40 @@
              d:DesignHeight="450" d:DesignWidth="800">
     <qilin:DashboardCard>
         <Grid>
-            <Grid.RowDefinitions>
-                <RowDefinition/>
-            <RowDefinition/>
-        </Grid.RowDefinitions>
-        <Grid Grid.Row="0">
             <Grid.RowDefinitions>
                 <RowDefinition/>
                 <RowDefinition/>
-                 <RowDefinition/>
-                 <RowDefinition/>
+            </Grid.RowDefinitions>
+            <Grid Grid.Row="0" x:Name="FirstBedMeshCloth">
+                <Grid.RowDefinitions>
+                    <RowDefinition/>
+                    <RowDefinition/>
                 </Grid.RowDefinitions>
-            <Grid.ColumnDefinitions>
-                <ColumnDefinition Width="2*"/>
-                <ColumnDefinition Width="1.5*"/>
-                <ColumnDefinition Width="1.5*"/>
-                <ColumnDefinition Width="1.5*"/>
-                <ColumnDefinition Width="2*"/>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition />
+                    <ColumnDefinition />
+                    <ColumnDefinition />
                 </Grid.ColumnDefinitions>
-            <uct:UctButtonControl Title="上面布" FontSize="20" Grid.Column="1" Grid.Row="1"/>
-            <uct:UctButtonControl  Grid.Column="2" Title="上面布焊接" FontSize="20" Grid.Row="1"/>
-            <uct:UctButtonControl  Grid.Column="3"  Title="上接布气缸" FontSize="20" Grid.Row="1"/>
-            <uct:UctButtonControl Title="下面布" FontSize="20" Grid.Row="2" Grid.Column="1"/>
-            <uct:UctButtonControl  Grid.Column="2" Title="下面布焊接" FontSize="20" Grid.Row="2"/>
-            <uct:UctButtonControl  Grid.Column="3"  Title="下接布气缸" FontSize="20" Grid.Row="2"/>
-        </Grid>
-        <Grid Grid.Row="1" x:Name="ScendBedMeshCloth">
-            <Grid.RowDefinitions>
-                <RowDefinition/>
-                <RowDefinition/>
-                <RowDefinition/>
-                  <RowDefinition Height="1*"/>
+                <!--<uct:UctButtonControl Title="上面布" FontSize="20" />
+                <uct:UctButtonControl Title="上面布焊接" FontSize="20" Grid.Column="1"/>
+                <uct:UctButtonControl Title="上接布气缸" FontSize="20" Grid.Column="2"/>
+                <uct:UctButtonControl Title="下面布" FontSize="20" Grid.Row="1" />
+                <uct:UctButtonControl Title="下面布焊接" FontSize="20" Grid.Row="1"  Grid.Column="1"/>
+                <uct:UctButtonControl Title="下接布气缸" FontSize="20" Grid.Row="1"  Grid.Column="2" />-->
+            </Grid>
+            <Grid Grid.Row="1" x:Name="ScendBedMeshCloth">
+                <Grid.RowDefinitions>
+                    <RowDefinition/>
+                    <RowDefinition/>
+                    <RowDefinition/>
+                    <RowDefinition Height="1*"/>
                 </Grid.RowDefinitions>
                 <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="3*"/>
                     <ColumnDefinition Width="2*"/>
                     <ColumnDefinition Width="3*"/>
                 </Grid.ColumnDefinitions>
+            </Grid>
         </Grid>
-    </Grid>
     </qilin:DashboardCard>
 </UserControl>

+ 18 - 7
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/Uct/BedNetworkInformation/UctBedMeshCloth.xaml.cs

@@ -23,17 +23,28 @@ namespace SCADA_DAQ.Plugin.Qilin.Uct.BedNetworkInformation
         public UctBedMeshCloth()
         {
             InitializeComponent();
-            var firstMeshClothString = new string[] {"接布延迟时间","s" };
-            var secondMeshClothString = new string[] {"接布焊接时间","s"};
-            var thirMeshClothString = new string[] { "接布保压时间","s"};
-            var arrayMeshCloth = new List<string[]>(){ firstMeshClothString, secondMeshClothString , thirMeshClothString };
+            var clothName = new List<string>() { "上面布", "上面布焊接", "上接布气缸", "下面布", "下面布焊接", "下接布气缸" };
+            for (int i = 0; i < 6; i++)
+            {
+                var basicInformation = new UctButtonControl() { FontSize = 20, Title = clothName[i],Width=150,Height=50};
+                var row = i / 3;
+                Grid.SetRow(basicInformation, row);
+                var colum = i % 3;
+                Grid.SetColumn(basicInformation, colum);
+                FirstBedMeshCloth.Children.Add(basicInformation);
+            }
+
+            var firstMeshClothString = new string[] { "接布延迟时间", "s" };
+            var secondMeshClothString = new string[] { "接布焊接时间", "s" };
+            var thirMeshClothString = new string[] { "接布保压时间", "s" };
+            var arrayMeshCloth = new List<string[]>() { firstMeshClothString, secondMeshClothString, thirMeshClothString };
             for (int i = 0; i < 3; i++)
             {
                 var basicInformation = new UctArrayTextValueUnitControl() { FontSize = 20, Title = arrayMeshCloth[i] };
                 var row = i % 3;
-                Grid.SetRow(basicInformation,row);
-                var col = 1;
-                Grid.SetColumn(basicInformation,col);
+                Grid.SetRow(basicInformation, row);
+                var colum = 1;
+                Grid.SetColumn(basicInformation, colum);
                 ScendBedMeshCloth.Children.Add(basicInformation);
             }
         }

+ 8 - 9
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/Uct/UctButtonControl.xaml

@@ -7,30 +7,30 @@
              mc:Ignorable="d" 
              x:Name="this"
              d:DesignHeight="450" d:DesignWidth="800">
-    <qilin:DashboardCard Margin="10">
-        <Grid>
+    <Grid Margin="4">
         <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
 
             <!--<scadaui:RegBoolEditView  DisplayModel="OnlyContent" HorizontalAlignment="Center" VerticalAlignment="Top" x:Name="Gateriseindicator"/>-->
-            <TextBlock Text="{Binding Title,ElementName=this}"  HorizontalAlignment="Center" Foreground="Black" Width="100" VerticalAlignment="Center" Margin="0,0,10,0"/>
+            <!--<TextBlock Text="{Binding Title,ElementName=this}"  HorizontalAlignment="Center" Foreground="Black" Width="100" VerticalAlignment="Center" Margin="0,0,10,0"/>-->
             <wpfcontrol:IconButton  x:Name="IconButton"
-                                  Width="100"
-                                  Height="50"
+                                  Width="{Binding Width,ElementName=this}"
+                                  Height="{Binding Height,ElementName=this}"
                                   Foreground="Black"
                                   PreviewMouseLeftButtonDown="IconButton_PreviewMouseLeftButtonDown"
                                   PreviewMouseLeftButtonUp="IconButton_PreviewMouseLeftButtonUp" Cursor="Hand"
+                                  FontSize="20"
                 >
                 <wpfcontrol:IconButton.Resources>
                     <Style TargetType="{x:Type wpfcontrol:IconButton}">
-                        <Setter Property="Title" Value="OFF"/>
+                        <Setter Property="Title" Value="{Binding Title,ElementName=this}"/>
                         <Setter Property="ButtonKind" Value="StopButton"/>
                         <Setter Property="ButtonStyle" Value="Primary"/>
-                    
+
                         <Style.Triggers>
                             <DataTrigger Binding="{Binding Value}" Value="1">
                                 <Setter Property="ButtonKind" Value="StopButton"/>
                                 <Setter Property="Background" Value="Green"/>
-                                <Setter Property="Title" Value="ON"/>
+                                <Setter Property="Title" Value="{Binding Title,ElementName=this}"/>
                             </DataTrigger>
 
                         </Style.Triggers>
@@ -39,5 +39,4 @@
             </wpfcontrol:IconButton>
         </StackPanel>
     </Grid>
-    </qilin:DashboardCard>
 </UserControl>

+ 27 - 0
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/Uct/UctButtonControl.xaml.cs

@@ -39,6 +39,33 @@ namespace SCADA_DAQ.Plugin.Qilin.Uct
             DependencyProperty.Register("Title", typeof(string), typeof(UctButtonControl), new PropertyMetadata(""));
 
 
+
+
+        public int Width
+        {
+            get { return (int)GetValue(WidthProperty); }
+            set { SetValue(WidthProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for Width.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty WidthProperty =
+            DependencyProperty.Register("Width", typeof(int), typeof(UctButtonControl), new PropertyMetadata(null));
+
+
+
+        public int Height
+        {
+            get { return (int)GetValue(HeightProperty); }
+            set { SetValue(HeightProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for Height.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty HeightProperty =
+            DependencyProperty.Register("Height", typeof(int), typeof(UctButtonControl), new PropertyMetadata(null));
+
+
+
+
         private void IconButton_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
         {
             if (sender is IconButton btn)

+ 2 - 2
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/Uct/UctFunctionControl.xaml.cs

@@ -30,9 +30,9 @@ namespace SCADA_DAQ.Plugin.Qilin.Uct
                 "皮带异簧检测","大梁","定右边","定中线1","定中位2","定左边"};
             var regValue = new string[] {"H2.0","H1.5","H1.9","H4.0","H1.6","H1.11","H4.2","H1.2","H1.12","H4.3","H1.3","H4.4","H4.12","H4.13","H4.4"};
 
-            for (int i = 0; i < 15; i++)
+            for (int i = 0; i < 15; i++) 
             {
-                var basicInformation = new UctSingleButtonControl() { FontSize = 20, Title = functionString[i],Width=150,Height=50};
+                var basicInformation = new UctButtonControl() { FontSize = 25, Title = functionString[i],Width=150,Height=50};
                 basicInformation.DataContext = Omron.GetListenReg(regValue[i]);
                 var row = i / 3;
                 Grid.SetRow(basicInformation, row);

+ 3 - 5
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/UctFrmBedNetArrangementMain .xaml

@@ -7,9 +7,7 @@
                         mc:Ignorable="d" 
       d:DesignHeight="450" d:DesignWidth="800"
       Title="UctFrmBedNetSizeMain">
-  
-        <Grid>
-            <bednetworkinformation:UctBedNetArrangement/>
-        </Grid>
-    
+    <Grid>
+        <bednetworkinformation:UctBedNetArrangement/>
+    </Grid>
 </wpfcontrol:BaseUctFrm>

+ 3 - 5
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/UctFrmBedNetSizeMain.xaml

@@ -7,9 +7,7 @@
                         mc:Ignorable="d" 
       d:DesignHeight="450" d:DesignWidth="800"
       Title="UctFrmBedNetSizeMain">
-
-        <Grid>
-            <bednetworkinformation:UctBedNetSize/>
-        </Grid>
-  
+    <Grid>
+        <bednetworkinformation:UctBedNetSize/>
+    </Grid>
 </wpfcontrol:BaseUctFrm>

+ 1 - 1
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/UctFrmChannelParametersMain.xaml

@@ -21,7 +21,7 @@
                 <ColumnDefinition/>
             </Grid.ColumnDefinitions>
             <Viewbox Stretch="Fill" Grid.Column="1">
-                <uct:UctChannelParameters  />
+                <uct:UctChannelParameters/>
             </Viewbox>
         </Grid>
     </Grid>

+ 2 - 2
skoda-scada-daq3.0-master/skoda-scada-daq3.0-master/scada_-daq3.0-master/SCADA_DAQ.Plugin.Qilin/UctFrmFunctionMain.xaml

@@ -9,10 +9,10 @@
       Title="UctFrmFunctionMain">
     <Grid>
         <Grid.RowDefinitions>
-            <RowDefinition Height="1*"/>
+            <RowDefinition Height="auto"/>
             <RowDefinition Height="9*"/>
         </Grid.RowDefinitions>
-        <uct:UctMidCard Title="功能选择"  Grid.Row="0" Grid.ColumnSpan="2"/>
+        <uct:UctMidCard Title="功能选择"  Grid.Row="0" HorizontalAlignment="Center" FontSize="25"/>
         <Grid Grid.Row="1">
             <Grid.ColumnDefinitions>
                 <ColumnDefinition />