M182轴承端盖外观缺陷AOI
kingno
2025-05-26 5a405c7dce20d8c79a733c9c786cc42eb59fe81c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using Bro.Common.Helper;
using Bro.UI.Model.Winform;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Windows.UI.Composition.Interactions;
 
namespace Bro.M141.Process.UI
{
    [MenuNode("State", "设备生产模式", 1, EnumHelper.TopMenu.SystemInfo, MenuNodeType.Form)]
 
    //public partial class State : UserControl
    public partial class State : MenuFormBase
    {
        public State()
        {
            InitializeComponent();
        }
 
        M141Process M141Process => Process as M141Process;
        public override void OnProcessUpdated()
        {
            base.OnProcessUpdated();
            M141Process.RefreshState += changestate;
        }
 
 
        private void PLCstate_Load(object sender, EventArgs e)
        {
 
 
        }
 
        public void changestate(string state)
        {
            this.Invoke(new Action(() =>
            {
                comboBox1.Text = state;
            }));
        }
 
 
 
        private void comboBox1_TextChanged(object sender, EventArgs e)
        {
            if (comboBox1.Text.Contains("正常"))
            {
                M141Process.wirtePLC(3027, 0);
                M141Process.wirtePLC(3028, 0);
            }
            else if (comboBox1.Text.Contains("调试"))
            {
                M141Process.wirtePLC(3027, 1);
            }
            else
            {
                M141Process.wirtePLC(3028, 1);
            }
 
        }
    }
}