Exemplo n.º 1
0
        private void butAddOthDevices_Click(object sender, System.EventArgs e)
        {
            OtherDeviceAddDevDlg otherDeviceAddDevDlg = new OtherDeviceAddDevDlg();
            DialogResult         dialogResult         = DialogResult.Cancel;

            try
            {
                otherDeviceAddDevDlg.pageInit();
                dialogResult = otherDeviceAddDevDlg.ShowDialog(this);
            }
            catch (System.Exception)
            {
            }
            if (dialogResult == DialogResult.OK)
            {
                this.changeTreeSelect("DevRoot");
            }
        }
Exemplo n.º 2
0
        private void addDeviceProc(object obj)
        {
            ControlAccess.ConfigControl config = delegate(Control control, object param)
            {
                PictureBox pictureBox = control as PictureBox;
                pictureBox.Show();
            };
            ControlAccess controlAccess = new ControlAccess(this, config);

            controlAccess.Access(this.pictureBoxLoading, null);
            System.Collections.Generic.List <System.Collections.Hashtable> list = obj as System.Collections.Generic.List <System.Collections.Hashtable>;
            this.otherDevSave(list);
            config = delegate(Control control, object param)
            {
                OtherDeviceAddDevDlg otherDeviceAddDevDlg = control as OtherDeviceAddDevDlg;
                otherDeviceAddDevDlg.butCancel.Enabled = true;
                otherDeviceAddDevDlg.DialogResult      = DialogResult.OK;
                otherDeviceAddDevDlg.Close();
            };
            controlAccess = new ControlAccess(this, config);
            controlAccess.Access(this, null);
        }