示例#1
0
        private void PostRefreshSectionGridViewMessage()
        {
            string szHandle = IniHelper.IniReadValue("System", paths.SecetionHandle, paths.HandlePath);

            if (szHandle.Length > 0)
            {
                int    nHandle = int.Parse(szHandle);
                IntPtr pHandle = new IntPtr(nHandle);
                CWinMsgAPI.PostMessage(pHandle, CMessage.WM_ONREFRESH_SECTIONGRIDVIEW, 0, 0);
            }
        }
示例#2
0
        private void PostRefreshMessage()
        {
            string szHandle = IniHelper.IniReadValue("System", paths.SiteControlHandle, paths.HandlePath);

            if (szHandle.Length > 0)
            {
                int    nHandle = int.Parse(szHandle);
                IntPtr pHandle = new IntPtr(nHandle);
                CWinMsgAPI.PostMessage(pHandle, CMessage.WM_ONREFRESH_SITEGRIDVIEW, 0, 0);
            }
        }
示例#3
0
        private void PostInitializeMessage()
        {
            string szHandle = IniHelper.IniReadValue("System", paths.SecetionHandle, paths.HandlePath);

            if (szHandle.Length > 0)
            {
                int    nHandle = int.Parse(szHandle);
                IntPtr pHandle = new IntPtr(nHandle);
                CWinMsgAPI.PostMessage(pHandle, CMessage.WM_ONINIT_REGFORM, 0, 0);
            }
        }
示例#4
0
        private void PostShowRegFormMessage()
        {
            string szHandle = IniHelper.IniReadValue("System", paths.SecetionHandle, paths.HandlePath);

            if (szHandle.Length > 0)
            {
                int    wParam  = Marshal.StringToBSTR(ID).ToInt32();
                int    nHandle = int.Parse(szHandle);
                IntPtr pHandle = new IntPtr(nHandle);
                CWinMsgAPI.PostMessage(pHandle, CMessage.WM_ONSHOW_REGFORM, wParam, 0);
            }
        }
示例#5
0
        private void PostHideLiftControlMessage()
        {
            HadMeasure = todo[SectionAlarmLevel];
            string szHandle = IniHelper.IniReadValue("System", paths.SecetionHandle, paths.HandlePath);

            if (szHandle.Length > 0)
            {
                int    wParam  = Marshal.StringToBSTR(ID).ToInt32();
                int    nHandle = int.Parse(szHandle);
                IntPtr pHandle = new IntPtr(nHandle);
                CWinMsgAPI.PostMessage(pHandle, CMessage.WM_ONHIDDEN_OPENNOTIFYCONTROL, wParam, 0);
            }
        }
        private void UITrackOpenNofityControl_Load(object sender, EventArgs e)
        {
            IniHelper.IniWriteValue("System", paths.PersonHandle, this.Handle.ToInt32().ToString(), paths.HandlePath);
            string person = CINIFile.IniReadValue("基本信息", "当前值班负责人", paths.baseInfoPath);

            if (string.IsNullOrEmpty(person))
            {
                string szHandle = IniHelper.IniReadValue("System", paths.MainHandle, paths.HandlePath);
                if (szHandle.Length > 0)
                {
                    int    nHandle = int.Parse(szHandle);
                    IntPtr pHandle = new IntPtr(nHandle);
                    CWinMsgAPI.PostMessage(pHandle, CMessage.WM_ONADD_PERSON, 0, 0);
                }
            }
            else
            {
                lbName.Text = person;
            }
        }
示例#7
0
        private void m_pRadioPersonGroup_SelectedIndexChanged(object sender, EventArgs e)
        {
            RadioGroup rgp  = (RadioGroup)sender;
            string     name = rgp.Properties.Items[rgp.SelectedIndex].Description;


            CINIFile.IniWriteValue("基本信息", "当前值班负责人", name, paths.baseInfoPath);
            string szHandle = IniHelper.IniReadValue("System", paths.PersonHandle, paths.HandlePath);

            if (szHandle.Length > 0)
            {
                int    nHandle = int.Parse(szHandle);
                IntPtr pHandle = new IntPtr(nHandle);
                CWinMsgAPI.PostMessage(pHandle, CMessage.WM_ONMODIFY_PERSON, 0, 0);
            }
            if (OnChangePerson != null)
            {
                OnChangePerson(name);
            }
        }