lu
2025-11-08 ab6b5aaa9c12693003410e1b836d466340793c21
过站提示
已修改5个文件
122 ■■■■ 文件已修改
DevApp/Gs.DevApp/App.config 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/Toast.Designer.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/Toast.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/XtraForm1.Designer.cs 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/XtraForm1.cs 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/App.config
@@ -37,8 +37,8 @@
    <appSettings>
        <!--<add key="webapiurl" value="http://localhost:5263/" />-->
        <!--<add key="WebApiUrl" value="http://192.168.1.145:8081/" />-->
        <add key="WebApiUrl" value="http://192.168.1.145:81/" />
        <add key="WebApiUrl" value="http://192.168.1.145:8081/" />
        <!--<add key="WebApiUrl" value="http://192.168.1.145:81/" />-->
        <add key="LogPath" value="logs" />
        <add key="ProductName" value="G-MES V2.0" />
        <add key="PageSize" value="50" />
DevApp/Gs.DevApp/UserControl/Toast.Designer.cs
@@ -47,7 +47,7 @@
            this.Appearance.Options.UseBackColor = true;
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(730, 172);
            this.ClientSize = new System.Drawing.Size(298, 260);
            this.ControlBox = false;
            this.Controls.Add(this.lbMsg);
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
DevApp/Gs.DevApp/UserControl/Toast.cs
@@ -19,10 +19,24 @@
        public Toast(int it, string messageText, int vanishingSeconds = 5)
        {
            InitializeComponent();
            messageText=messageText.Replace("@n", "\r\n");
            this.StartPosition = FormStartPosition.CenterScreen; // 设置窗体居中显示
            this.AutoScaleMode = AutoScaleMode.Font; // 根据系统字体大小
            int clientWidth=0;
            int clientHeight = 0;
            this.lbMsg.BackColor = System.Drawing.Color.Firebrick;
            this.lbMsg.Font = new System.Drawing.Font("Tahoma", 38F);
            this.lbMsg.ForeColor = System.Drawing.Color.White;
            messageText = messageText.Replace("@n", "\r\n");
            using (Graphics graphics = this.CreateGraphics())
            {
                Size textSize = TextRenderer.MeasureText(messageText, lbMsg.Font);
                clientWidth = (int)textSize.Width;
                clientHeight= (int)textSize.Height+10;
            }
            this.ClientSize = new System.Drawing.Size(clientWidth, clientHeight);
            this.StartPosition = FormStartPosition.CenterScreen; // 设置窗体居中显示
            this.AutoScaleMode = AutoScaleMode.Font; // 根据系统字体大小
            this.CenterToScreen();
            try
            {
                string _vanishingSeconds = ConfigurationManager.AppSettings["ToastSeconds"];
@@ -70,6 +84,6 @@
            tmr2.Interval = (int)TimeSpan.FromMilliseconds(50).TotalMilliseconds;
            tmr2.Start();
        }
    }
}
DevApp/Gs.DevApp/XtraForm1.Designer.cs
@@ -35,12 +35,16 @@
            this.label1 = new System.Windows.Forms.Label();
            this.txt_slaveAddress = new DevExpress.XtraEditors.ComboBoxEdit();
            this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
            this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton();
            this.button1 = new System.Windows.Forms.Button();
            this.btnEdit = new DevExpress.XtraEditors.ButtonEdit();
            this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
            this.labelControl2 = new DevExpress.XtraEditors.LabelControl();
            this.txtGWM = new DevExpress.XtraEditors.TextEdit();
            this.simpleButton3 = new DevExpress.XtraEditors.SimpleButton();
            this.simpleButton4 = new DevExpress.XtraEditors.SimpleButton();
            this.simpleButton5 = new DevExpress.XtraEditors.SimpleButton();
            this.simpleButton6 = new DevExpress.XtraEditors.SimpleButton();
            this.simpleButton7 = new DevExpress.XtraEditors.SimpleButton();
            ((System.ComponentModel.ISupportInitialize)(this.txtGs.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_slaveAddress.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
@@ -61,9 +65,9 @@
            // richTextBox1
            // 
            this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.richTextBox1.Location = new System.Drawing.Point(0, 120);
            this.richTextBox1.Location = new System.Drawing.Point(0, 365);
            this.richTextBox1.Name = "richTextBox1";
            this.richTextBox1.Size = new System.Drawing.Size(887, 539);
            this.richTextBox1.Size = new System.Drawing.Size(887, 294);
            this.richTextBox1.TabIndex = 2;
            this.richTextBox1.Text = "";
            // 
@@ -115,6 +119,10 @@
            // 
            // panelControl1
            // 
            this.panelControl1.Controls.Add(this.simpleButton7);
            this.panelControl1.Controls.Add(this.simpleButton6);
            this.panelControl1.Controls.Add(this.simpleButton5);
            this.panelControl1.Controls.Add(this.simpleButton4);
            this.panelControl1.Controls.Add(this.simpleButton3);
            this.panelControl1.Controls.Add(this.button1);
            this.panelControl1.Controls.Add(this.btnEdit);
@@ -129,8 +137,17 @@
            this.panelControl1.Dock = System.Windows.Forms.DockStyle.Top;
            this.panelControl1.Location = new System.Drawing.Point(0, 0);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new System.Drawing.Size(887, 120);
            this.panelControl1.Size = new System.Drawing.Size(887, 365);
            this.panelControl1.TabIndex = 7;
            //
            // simpleButton3
            //
            this.simpleButton3.Location = new System.Drawing.Point(475, 6);
            this.simpleButton3.Name = "simpleButton3";
            this.simpleButton3.Size = new System.Drawing.Size(94, 29);
            this.simpleButton3.TabIndex = 12;
            this.simpleButton3.Text = "simpleButton3";
            this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click);
            // 
            // button1
            // 
@@ -176,14 +193,41 @@
            this.txtGWM.Size = new System.Drawing.Size(183, 24);
            this.txtGWM.TabIndex = 7;
            // 
            // simpleButton3
            // simpleButton4
            // 
            this.simpleButton3.Location = new System.Drawing.Point(475, 6);
            this.simpleButton3.Name = "simpleButton3";
            this.simpleButton3.Size = new System.Drawing.Size(94, 29);
            this.simpleButton3.TabIndex = 12;
            this.simpleButton3.Text = "simpleButton3";
            this.simpleButton3.Click += new System.EventHandler(this.simpleButton3_Click);
            this.simpleButton4.Location = new System.Drawing.Point(57, 179);
            this.simpleButton4.Name = "simpleButton4";
            this.simpleButton4.Size = new System.Drawing.Size(202, 29);
            this.simpleButton4.TabIndex = 13;
            this.simpleButton4.Text = "不良原因不能为空!";
            this.simpleButton4.Click += new System.EventHandler(this.simpleButton4_Click);
            //
            // simpleButton5
            //
            this.simpleButton5.Location = new System.Drawing.Point(57, 227);
            this.simpleButton5.Name = "simpleButton5";
            this.simpleButton5.Size = new System.Drawing.Size(202, 29);
            this.simpleButton5.TabIndex = 14;
            this.simpleButton5.Text = "操作失败@n请先扫描工位码";
            this.simpleButton5.Click += new System.EventHandler(this.simpleButton5_Click);
            //
            // simpleButton6
            //
            this.simpleButton6.Location = new System.Drawing.Point(57, 283);
            this.simpleButton6.Name = "simpleButton6";
            this.simpleButton6.Size = new System.Drawing.Size(337, 29);
            this.simpleButton6.TabIndex = 15;
            this.simpleButton6.Text = "请重新操作@n已帮你切换到【良品明细】";
            this.simpleButton6.Click += new System.EventHandler(this.simpleButton6_Click);
            //
            // simpleButton7
            //
            this.simpleButton7.Location = new System.Drawing.Point(57, 318);
            this.simpleButton7.Name = "simpleButton7";
            this.simpleButton7.Size = new System.Drawing.Size(337, 29);
            this.simpleButton7.TabIndex = 16;
            this.simpleButton7.Text = "操作失败@n请先选择追溯码";
            this.simpleButton7.Click += new System.EventHandler(this.simpleButton7_Click);
            // 
            // XtraForm1
            // 
@@ -219,5 +263,9 @@
        private DevExpress.XtraEditors.ButtonEdit btnEdit;
        private System.Windows.Forms.Button button1;
        private DevExpress.XtraEditors.SimpleButton simpleButton3;
        private DevExpress.XtraEditors.SimpleButton simpleButton4;
        private DevExpress.XtraEditors.SimpleButton simpleButton5;
        private DevExpress.XtraEditors.SimpleButton simpleButton6;
        private DevExpress.XtraEditors.SimpleButton simpleButton7;
    }
}
DevApp/Gs.DevApp/XtraForm1.cs
@@ -355,5 +355,33 @@
            throw new Exception(ziDuan + "不是合法的日期类型!");
        }
        private void simpleButton4_Click(object sender, EventArgs e)
        {
            Toast vm = new Toast(0, simpleButton4.Text);
            vm.Show();
            return;
        }
        private void simpleButton5_Click(object sender, EventArgs e)
        {
            Toast vm = new Toast(0, simpleButton5.Text);
            vm.Show();
            return;
        }
        private void simpleButton6_Click(object sender, EventArgs e)
        {
            Toast vm = new Toast(0, simpleButton6.Text);
            vm.Show();
            return;
        }
        private void simpleButton7_Click(object sender, EventArgs e)
        {
            Toast vm = new Toast(0, simpleButton7.Text);
            vm.Show();
            return;
        }
    }
}