示例#1
0
        public override void StoreSettings()
        {
            MarkerNode node = (MarkerNode)parent;

            node.What       = nameBox.Text;
            node.Color      = color;
            node.MarkMarker = checkBox.Checked;
        }
示例#2
0
        public override void LoadSettings()
        {
            MarkerNode node = (MarkerNode)parent;


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

            color            = node.Color;
            nameBox.Text     = node.What;
            checkBox.Checked = node.MarkMarker;
            PreviewUpdate(sampleLabel, color);
        }
示例#3
0
        public MarkerOptionPanel(MarkerNode parent, bool prev) : base(parent)
        {
            SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.Marker.xfrm"));

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

            checkBox    = (CheckBox)ControlDictionary["checkBox"];
            nameBox     = (TextBox)ControlDictionary["nameBox"];
            sampleLabel = (Label)ControlDictionary["sampleLabel"];

            previous = prev;
            ControlDictionary["explLabel"].Text = ResourceService.GetString(previous ? "Dialog.HighlightingEditor.Marker.ExplanationPrev" : "Dialog.HighlightingEditor.Marker.ExplanationNext");
        }
示例#4
0
        void addClick(object sender, EventArgs e)
        {
            string result = MessageService.ShowInputBox("", "${res:Dialog.HighlightingEditor.Markers.EnterName}", "");

            if (string.IsNullOrEmpty(result))
            {
                return;
            }

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

            MarkerNode   rsn = new MarkerNode(result, previous);
            ListViewItem lv  = new ListViewItem(result);

            lv.Tag = rsn;
            parent.Nodes.Add(rsn);
            listView.Items.Add(lv);
        }
示例#5
0
		public MarkerOptionPanel(MarkerNode parent, bool prev) : base(parent)
		{
			SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("Resources.Marker.xfrm"));
			
			chgBtn = (Button)ControlDictionary["chgBtn"];
			chgBtn.Click += new EventHandler(chgBtnClick);
			
			checkBox  = (CheckBox)ControlDictionary["checkBox"];
			nameBox   = (TextBox)ControlDictionary["nameBox"];
			sampleLabel = (Label)ControlDictionary["sampleLabel"];

			previous = prev;
			ControlDictionary["explLabel"].Text = ResourceService.GetString(previous ? "Dialog.HighlightingEditor.Marker.ExplanationPrev" : "Dialog.HighlightingEditor.Marker.ExplanationNext");
		}
示例#6
0
		void addClick(object sender, EventArgs e)
		{
			string result = MessageService.ShowInputBox("", "${res:Dialog.HighlightingEditor.Markers.EnterName}", "");
			if (string.IsNullOrEmpty(result))
				return;
			
			foreach (ListViewItem item in listView.Items) {
				if (item.Text == result)
					return;
			}
			
			MarkerNode rsn = new MarkerNode(result, previous);
			ListViewItem lv = new ListViewItem(result);
			lv.Tag = rsn;
			parent.Nodes.Add(rsn);
			listView.Items.Add(lv);
		}