천호석
2022-06-17 4de9ea98e13449174aa2cd09c8351fc0e978f44a
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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 log4net;
using log4net.Appender;
using log4net.Layout;
using log4net.Repository.Hierarchy;
 
namespace SHARP_CLAS_UI
{
    public partial class Interlock_View : Form
    {
        #region Property
        public string Interlock_Message
        {
            get
            {
                return lb_Interlock_Message.Text;
            }
            set
            {
                lb_Interlock_Message.Text = value;
            }
        }
 
        public string Interlock_Discription
        {
            get
            {
                return lb_Interlock_Discription.Text;
            }
            set
            {
                lb_Interlock_Discription.Text = value;
            }
        }
 
        #endregion
 
        #region Field
        Form_Frame _Parent;
        #endregion
 
        public Interlock_View(Form_Frame _Parent)
        {
            InitializeComponent();
 
            this._Parent = _Parent;
        }
 
        private void btn_Check_Click(object sender, EventArgs e)
        {
            _Parent._equip.Board_Control.IO_manager.Set_Output(OutputData.Buzzer_1_Relay, false);
            this.Hide();
        }
 
        private void Interlock_View_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (!_Parent.IsDisposed)
            {
                e.Cancel = true;
 
                this.Hide();
            }
        }
    }
 
    public struct Interlock_Msg
    {
        public string Interlock_Message { get; set; }
        public string Interlock_Discription { get; set; }
    }
 
    public class Interlock_Manager
    {
        public static Queue<Interlock_Msg> Interlock_Msgs = new Queue<Interlock_Msg>();
 
        public static void Add_Interlock_Msg(string Interlock_Message, string Interlock_Discription = "")
        {
            Interlock_Msgs.Enqueue(new Interlock_Msg { Interlock_Message = Interlock_Message, Interlock_Discription = Interlock_Discription });
        }
    }
}