lu
2025-05-21 d1fde218cd82d4e64f8e15accbafa11ed1efd780
称重
已修改9个文件
211 ■■■■ 文件已修改
DevApp/Gs.DevApp/App.config 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/FrmLogin.Designer.cs 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/FrmLogin.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs 71 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Program.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Properties/Settings.Designer.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Properties/Settings.settings 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/App.config
@@ -35,7 +35,6 @@
        <add key="PageSize" value="50" />
        <add key="Version" value="0.1" />
        <add key="IsAutoUpdater" value="0" />
        <add key="IsWeight" value="1" />
        <add key="AutoUpdaterXml" value="http://192.168.1.145:86/AutoUpdater/AutoUpdater.xml" />
    </appSettings>
    <userSettings>
@@ -52,6 +51,9 @@
            <setting name="fontSizeName" serializeAs="String">
                <value>宋体,10</value>
            </setting>
            <setting name="isWeight" serializeAs="String">
                <value>False</value>
            </setting>
        </Gs.DevApp.Properties.Settings>
    </userSettings>
    <system.web>
DevApp/Gs.DevApp/DevFrm/FrmLogin.Designer.cs
@@ -46,12 +46,14 @@
            this.btnLogin = new DevExpress.XtraEditors.SimpleButton();
            this.txtUser = new DevExpress.XtraEditors.TextEdit();
            this.txtPwd = new DevExpress.XtraEditors.TextEdit();
            this.ckWeight = new DevExpress.XtraEditors.CheckEdit();
            this.Root = new DevExpress.XtraLayout.LayoutControlGroup();
            this.layoutControlItem1 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem3 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem6 = new DevExpress.XtraLayout.LayoutControlItem();
            this.panelLog = new System.Windows.Forms.Panel();
            this.table1.SuspendLayout();
            this.panel1.SuspendLayout();
@@ -60,12 +62,14 @@
            ((System.ComponentModel.ISupportInitialize)(this.ckRemember.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtUser.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtPwd.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.ckWeight.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.Root)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).BeginInit();
            this.SuspendLayout();
            // 
            // lbVersion
@@ -115,6 +119,7 @@
            this.lay1.Controls.Add(this.btnLogin);
            this.lay1.Controls.Add(this.txtUser);
            this.lay1.Controls.Add(this.txtPwd);
            this.lay1.Controls.Add(this.ckWeight);
            this.lay1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.lay1.Location = new System.Drawing.Point(0, 0);
            this.lay1.Name = "lay1";
@@ -148,7 +153,7 @@
            this.ckRemember.Properties.Appearance.Options.UseForeColor = true;
            this.ckRemember.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.UltraFlat;
            this.ckRemember.Properties.Caption = "保存登录信息";
            this.ckRemember.Size = new System.Drawing.Size(351, 26);
            this.ckRemember.Size = new System.Drawing.Size(173, 26);
            this.ckRemember.StyleController = this.lay1;
            this.ckRemember.TabIndex = 17;
            // 
@@ -191,6 +196,16 @@
            this.txtPwd.StyleController = this.lay1;
            this.txtPwd.TabIndex = 22;
            // 
            // ckWeight
            //
            this.ckWeight.Location = new System.Drawing.Point(189, 106);
            this.ckWeight.Name = "ckWeight";
            this.ckWeight.Properties.Caption = "仅称重模式";
            this.ckWeight.Properties.ContentAlignment = DevExpress.Utils.HorzAlignment.Far;
            this.ckWeight.Size = new System.Drawing.Size(174, 24);
            this.ckWeight.StyleController = this.lay1;
            this.ckWeight.TabIndex = 23;
            //
            // Root
            // 
            this.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.True;
@@ -200,7 +215,8 @@
            this.layoutControlItem2,
            this.layoutControlItem3,
            this.layoutControlItem4,
            this.layoutControlItem5});
            this.layoutControlItem5,
            this.layoutControlItem6});
            this.Root.LayoutMode = DevExpress.XtraLayout.Utils.LayoutMode.Table;
            this.Root.Name = "Root";
            columnDefinition1.SizeType = System.Windows.Forms.SizeType.Percent;
