コード例 #1
0
        private void listView1_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            if (listView1.SelectedItems.Count > 0)
            {
                string empid = listView1.SelectedItems[0].Name;
                string empname = listView1.SelectedItems[0].Text;
                string time = listView1.SelectedItems[0].ToolTipText.Substring(listView1.SelectedItems[0].ToolTipText.IndexOf("入井时间:") + 5);
                //if (HisRouteFrm == null)
                //{
                //    HisRouteFrm = new A_FrmDCfgRealTime();
                //    HisRouteFrm.Show(DockPnl, DockState.Document);
                //    HisRouteFrm.PlayHisRoute(empid, empname, time);
                //}
                //else
                //{
                //    if(HisRouteFrm.DockState == DockState.Unknown)
                //    {
                //HisRouteFrm.Close();
                //HisRouteFrm.Dispose();
                //HisRouteFrm = new A_FrmDCfgRealTime();
                //HisRouteFrm.Show(DockPnl, DockState.Document);
                //HisRouteFrm.PlayHisRoute(empid, empname, time);
                //    }
                //    HisRouteFrm.Activate();
                //    HisRouteFrm.PlayHisRoute(empid, empname, time);
                //}
                if (HisRouteFrm == null)
                {
                    HisRouteFrm = new A_FrmDCfgRealTime();
                    HisRouteFrm.Show(DockPnl, DockState.Document);
                    HisRouteFrm.PlayHisRoute(empid, empname, time);
                }
                else
                {
                    try
                    {
                        HisRouteFrm.Close();
                        //HisRouteFrm.Dispose();
                        HisRouteFrm = new A_FrmDCfgRealTime();
                        HisRouteFrm.Show(DockPnl, DockState.Document);
                        HisRouteFrm.PlayHisRoute(empid, empname, time);
                    }
                    catch (Exception ex)
                    {

                    }
                }
            }
        }
コード例 #2
0
ファイル: A_FrmMain.cs プロジェクト: ZoeCheck/128_5.6_2010
        private void tsbtnGHis_Click(object sender, EventArgs e)
        {
            if (Searcher.FindFormByName("A_FrmDCfgRealTime"))
            {
                return;
            }
            ILogger.Write(EnumLogType.OperateLog, strLogPath + DateTime.Now.ToString("yyyy-MM-dd") + ".xml", LoginBLL.user, "打开图形图层系统菜单");

            KJ128NMainRun.Graphics.DPic.A_FrmDCfgRealTime frmE = new KJ128NMainRun.Graphics.DPic.A_FrmDCfgRealTime(3);
            frmE.Show(dockPanel1, DockState.Document);
        }