public override void StoreSettings() { MarkerNode node = (MarkerNode)parent; node.What = nameBox.Text; node.Color = color; node.MarkMarker = checkBox.Checked; }
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); }
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"); }
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); }
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); }