@@ -255,9 +271,8 @@
            this.layoutControlItem3.Control = this.ckRemember;
            this.layoutControlItem3.Location = new System.Drawing.Point(0, 94);
            this.layoutControlItem3.Name = "layoutControlItem3";
            this.layoutControlItem3.OptionsTableLayoutItem.ColumnSpan = 2;
            this.layoutControlItem3.OptionsTableLayoutItem.RowIndex = 2;
            this.layoutControlItem3.Size = new System.Drawing.Size(355, 47);
            this.layoutControlItem3.Size = new System.Drawing.Size(177, 47);
            this.layoutControlItem3.Text = "保存密码";
            this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem3.TextVisible = false;
@@ -292,6 +307,19 @@
            this.layoutControlItem5.Text = "取消";
            this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem5.TextVisible = false;
            //
            // layoutControlItem6
            //
            this.layoutControlItem6.ContentHorzAlignment = DevExpress.Utils.HorzAlignment.Far;
            this.layoutControlItem6.Control = this.ckWeight;
            this.layoutControlItem6.Location = new System.Drawing.Point(177, 94);
            this.layoutControlItem6.Name = "layoutControlItem6";
            this.layoutControlItem6.OptionsTableLayoutItem.ColumnIndex = 1;
            this.layoutControlItem6.OptionsTableLayoutItem.RowIndex = 2;
            this.layoutControlItem6.Size = new System.Drawing.Size(178, 47);
            this.layoutControlItem6.Text = "称重模式";
            this.layoutControlItem6.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem6.TextVisible = false;
            // 
            // panelLog
            // 
@@ -328,12 +356,14 @@
            ((System.ComponentModel.ISupportInitialize)(this.ckRemember.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtUser.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtPwd.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.ckWeight.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.Root)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem6)).EndInit();
            this.ResumeLayout(false);
        }
@@ -355,5 +385,7 @@
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
        private System.Windows.Forms.Panel panelLog;
        private DevExpress.XtraEditors.CheckEdit ckWeight;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem6;
    }
}
DevApp/Gs.DevApp/DevFrm/FrmLogin.cs
@@ -1,6 +1,5 @@
using AutoUpdaterDotNET;
using DevExpress.XtraEditors;
using DevExpress.XtraRichEdit.Export.Rtf;
using Gs.DevApp.Entity;
using Gs.DevApp.Properties;
using Gs.DevApp.ToolBox;
@@ -35,7 +34,7 @@
            _getRemember();
            btnLogin.Click += BtnLogin_Click;
            btnCancel.Click += BtnCancel_Click;
            lbVersion.Text = _productName+ ",版本(" + _version + ")" + ",使用字体(" + _strFont + ")"+",服务地址("+ _webApiUrl + ")";
            lbVersion.Text = _productName + ",版本(" + _version + ")" + ",使用字体(" + _strFont + ")" + ",服务地址(" + _webApiUrl + ")";
        }
        private void BtnCancel_Click(object sender, EventArgs e)
@@ -75,6 +74,7 @@
                    Settings.Default.userName = ckRemember.Checked ? txtUser.Text.Trim() : "";
                    Settings.Default.userPwd = ckRemember.Checked ? txtPwd.Text.Trim() : "";
                    Settings.Default.remember = ckRemember.Checked;
                    Settings.Default.isWeight = ckWeight.Checked;
                    Settings.Default.Save();
                    LoginInfoModel.CurrentUser.LoginUserGuid = _login["loginGuid"].ToString();
                    LoginInfoModel.CurrentUser.LoginTime = DateTime.Now.ToString("yyyy-MM-dd hh:mm");
