Ejemplo n.º 1
0
 public ConfigProperty(XmlNode selectNode, frmConfig form, string lineName)
 {
     node     = selectNode;
     fm       = form;
     LineName = lineName;
     reflsh();
 }
Ejemplo n.º 2
0
        public configForSN()
        {
            configForm                    = new frmConfig();
            configForm.Text               = name;
            configForm.btnAdd.Click      += new EventHandler(btnAdd_Click);
            configForm.btnRemove.Click   += new EventHandler(btnRemove_Click);
            configForm.btnPrevious.Click += new EventHandler(btnPrevious_Click);
            configForm.btnNext.Click     += new EventHandler(btnNext_Click);
            configForm.btnOK.Click       += new EventHandler(btnOK_Click);
            configForm.btnCancel.Click   += new EventHandler(btnCancel_Click);

            configForm.listBox.SelectedIndexChanged += new EventHandler(listBox_SelectedIndexChanged);
            if (ClsCommon.InfoRootNode.ChildNodes.Count > 0)
            {
                foreach (XmlNode node in ClsCommon.InfoRootNode.ChildNodes)
                {
                    configForm.listBox.Items.Add(node.Attributes["name"].Value);
                }
                if (configForm.listBox.Items.Count > 0)
                {
                    configForm.listBox.SelectedIndex = 0;
                }
            }
            else
            {
                configForm.btnRemove.Enabled   = false;
                configForm.btnPrevious.Enabled = false;
                configForm.btnNext.Enabled     = false;
            }

            configForm.ShowDialog();
        }