Browse Source

添加离线图片

章政 7 years ago
parent
commit
00adc96c68

+ 16 - 0
UAS_DeviceMonitor/Main.Designer.cs

@@ -138,6 +138,7 @@ namespace UAS_DeviceMonitor
             this.GridWorkCenterStatus = new UAS_DeviceMonitor.CustomerControl.AutoDataGridControl.AutoDataGridControl();
             this.GridViewWorkCenterStatus = new UAS_DeviceMonitor.CustomerControl.GridViewWithSerialNum.GridViewWithSerialNum();
             this.TimerDeviceStatus = new System.Windows.Forms.Timer(this.components);
+            this.pictureEdit1 = new DevExpress.XtraEditors.PictureEdit();
             ((System.ComponentModel.ISupportInitialize)(this.RibbonNav)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.MainTabControl)).BeginInit();
             this.MainTabControl.SuspendLayout();
@@ -164,9 +165,11 @@ namespace UAS_DeviceMonitor
             ((System.ComponentModel.ISupportInitialize)(this.GridPolling)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewPolling)).BeginInit();
             this.PageDeviceStatus.SuspendLayout();
+            this.PanelDeviceStatus.SuspendLayout();
             this.PageWorkCenterStatus.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.GridWorkCenterStatus)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewWorkCenterStatus)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureEdit1.Properties)).BeginInit();
             this.SuspendLayout();
             // 
             // RibbonNav
@@ -1198,6 +1201,7 @@ namespace UAS_DeviceMonitor
             // 
             // PanelDeviceStatus
             // 
+            this.PanelDeviceStatus.Controls.Add(this.pictureEdit1);
             this.PanelDeviceStatus.Dock = System.Windows.Forms.DockStyle.Fill;
             this.PanelDeviceStatus.Location = new System.Drawing.Point(0, 0);
             this.PanelDeviceStatus.Name = "PanelDeviceStatus";
@@ -1244,6 +1248,15 @@ namespace UAS_DeviceMonitor
             this.TimerDeviceStatus.Interval = 10000;
             this.TimerDeviceStatus.Tick += new System.EventHandler(this.TimerDeviceStatus_Tick);
             // 
+            // pictureEdit1
+            // 
+            this.pictureEdit1.Location = new System.Drawing.Point(502, 126);
+            this.pictureEdit1.MenuManager = this.RibbonNav;
+            this.pictureEdit1.Name = "pictureEdit1";
+            this.pictureEdit1.Properties.ShowCameraMenuItem = DevExpress.XtraEditors.Controls.CameraMenuItemVisibility.Auto;
+            this.pictureEdit1.Size = new System.Drawing.Size(100, 96);
+            this.pictureEdit1.TabIndex = 0;
+            // 
             // Main
             // 
             this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;
@@ -1287,9 +1300,11 @@ namespace UAS_DeviceMonitor
             ((System.ComponentModel.ISupportInitialize)(this.GridPolling)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewPolling)).EndInit();
             this.PageDeviceStatus.ResumeLayout(false);
+            this.PanelDeviceStatus.ResumeLayout(false);
             this.PageWorkCenterStatus.ResumeLayout(false);
             ((System.ComponentModel.ISupportInitialize)(this.GridWorkCenterStatus)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.GridViewWorkCenterStatus)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureEdit1.Properties)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();
 
@@ -1400,5 +1415,6 @@ namespace UAS_DeviceMonitor
         private AutoDataGridControl GridWorkCenterStatus;
         private GridViewWithSerialNum GridViewWorkCenterStatus;
         private XtraScrollableControl PanelDeviceStatus;
+        private PictureEdit pictureEdit1;
     }
 }

+ 3 - 2
UAS_DeviceMonitor/Main.cs

@@ -207,7 +207,7 @@ namespace UAS_DeviceMonitor
 
         private void Brand_SelectedIndexChanged(object sender, EventArgs e)
         {
-            GridCommandSetting.Condition = " where dc_debrand='" + BaseUtil.GetComboxEditValue(Brand) + "'";
+            GridCommandSetting.Condition = " where dc_debrand='" + BaseUtil.GetComboxEditValue(Brand) + "' order by dc_id";
             GridCommandSetting.RefreshData();
         }
 
@@ -416,8 +416,9 @@ namespace UAS_DeviceMonitor
                     PictureEditWithText pic = new PictureEditWithText();
                     pic.Anchor = AnchorStyles.Left;
                     pic.Anchor = AnchorStyles.Top;
+                    pic.Picedit.Properties.SizeMode = PictureSizeMode.Squeeze;
                     if (dt.Rows[j * CountPerRow + i]["dpc_status"].ToString() != "Running")
-                        pic.Picedit.Image = Properties.Resources.close_24px_1069872_easyicon_net;
+                        pic.Picedit.Image = Properties.Resources.network_offline;   
                     else
                         pic.Picedit.Image = Properties.Resources.devicecontrol;
                     pic.Text = dt.Rows[j * CountPerRow + i]["de_code"].ToString();

+ 10 - 0
UAS_DeviceMonitor/Properties/Resources.Designer.cs

@@ -100,6 +100,16 @@ namespace UAS_DeviceMonitor.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap network_offline {
+            get {
+                object obj = ResourceManager.GetObject("network_offline", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 3 - 0
UAS_DeviceMonitor/Properties/Resources.resx

@@ -145,4 +145,7 @@
   <data name="devicecontrol" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\devicecontrol.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="network_offline" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\network-offline.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

BIN
UAS_DeviceMonitor/Resources/network-offline.png


+ 1 - 0
UAS_DeviceMonitor/UAS_DeviceMonitor.csproj

@@ -195,6 +195,7 @@
     <None Include="Resources\close_24px_1069872_easyicon.net.png" />
     <None Include="Resources\check_16px_1137507_easyicon.net.png" />
     <None Include="Resources\devicecontrol.png" />
+    <None Include="Resources\network-offline.png" />
     <Content Include="Tool\Oracle.ManagedDataAccess.dll" />
   </ItemGroup>
   <ItemGroup>