@@ -100,17 +100,16 @@
        {
            try
            {
                if (Settings.Default.remember)
                {
                    txtUser.Text = Settings.Default.userName;
                    txtPwd.Text = Settings.Default.userPwd;
                    ckRemember.Checked = true;
                }
                txtUser.Text = Settings.Default.userName;
                txtPwd.Text = Settings.Default.userPwd;
                ckRemember.Checked = Settings.Default.remember;
                ckWeight.Checked = Settings.Default.isWeight;
            }
            catch (Exception ex)
            {
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
        /// 读取字体
DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.Designer.cs
@@ -52,7 +52,6 @@
            this.layoutControlItem7 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem9 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem4 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            this.gcMx1 = new DevExpress.XtraGrid.GridControl();
            this.gvMx1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
@@ -67,6 +66,9 @@
            this.gridColumn11 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn12 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.txtMsg = new DevExpress.XtraEditors.LabelControl();
            this.layoutControlItem5 = new DevExpress.XtraLayout.LayoutControlItem();
            this.layoutControlItem2 = new DevExpress.XtraLayout.LayoutControlItem();
            ((System.ComponentModel.ISupportInitialize)(this.split1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.split1.Panel1)).BeginInit();
            this.split1.Panel1.SuspendLayout();
@@ -89,9 +91,10 @@
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).BeginInit();
            this.SuspendLayout();
            // 
            // split1
@@ -116,6 +119,7 @@
            // 
            // layoutMx1
            // 
            this.layoutMx1.Controls.Add(this.txtMsg);
            this.layoutMx1.Controls.Add(this.comLine);
            this.layoutMx1.Controls.Add(this.btnStart);
            this.layoutMx1.Controls.Add(this.cmbSerialPortNum);
@@ -125,6 +129,8 @@
            this.layoutMx1.Controls.Add(this.comStopBits);
            this.layoutMx1.Controls.Add(this.comParity);
            this.layoutMx1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.layoutMx1.HiddenItems.AddRange(new DevExpress.XtraLayout.BaseLayoutItem[] {
            this.layoutControlItem5});
            this.layoutMx1.Location = new System.Drawing.Point(0, 0);
            this.layoutMx1.Name = "layoutMx1";
            this.layoutMx1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = new System.Drawing.Rectangle(310, 455, 812, 500);
@@ -146,7 +152,7 @@
            this.btnStart.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Question;
            this.btnStart.Appearance.Options.UseBackColor = true;
            this.btnStart.Appearance.Options.UseFont = true;
            this.btnStart.Location = new System.Drawing.Point(512, 74);
            this.btnStart.Location = new System.Drawing.Point(512, 12);
            this.btnStart.Name = "btnStart";
            this.btnStart.Size = new System.Drawing.Size(246, 27);
            this.btnStart.StyleController = this.layoutMx1;
@@ -187,7 +193,7 @@
            // 
            // txtNum
            // 
            this.txtNum.Location = new System.Drawing.Point(594, 22);
            this.txtNum.Location = new System.Drawing.Point(594, 53);
            this.txtNum.Name = "txtNum";
            this.txtNum.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 15F);
            this.txtNum.Properties.Appearance.Options.UseFont = true;
