using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using SystemFramework; namespace MisDataName { public delegate void MainAct(); public delegate void PlcChangeEvent(OpcData.CustomeEvetnArgs obj1); public delegate void SyncOtherForm(object obj); public delegate object QueryFormData(object obj); public partial class MisData { public static MainAct MainFormLock,MainFormUnlock,SecondFormClose,MainActived, OtherFormHide,OtherFormShow; public static SyncOtherForm SyncSecondForm,MainFormActive; //private void InitializeComponent() //{ // this.SuspendLayout(); // // // // MisData // // // this.ClientSize = new System.Drawing.Size(941, 472); // this.Name = "MisData"; // this.ResumeLayout(false); //} public static QueryFormData QueryMainFormPosition; public void LockMainForm() { this.Hide(); notifyIcon_MIS.Visible = false; } public void UnLockForm() { notifyIcon_MIS.Visible = true ; this.Show(); this.WindowState = FormWindowState.Normal; this.Activate(); } public static PlcChangeEvent PlcChange; void ExcutePlcChange(OpcData.CustomeEvetnArgs obj) { try { if (PlcChange != null) { PlcChange(obj); } } catch (Exception err) { ApplicationLog.WriteLog(err, err.Message); } } } }