示例#1
0
        private void cbNodeType_SelectedIndexChanged(object sender, EventArgs e)
        {
            short type = n_type_code[cbNodeType.SelectedIndex];

            VSUIControl[] controls = new VSUIControl[5];
            controls[0]         = new VSUIControl("select");
            controls[0].Visible = (type == DEFX.NODE_TYPE_CONTENT);

            controls[1]         = new VSUIControl("file");
            controls[1].Visible = (type == DEFX.NODE_TYPE_CONTENT);

            controls[2]         = new VSUIControl("title");
            controls[2].Visible = (type == DEFX.NODE_TYPE_CONTENT);

            controls[3]         = new VSUIControl("value");
            controls[3].Caption = (type == DEFX.NODE_TYPE_CATALOG) ? "Title:" : "Value:";

            controls[4] = new VSUIControl("name");

            if ((type == DEFX.NODE_TYPE_CONTENT) | (type == DEFX.NODE_TYPE_COMMENT) | (type == DEFX.NODE_TYPE_TEXT) | (type == DEFX.NODE_TYPE_TAG))
            {
                controls[4].Value = DEFX.GET_NODETYPE(type);
            }
            else
            {
                controls[4].Value = "";
            }

            controls[4].Enabled = (controls[4].Value == "");

            g.Set(controls);

            if (!controls[4].Enabled)
            {
                controls[4].Value = "";
            }
            else
            {
                g.SetFocus("name");
            }

            btnCreate.Enabled = (cbNodeType.SelectedIndex >= 0);
        }
示例#2
0
 private void VSInputBox_Load(object sender, EventArgs e)
 {
     pn_control.SetFocus("inpt");
 }