@@ -353,28 +359,14 @@
            this.layoutControlItem4.AppearanceItemCaption.Options.UseFont = true;
            this.layoutControlItem4.ContentVertAlignment = DevExpress.Utils.VertAlignment.Center;
            this.layoutControlItem4.Control = this.txtNum;
            this.layoutControlItem4.Location = new System.Drawing.Point(500, 0);
            this.layoutControlItem4.Location = new System.Drawing.Point(500, 31);
            this.layoutControlItem4.Name = "layoutControlItem4";
            this.layoutControlItem4.OptionsTableLayoutItem.ColumnIndex = 2;
            this.layoutControlItem4.OptionsTableLayoutItem.RowIndex = 1;
            this.layoutControlItem4.OptionsTableLayoutItem.RowSpan = 2;
            this.layoutControlItem4.Size = new System.Drawing.Size(499, 62);
            this.layoutControlItem4.Text = "重量";
            this.layoutControlItem4.TextSize = new System.Drawing.Size(70, 41);
            //
            // layoutControlItem2
            //
            this.layoutControlItem2.Control = this.btnStart;
            this.layoutControlItem2.Location = new System.Drawing.Point(500, 62);
            this.layoutControlItem2.MaxSize = new System.Drawing.Size(250, 31);
            this.layoutControlItem2.MinSize = new System.Drawing.Size(41, 31);
            this.layoutControlItem2.Name = "layoutControlItem2";
            this.layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 2;
            this.layoutControlItem2.OptionsTableLayoutItem.RowIndex = 2;
            this.layoutControlItem2.Size = new System.Drawing.Size(499, 31);
            this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            this.layoutControlItem2.Text = "启动";
            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem2.TextVisible = false;
            // 
            // gcMx1
            // 
@@ -525,6 +517,40 @@
            this.gridColumn13.VisibleIndex = 11;
            this.gridColumn13.Width = 94;
            // 
            // txtMsg
            //
            this.txtMsg.Location = new System.Drawing.Point(512, 12);
            this.txtMsg.Name = "txtMsg";
            this.txtMsg.Size = new System.Drawing.Size(37, 18);
            this.txtMsg.StyleController = this.layoutMx1;
            this.txtMsg.TabIndex = 15;
            this.txtMsg.Text = "lbMsg";
            //
            // layoutControlItem5
            //
            this.layoutControlItem5.Control = this.txtMsg;
            this.layoutControlItem5.Location = new System.Drawing.Point(500, 0);
            this.layoutControlItem5.Name = "layoutControlItem5";
            this.layoutControlItem5.OptionsTableLayoutItem.ColumnIndex = 2;
            this.layoutControlItem5.Size = new System.Drawing.Size(520, 29);
            this.layoutControlItem5.Text = "lbMsg";
            this.layoutControlItem5.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem5.TextVisible = false;
            //
            // layoutControlItem2
            //
            this.layoutControlItem2.Control = this.btnStart;
            this.layoutControlItem2.Location = new System.Drawing.Point(500, 0);
            this.layoutControlItem2.MaxSize = new System.Drawing.Size(250, 31);
            this.layoutControlItem2.MinSize = new System.Drawing.Size(41, 31);
            this.layoutControlItem2.Name = "layoutControlItem2";
            this.layoutControlItem2.OptionsTableLayoutItem.ColumnIndex = 2;
            this.layoutControlItem2.Size = new System.Drawing.Size(499, 31);
            this.layoutControlItem2.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
            this.layoutControlItem2.Text = "启动";
            this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
            this.layoutControlItem2.TextVisible = false;
            //
            // Frm_Work09
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -557,9 +583,10 @@
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem7)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem9)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem4)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gcMx1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvMx1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem5)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.layoutControlItem2)).EndInit();
            this.ResumeLayout(false);
        }
@@ -597,6 +624,8 @@
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem7;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem9;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem4;
        private DevExpress.XtraEditors.LabelControl txtMsg;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem5;
        private DevExpress.XtraLayout.LayoutControlItem layoutControlItem2;
    }
}
DevApp/Gs.DevApp/DevFrm/Work/Frm_Work09.cs
@@ -44,6 +44,7 @@
            GetComList();
            this.comLine.getSuppler("");
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1);
        }
        /// <summary> 
