예제 #1
0
 private void FrmNewDS_Shown(object sender, EventArgs e)
 {
     if (CsConst.MyEditMode == 0)
     {
     }
     else if (CsConst.MyEditMode == 1) //在线模式
     {
         MyActivePage = 1;
         tsbDown_Click(0);
         gpNetwork.Controls.Clear();
         networkinfo = new NetworkInForm(SubNetID, DevID, MyintDeviceType);
         gpNetwork.Controls.Add(networkinfo);
         networkinfo.Dock = DockStyle.Top;
     }
 }
예제 #2
0
        void SetCtrlsVisbleWithDifferentDeviceType()
        {
            if (myIPModule == null)
            {
                return;
            }

            RemoteConnection = new Connetion(SubNetID, DeviceID, mywdDevicerType);
            tabKeys.Controls.Add(RemoteConnection);
            RemoteConnection.BringToFront();
            RemoteConnection.Dock = DockStyle.Fill;

            networkinfo = new NetworkInForm(SubNetID, DeviceID, mywdDevicerType);
            panel1.Controls.Add(networkinfo);
            networkinfo.Dock = DockStyle.Top;
            networkinfo.BringToFront();

            if (IPmoduleDeviceTypeList.RFIpModuleV1.Contains(mywdDevicerType) || IPmoduleDeviceTypeList.RFIpModuleV2.Contains(mywdDevicerType))
            {
                GbRf.Visible = true;
                if (IPmoduleDeviceTypeList.RFIpModuleV1.Contains(mywdDevicerType))
                {
                    tabControl.TabPages.Remove(tabRfButton);
                }
            }
            else if (IPmoduleDeviceTypeList.IpModuleV3TimeZoneUrl.Contains(mywdDevicerType)) // 新版一端口
            {
                GbRf.Visible      = false;
                gbNetwork.Visible = false;
                tabControl.TabPages.Remove(tabRfButton);
            }
            else
            {
                GbRf.Visible = false;
                tabControl.TabPages.Remove(tabRF);
                tabControl.TabPages.Remove(tabRfButton);
            }

            for (int i = 1; i <= 255; i++)
            {
                cbThrough.Items.Add(i.ToString());
            }
        }
예제 #3
0
        void SetCtrlsVisbleWithDifferentDeviceType()
        {
            toolStrip1.Visible = (CsConst.MyEditMode == 0);
            panel2.Controls.Clear();
            deviceNetworkInformation = new NetworkInForm(SubNetID, DevID, myintDeviceTpye);
            panel2.Controls.Add(deviceNetworkInformation);
            deviceNetworkInformation.Dock = DockStyle.Fill;
            deviceNetworkInformation.BringToFront();
            deviceNetworkInformation.Visible = true;

            if (CameraNvrDeviceType.nvrThridPartDeviceType.Contains(myintDeviceTpye)) // network vedio recorder
            {
                tabControl1.TabPages.Remove(tabCamera);
            }
            else
            {
                tabControl1.TabPages.Remove(tabNvr);
            }
        }
예제 #4
0
        void SetCtrlsVisbleWithDifferentDeviceType()
        {
            if (MyCoolMaster == null)
            {
                return;
            }

            if (CoolMasterDeviceTypeList.CLModuleNormal232.Contains(mywdDevicerType)) // 232 version
            {
                tab.TabPages.Remove(tabNet);
            }
            else if (CoolMasterDeviceTypeList.CLModuleWithNet.Contains(mywdDevicerType)) // net version
            {
                MyCoolMaster = (CoolMasterNet)MyCoolMaster;
                tab.TabPages.Remove(tabLists);
                panel2.Controls.Clear();
                networkinfo = new NetworkInForm(SubNetID, DevID, mywdDevicerType);
                panel2.Controls.Add(networkinfo);
                networkinfo.Dock = DockStyle.Fill;
            }
            toolStrip1.Visible = (CsConst.MyEditMode == 0);
        }
예제 #5
0
        void SetVisibleAccordingly()
        {
            networkinfo = new NetworkInForm(SubNetID, DevID, MyintDeviceType);
            groupBox1.Controls.Add(networkinfo);
            networkinfo.Dock = DockStyle.Fill;

            cbtype.Items.Clear();
            cbtype.DropDownStyle = ComboBoxStyle.DropDownList;
            for (int i = 1; i < 20; i++)
            {
                cbtype.Items.Add(CsConst.mstrINIDefault.IniReadValue("KeyFunType", "000" + GlobalClass.AddLeftZero(i.ToString(), 2), ""));
            }
            cbpam1Analog.Items.Clear();
            cbpam1Analog.DropDownStyle = ComboBoxStyle.DropDownList;
            cbpam1Analog.Items.Add(CsConst.mstrINIDefault.IniReadValue("public", "99848", ""));
            cbpam1PanelControl.Items.Clear();
            cbpam1PanelControl.DropDownStyle = ComboBoxStyle.DropDownList;
            string sql = "";

            if (CsConst.iLanguageId == 0)
            {
                sql = "select NoteInEng from tmpAirControlTypeForPanelControl";
            }
            else if (CsConst.iLanguageId == 1)
            {
                sql = "select NoteInChn from tmpAirControlTypeForPanelControl";
            }
            HDLSysPF.AddItemtoCbFromDB(sql, cbpam1PanelControl);

            DgvList.Controls.Add(txtpam1);
            DgvList.Controls.Add(cbpam1Analog);
            DgvList.Controls.Add(cbpam1PanelControl);
            DgvList.Controls.Add(txtpam2);
            DgvList.Controls.Add(timetxt);
            isReading = true;
            setAllVisible(false);
            isReading = false;
        }
예제 #6
0
 private void frmIPMod_FormClosing_1(object sender, FormClosingEventArgs e)
 {
     RemoteConnection = null;
     networkinfo      = null;
     this.Dispose();
 }
예제 #7
0
 private void frmCameraNvr_FormClosing(object sender, FormClosingEventArgs e)
 {
     deviceNetworkInformation = null;
     this.Dispose();
 }