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;
        }
        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"];
        }
        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);
        }
        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);
        }
		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);
		}
		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"];
		}