Exemplo n.º 1
0
 public void setHisForm(HistoryDataForm historyForm)
 {
     m_historyForm = historyForm;
 }
Exemplo n.º 2
0
        private void btn_OK_Click(object sender, EventArgs e)
        {
            //this.Hide();
            if (listBox1.SelectedItem == null)
            {
                MessageBox.Show("请选择一个数据源!");
                this.Show();
                return;
            }

            if (m_bIsHistory)
            {
                int iDrillID = 0;
                foreach (Form frm in Application.OpenForms)
                {
                    if (frm is HistoryDataForm)
                    {
                        HistoryDataForm history = (HistoryDataForm)frm;
                        iDrillID = IDlist[listBox1.SelectedIndex + 1];
                        history.selectHisDrill(iDrillID);
                        frm.BringToFront();
                        frm.WindowState = FormWindowState.Normal;
                        this.Hide();
                        this.Close();
                        return;
                    }
                }

                HistoryDataForm hisForm = new HistoryDataForm();
                hisForm.setHistoryValue(hisForm);
                hisForm.setBtnEnable(hisForm, false);
                iDrillID = IDlist[listBox1.SelectedIndex + 1];
                hisForm.selectHisDrill(iDrillID);
                hisForm.Size = new System.Drawing.Size(1920, 1080);
                hisForm.Tag  = -1;
                hisForm.Show();
            }
            else
            {
                //AppDrill.DrillID = IDlist[listBox1.SelectedIndex + 1];
                //foreach (Form frm in Application.OpenForms)
                //{
                //    if (Convert.ToInt16(frm.Tag) == AppDrill.DrillID)
                //    {
                //        frm.BringToFront();
                //        frm.WindowState = FormWindowState.Normal;
                //        DrillForm drillForm = (DrillForm)frm;

                //        if (null != drillForm)
                //        {
                //            //changeVideo(drillForm.getContractor(), AppDrill.DrillID);
                //            sendMessgeToVideoProcess(drillForm.getContractor(), AppDrill.DrillID);
                //        }

                //        this.Hide();
                //        this.Close();
                //        return;
                //    }
                //}

                //this.Hide();
                //DrillForm drill = new DrillForm();
                //drill.Size = new System.Drawing.Size(1920, 1080);
                //drill.Location = new Point(0, 0);
                //drill.Tag = AppDrill.DrillID;
                //drill.m_iDrillID = AppDrill.DrillID;
                //drill.setDrillID(AppDrill.DrillID);
                //drill.Show();
                ////changeVideo(drill.getContractor(), AppDrill.DrillID);
                //sendMessgeToVideoProcess(drill.getContractor(), AppDrill.DrillID);

                //0416修改, 此界面用于对分屏钻井界面的设置
                ((LoginForm)Application.OpenForms["LoginForm"]).timer_display.Enabled = false; //停止滚动显示

                AppDrill.DrillID = IDlist[listBox1.SelectedIndex + 1];
                foreach (Form frm in Application.OpenForms)
                {
                    if (Convert.ToInt16(frm.Tag) == AppDrill.DrillID)
                    {
                        ((DrillForm)frm).temp_positon = frm.Location;
                        frm.Location = new Point(0, 0);
                        frm.BringToFront();
                    }
                }
            }

            //this.Close();
        }