コード例 #1
0
        static void ReportAlarmInfoThread(object obj)
        {
            Hashtable data = obj as Hashtable;

            if (data.Contains("TYPE") && data.Contains("AlarmID"))
            {
                string Status   = (string)data["TYPE"];
                int    nAlarmID = (int)data["AlarmID"];

                AlarmInfo AlaInfo = new AlarmInfo(nAlarmID);

                AlaInfo.ServerWarningID = PostSever.PostWarningData(nAlarmID);

                string stDBid = DatabaseHandle.RecordAlarmToDB(AlaInfo);

                if (!string.IsNullOrEmpty(stDBid))
                {
                    AlarmDetailForm dlg = new AlarmDetailForm(stDBid, 1)
                    {
                        StartPosition = FormStartPosition.CenterParent
                    };
                    dlg.ShowDialog();

                    dlg.Dispose();
                }
            }
        }
コード例 #2
0
        public static void StopThread()
        {
            bool ret = PostSever.PostRunningData(3, m_shift, 0);

            DatabaseHandle.RecordStopToDB(ret);
            Runningdlg.Dispose();
            Consumabledlg1.Dispose();
            Alarmdlg.Dispose();
        }
コード例 #3
0
        static void UpdateRunningDataThread(object obj)
        {
            Hashtable data = obj as Hashtable;

            if (data.Contains("TYPE") && data.Contains("Count"))
            {
                string Status       = (string)data["TYPE"];
                int    ProduceCount = (int)data["Count"];
                DatabaseHandle.RecordProduceToDB(ProduceCount);
            }
        }
コード例 #4
0
        private static void StartThread(object obj)
        {
            string shift = obj as string;

            DatabaseHandle.CreateTable();
            bool ret = PostSever.PostRunningData(1, shift, 0);

            DatabaseHandle.RecordStartToDB(ret);
            Runningdlg.ThreadStart();
            Consumabledlg1.ThreadStart();
            Alarmdlg.ThreadStart();
        }