Esempio n. 1
0
        public RuleSetOptionPanel(RuleSetNode parent) : base(parent)
        {
            SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.RuleSet.xfrm"));

            nameBox  = (TextBox)ControlDictionary["nameBox"];
            refBox   = (TextBox)ControlDictionary["refBox"];
            delimBox = (TextBox)ControlDictionary["delimBox"];

            igcaseBox      = (CheckBox)ControlDictionary["igcaseBox"];
            escCharTextBox = (TextBox)ControlDictionary["escCharTextBox"];
        }
Esempio n. 2
0
        public override void StoreSettings()
        {
            RuleSetNode node = (RuleSetNode)parent;

            if (!node.IsRoot)
            {
                node.Name = nameBox.Text;
            }
            node.Reference       = refBox.Text;
            node.Delimiters      = delimBox.Text;
            node.EscapeCharacter = (escCharTextBox.TextLength == 0) ? '\0' : escCharTextBox.Text[0];
            node.IgnoreCase      = igcaseBox.Checked;
        }
Esempio n. 3
0
        public override void LoadSettings()
        {
            RuleSetNode node = (RuleSetNode)parent;

            nameBox.Text = node.Name;

            if (node.IsRoot)
            {
                nameBox.Text    = ResourceService.GetString("Dialog.HighlightingEditor.TreeView.RootRuleSet");
                nameBox.Enabled = false;
            }

            refBox.Text   = node.Reference;
            delimBox.Text = node.Delimiters;

            escCharTextBox.Text = (node.EscapeCharacter == '\0') ? "" : node.EscapeCharacter.ToString();
            igcaseBox.Checked   = node.IgnoreCase;
        }
Esempio n. 4
0
        void addClick(object sender, EventArgs e)
        {
            string result = MessageService.ShowInputBox("", "${res:Dialog.HighlightingEditor.RuleSets.EnterName}", "");

            if (string.IsNullOrEmpty(result))
            {
                return;
            }
            foreach (ListViewItem item in listView.Items)
            {
                if (item.Text == result)
                {
                    return;
                }
            }

            RuleSetNode  rsn = new RuleSetNode(result, "&<>~!@%^*()-+=|\\#/{}[]:;\"' ,	.?", "", '\0', false);
            ListViewItem lv  = new ListViewItem(result);

            lv.Tag = rsn;
            parent.Nodes.Add(rsn);
            listView.Items.Add(lv);
        }
Esempio n. 5
0
		void addClick(object sender, EventArgs e)
		{
			string result = MessageService.ShowInputBox("", "${res:Dialog.HighlightingEditor.RuleSets.EnterName}", "");
			if (string.IsNullOrEmpty(result)) 
				return;
			foreach (ListViewItem item in listView.Items) {
				if (item.Text == result)
					return;
			}
			
			RuleSetNode rsn = new RuleSetNode(result, "&<>~!@%^*()-+=|\\#/{}[]:;\"' ,	.?", "", '\0', false);
			ListViewItem lv = new ListViewItem(result);
			lv.Tag = rsn;
			parent.Nodes.Add(rsn);
			listView.Items.Add(lv);
		}
Esempio n. 6
0
		public RuleSetOptionPanel(RuleSetNode parent) : base(parent)
		{
			SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.RuleSet.xfrm"));
			
			nameBox  = (TextBox)ControlDictionary["nameBox"];
			refBox   = (TextBox)ControlDictionary["refBox"];
			delimBox = (TextBox)ControlDictionary["delimBox"];
			
			igcaseBox = (CheckBox)ControlDictionary["igcaseBox"];
			escCharTextBox  = (TextBox)ControlDictionary["escCharTextBox"];
		}