Ejemplo n.º 1
0
        public override void StoreSettings()
        {
            KeywordListNode  node = (KeywordListNode)parent;
            StringCollection col  = new StringCollection();

            foreach (string word in listBox.Items)
            {
                col.Add(word);
            }
            node.Words = col;
            node.Name  = nameBox.Text;
            node.Color = color;
        }
Ejemplo n.º 2
0
        public KeywordListOptionPanel(KeywordListNode parent) : base(parent)
        {
            SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.KeywordList.xfrm"));

            addBtn           = (Button)ControlDictionary["addBtn"];
            addBtn.Click    += new EventHandler(addBtnClick);
            removeBtn        = (Button)ControlDictionary["removeBtn"];
            removeBtn.Click += new EventHandler(removeBtnClick);
            chgBtn           = (Button)ControlDictionary["chgBtn"];
            chgBtn.Click    += new EventHandler(chgBtnClick);

            nameBox     = (TextBox)ControlDictionary["nameBox"];
            sampleLabel = (Label)ControlDictionary["sampleLabel"];
            listBox     = (ListBox)ControlDictionary["listBox"];
        }
Ejemplo n.º 3
0
        public override void LoadSettings()
        {
            KeywordListNode node = (KeywordListNode)parent;

            listBox.Items.Clear();

            foreach (string word in node.Words)
            {
                listBox.Items.Add(word);
            }

            sampleLabel.Font = SharpDevelopTextEditorProperties.Instance.FontContainer.DefaultFont;

            color        = node.Color;
            nameBox.Text = node.Name;
            PreviewUpdate(sampleLabel, color);
        }
Ejemplo n.º 4
0
        void addClick(object sender, EventArgs e)
        {
            string result = MessageService.ShowInputBox("", "${res:Dialog.HighlightingEditor.KeywordList.EnterName}", "");

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

            KeywordListNode kwn = new KeywordListNode(result);
            ListViewItem    lv  = new ListViewItem(result);

            lv.Tag = kwn;
            parent.Nodes.Add(kwn);
            listView.Items.Add(lv);
        }
Ejemplo n.º 5
0
		void addClick(object sender, EventArgs e)
		{
			string result = MessageService.ShowInputBox("", "${res:Dialog.HighlightingEditor.KeywordList.EnterName}", "");
			if (string.IsNullOrEmpty(result))
				return;
			foreach (ListViewItem item in listView.Items) {
				if (item.Text == result)
					return;
			}
			
			KeywordListNode kwn = new KeywordListNode(result);
			ListViewItem lv = new ListViewItem(result);
			lv.Tag = kwn;
			parent.Nodes.Add(kwn);
			listView.Items.Add(lv);
		}
Ejemplo n.º 6
0
		public KeywordListOptionPanel(KeywordListNode parent) : base(parent)
		{
			SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.KeywordList.xfrm"));
			
			addBtn = (Button)ControlDictionary["addBtn"];
			addBtn.Click += new EventHandler(addBtnClick);
			removeBtn = (Button)ControlDictionary["removeBtn"];
			removeBtn.Click += new EventHandler(removeBtnClick);
			chgBtn = (Button)ControlDictionary["chgBtn"];
			chgBtn.Click += new EventHandler(chgBtnClick);
			
			nameBox = (TextBox)ControlDictionary["nameBox"];
			sampleLabel = (Label)ControlDictionary["sampleLabel"];
			listBox  = (ListBox)ControlDictionary["listBox"];
		}