Example #1
0
        private void NodeEdit()
        {
            CameraTreeNode n = this.GetSelectedTreeNode();

            if (n != null)
            {
                if (!n.IsGroup())
                {
                    CameraClass    m      = n.Item as CameraClass;
                    CameraClass    e      = m.Clone() as CameraClass;
                    CameraEditForm fmEdit = new CameraEditForm(e);
                    fmEdit.ShowDialog(this);
                    if (DialogResult.OK == fmEdit.DialogResult)
                    {
                        fmEdit.Camera.Copy(m);
                        RootClass.Instance.SaveConfig();
                        MotionConfiguration.Instance.Save();

                        m.FireItemValueChangedEvent();
                    }
                }
                else
                {
                    n.BeginEdit();
                }
            }
        }
Example #2
0
        private void toolStripButtonNew_Click(object sender, EventArgs e)
        {
            CameraEditForm fmEdit;
            CameraClass    m = new CameraClass();

            fmEdit = new CameraEditForm(m);
            fmEdit.ShowDialog(this);
            if (fmEdit.DialogResult == DialogResult.OK)
            {
                this.NodeAdd(fmEdit.Camera);
                RootClass.Instance.SaveConfig();
                MotionConfiguration.Instance.Save();
            }
        }
Example #3
0
        private void toolStripButtonNew_Click(object sender, EventArgs e)
        {
            CameraEditForm fmEdit;
            CameraClass m = new CameraClass();

            fmEdit = new CameraEditForm(m);
            fmEdit.ShowDialog(this);
            if (fmEdit.DialogResult == DialogResult.OK)
            {
                this.NodeAdd(fmEdit.Camera);
                RootClass.Instance.SaveConfig();
                MotionConfiguration.Instance.Save();
            }
        }
Example #4
0
        private void NodeEdit()
        {
            CameraTreeNode n = this.GetSelectedTreeNode();
            if (n != null)
            {
                if (!n.IsGroup())
                {
                    CameraClass m = n.Item as CameraClass;
                    CameraClass e = m.Clone() as CameraClass;
                    CameraEditForm fmEdit = new CameraEditForm(e);
                    fmEdit.ShowDialog(this);
                    if (DialogResult.OK == fmEdit.DialogResult)
                    {
                        fmEdit.Camera.Copy(m);
                        RootClass.Instance.SaveConfig();
                        MotionConfiguration.Instance.Save();

                        m.FireItemValueChangedEvent();
                    }
                }
                else
                {
                    n.BeginEdit();
                }
            }
        }