DevApp/Gs.DevApp/Program.cs
@@ -1,7 +1,9 @@
using CefSharp;
using CefSharp.WinForms;
using DevExpress.Drawing.Internal.Fonts.Interop;
using Gs.DevApp.DevFrm;
using Gs.DevApp.DevFrm.Work;
using Gs.DevApp.Properties;
using System;
using System.Configuration;
using System.Diagnostics;
@@ -52,15 +54,15 @@
                if (fmLogin.DialogResult == DialogResult.OK)
                {
                    //Application.Run(new DevFrm.User.SysMenu());
                    string IsWeight = "0";
                    bool IsWeight = false;
                    try
                    {
                        IsWeight = ConfigurationManager.AppSettings["IsWeight"];
                        IsWeight = Settings.Default.isWeight;
                    }
                    catch (Exception)
                    {
                    }
                    if (IsWeight == "1")
                    if (IsWeight == true)
                        Application.Run(new Frm_Work09());
                    else
                        Application.Run(new FrmMain());
DevApp/Gs.DevApp/Properties/Settings.Designer.cs
@@ -70,5 +70,17 @@
                this["fontSizeName"] = value;
            }
        }
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("False")]
        public bool isWeight {
            get {
                return ((bool)(this["isWeight"]));
            }
            set {
                this["isWeight"] = value;
            }
        }
    }
}
DevApp/Gs.DevApp/Properties/Settings.settings
@@ -14,5 +14,8 @@
    <Setting Name="fontSizeName" Type="System.String" Scope="User">
      <Value Profile="(Default)">宋体,10</Value>
    </Setting>
    <Setting Name="isWeight" Type="System.Boolean" Scope="User">
      <Value Profile="(Default)">False</Value>
    </Setting>
  </Settings>
</SettingsFile>
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -1796,6 +1796,7 @@
                    DataRow row = gridView1.GetDataRow(e.RowHandle);
                    if (row == null)
                        return;
                    //这是danger色
                    bool columnExists = row.Table.Columns.Contains("isRed");
                    if (columnExists == true)
                    {
@@ -1803,6 +1804,16 @@
                        if (_isRed == "1")
                        {
                            e.Appearance.ForeColor = Color.Tomato;
                        }
                    }
                    //这是success色
                    columnExists = row.Table.Columns.Contains("isSuccess");
                    if (columnExists == true)
                    {
                        string _isRed = row["isSuccess"].ToString();
                        if (_isRed == "1")
                        {
                            e.Appearance.ForeColor = Color.FromArgb(128, 255, 128);
                        }
                    }
                    // 设置焦点行的背景色
@@ -2004,6 +2015,52 @@
                    }
                }
            };
            gridView1.RowStyle += (s, e) =>
            {
                //默认选中行不变色
                gridView1.OptionsSelection.EnableAppearanceFocusedRow = false;
                //默认选中单元格不变色
                gridView1.OptionsSelection.EnableAppearanceFocusedCell = false;
                if (e.RowHandle >= 0)
                {
                    DataRow row = gridView1.GetDataRow(e.RowHandle);
                    if (row == null)
                        return;
                    //这是danger色
                    bool columnExists = row.Table.Columns.Contains("isRed");
                    if (columnExists == true)
                    {
                        string _isRed = row["isRed"].ToString();
                        if (_isRed == "1")
                        {
                            e.Appearance.ForeColor = Color.Tomato;
                        }
                    }
                    //这是success色
                    columnExists = row.Table.Columns.Contains("isSuccess");
                    if (columnExists == true)
                    {
                        string _isRed = row["isSuccess"].ToString();
                        if (_isRed == "1")
                        {
                            e.Appearance.ForeColor = Color.FromArgb(128, 255, 128);
                        }
                    }
                    // 设置焦点行的背景色
                    if (gridView1.GetRow(e.RowHandle) == gridView1.GetFocusedRow())
                    {
                        e.Appearance.BackColor = Color.Azure;
                        e.Appearance.BackColor2 = Color.LightSkyBlue;
                    }
                    //else if (gridView1.IsRowHotTracked(e.RowHandle))
                    //{
                    //    // 设置鼠标悬停行的背景色
                    //    e.Appearance.BackColor = Color.LightBlue;
                    //    e.Appearance.BackColor2 = Color.LightBlue;
                    //}
                }
            };
        }
        #endregion