public FormHighLite(HighLiteItem hli, int index) { InitializeComponent(); colorPicker = new ColorButtonArray(panelColorPicker); colorPicker.OnClick += new ColorButtonArray.ColorSelected(colorPicker_OnClick); this.highLiteItem = hli; this.listIndex = index; textNickMatch.Text = highLiteItem.Match; textHostMatch.Text = highLiteItem.MatchHost; if (highLiteItem.Color == 0) { colorPicker.SelectedColor = 1; highLiteItem.Color = 1; } else { colorPicker.SelectedColor = highLiteItem.Color; } textNickMatch.ForeColor = IrcColor.colors[highLiteItem.Color]; textHostMatch.ForeColor = IrcColor.colors[highLiteItem.Color]; textNickMatch.Tag = highLiteItem.Color; }
public override void SaveColorsForm() { iceChatHighLites.listHighLites.Clear(); foreach (ListViewItem item in listHighLite.Items) { HighLiteItem hli = new HighLiteItem { Match = item.Text, Command = item.SubItems[1].Text, Color = Convert.ToInt32(item.SubItems[2].Text), Enabled = item.Checked, NicksInclude = item.SubItems[4].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries) }; ; hli.NicksExclude = item.SubItems[5].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries);; hli.FlashTab = Convert.ToBoolean(item.SubItems[3].Text); hli.Sound = item.SubItems[6].Text; iceChatHighLites.AddHighLight(hli); } SaveHighLites(); }
private void listHighLite_DoubleClick(object sender, EventArgs e) { //double click event unchecks the box.. annoying! if (listHighLite.SelectedItems.Count == 1) { ListViewItem item = listHighLite.SelectedItems[0]; if (listHighLite.FocusedItem == item) { if (listHighLite.FocusedItem.Checked == false) { listHighLite.FocusedItem.Checked = true; } else { listHighLite.FocusedItem.Checked = false; } } HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Command = item.SubItems[1].Text.Replace("", ((char)3).ToString()).Replace("", ((char)2).ToString()); hli.Color = Convert.ToInt32(item.SubItems[2].Text); hli.FlashTab = Convert.ToBoolean(item.SubItems[3].Text); hli.NicksInclude = item.SubItems[4].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); hli.NicksExclude = item.SubItems[5].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); hli.Sound = item.SubItems[6].Text; FormHighLite fi = new FormHighLite(hli, item.Index); fi.SaveHighLite += new FormHighLite.SaveHighLiteDelegate(UpdateHighLite); fi.ShowDialog(this.MainForm); } }
private void SaveNewHighLite(HighLiteItem hli, int listIndex) { if (hli.Match.Length > 0) { ListViewItem lvi = this.listHighLite.Items.Add(hli.Match); lvi.SubItems.Add(hli.Command.Replace(((char)3).ToString(), "").Replace(((char)2).ToString(), "")); lvi.SubItems.Add(hli.Color.ToString()); lvi.SubItems.Add(hli.FlashTab.ToString()); if (hli.NicksInclude != null) { lvi.SubItems.Add(string.Join(" ", hli.NicksInclude)); } else { lvi.SubItems.Add(""); } if (hli.NicksExclude != null) { lvi.SubItems.Add(string.Join(" ", hli.NicksExclude)); } else { lvi.SubItems.Add(""); } lvi.SubItems.Add(hli.Sound); lvi.ForeColor = IrcColor.colors[hli.Color]; lvi.Checked = true; } }
private void SaveNewHighLite(HighLiteItem hli, int listIndex) { if (hli.Match.Length > 0 || hli.MatchHost.Length > 0) { ListViewItem lvi = this.listHighLite.Items.Add(hli.Match); lvi.SubItems.Add(hli.Color.ToString()); lvi.SubItems.Add(hli.MatchHost); lvi.ForeColor = IrcColor.colors[hli.Color]; lvi.Checked = true; } }
private void buttonEdit_Click(object sender, EventArgs e) { foreach (ListViewItem item in listHighLite.SelectedItems) { HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Color = Convert.ToInt32(item.SubItems[1].Text); hli.MatchHost = item.SubItems[2].Text; FormHighLite fi = new FormHighLite(hli, item.Index); fi.SaveHighLite += new FormHighLite.SaveHighLiteDelegate(UpdateHighLite); fi.ShowDialog(this.MainForm); } }
private void UpdateHighLite(HighLiteItem hli, int listIndex) { foreach (ListViewItem item in listHighLite.SelectedItems) { if (item.Index == listIndex) { item.Text = hli.Match; item.SubItems[1].Text = hli.Color.ToString(); item.SubItems[2].Text = hli.MatchHost; item.ForeColor = IrcColor.colors[hli.Color]; break; } } }
public override void SaveColorsForm() { iceChatNickHighLites.listHighLites.Clear(); foreach (ListViewItem item in listHighLite.Items) { HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Color = Convert.ToInt32(item.SubItems[1].Text); hli.MatchHost = item.SubItems[2].Text; hli.Enabled = item.Checked; iceChatNickHighLites.AddHighLight(hli); } SaveHighLites(); }
private void UpdateHighLite(HighLiteItem hli, int listIndex) { foreach (ListViewItem item in listHighLite.SelectedItems) { if (item.Index == listIndex) { item.Text = hli.Match; item.SubItems[1].Text = hli.Command.Replace(((char)3).ToString(), "").Replace(((char)2).ToString(), ""); item.SubItems[2].Text = hli.Color.ToString(); item.SubItems[3].Text = hli.FlashTab.ToString(); item.SubItems[4].Text = string.Join(" ", hli.NicksInclude); item.SubItems[5].Text = string.Join(" ", hli.NicksExclude); item.SubItems[6].Text = hli.Sound; item.ForeColor = IrcColor.colors[hli.Color]; break; } } }
private void buttonEdit_Click(object sender, EventArgs e) { foreach (ListViewItem item in listHighLite.SelectedItems) { HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Command = item.SubItems[1].Text.Replace("", ((char)3).ToString()).Replace("", ((char)2).ToString()); hli.Color = Convert.ToInt32(item.SubItems[2].Text); hli.FlashTab = Convert.ToBoolean(item.SubItems[3].Text); hli.NicksInclude = item.SubItems[4].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); hli.NicksExclude = item.SubItems[5].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); hli.Sound = item.SubItems[6].Text; FormHighLite fi = new FormHighLite(hli, item.Index); fi.SaveHighLite += new FormHighLite.SaveHighLiteDelegate(UpdateHighLite); fi.ShowDialog(this.MainForm); } }
public FormHighLite(HighLiteItem hli, int index) { InitializeComponent(); colorPicker = new ColorButtonArray(panelColorPicker); colorPicker.OnClick += new ColorButtonArray.ColorSelected(ColorPicker_OnClick); textCommand.KeyDown += new KeyEventHandler(TextCommand_KeyDown); this.highLiteItem = hli; this.listIndex = index; textHiLite.Text = highLiteItem.Match; textCommand.Text = highLiteItem.Command; if (highLiteItem.Color == 0) { colorPicker.SelectedColor = 1; highLiteItem.Color = 1; } else { colorPicker.SelectedColor = highLiteItem.Color; } if (hli.NicksInclude != null) { textInclude.Text = string.Join(" ", hli.NicksInclude); } if (hli.NicksExclude != null) { textExclude.Text = string.Join(" ", hli.NicksExclude); } textHiLite.ForeColor = IrcColor.colors[highLiteItem.Color]; textHiLite.Tag = highLiteItem.Color; textPlaySound.Text = highLiteItem.Sound; checkFlashTab.Checked = highLiteItem.FlashTab; }
public FormHighLite(HighLiteItem hli, int index) { InitializeComponent(); colorPicker = new ColorButtonArray(panelColorPicker); colorPicker.OnClick += new ColorButtonArray.ColorSelected(colorPicker_OnClick); this.highLiteItem = hli; this.listIndex = index; textHiLite.Text = highLiteItem.Match; textCommand.Text = highLiteItem.Command; if (highLiteItem.Color == 0) { colorPicker.SelectedColor = 1; highLiteItem.Color = 1; } else { colorPicker.SelectedColor = highLiteItem.Color; } textHiLite.ForeColor = IrcColor.colors[highLiteItem.Color]; textHiLite.Tag = highLiteItem.Color; checkFlashTab.Checked = highLiteItem.FlashTab; }
private void UpdateHighLite(HighLiteItem hli, int listIndex) { foreach (ListViewItem item in listHighLite.SelectedItems) { if (item.Index == listIndex) { item.Text = hli.Match; item.SubItems[1].Text = hli.Command; item.SubItems[2].Text = hli.Color.ToString(); item.SubItems[3].Text = hli.FlashTab.ToString(); item.ForeColor = IrcColor.colors[hli.Color]; break; } } }
private void SaveNewHighLite(HighLiteItem hli, int listIndex) { if (hli.Match.Length > 0) { ListViewItem lvi = this.listHighLite.Items.Add(hli.Match); lvi.SubItems.Add(hli.Command); lvi.SubItems.Add(hli.Color.ToString()); lvi.SubItems.Add(hli.FlashTab.ToString()); lvi.ForeColor = IrcColor.colors[hli.Color]; lvi.Checked = true; } }
public void AddHighLight(HighLiteItem hli) { listHighLites.Add(hli); }
public FormHighLite(HighLiteItem hli, int index) { InitializeComponent(); colorPicker = new ColorButtonArray(panelColorPicker); colorPicker.OnClick += new ColorButtonArray.ColorSelected(colorPicker_OnClick); textCommand.KeyDown += new KeyEventHandler(textCommand_KeyDown); this.highLiteItem = hli; this.listIndex = index; textHiLite.Text = highLiteItem.Match; textCommand.Text = highLiteItem.Command; if (highLiteItem.Color == 0) { colorPicker.SelectedColor = 1; highLiteItem.Color = 1; } else { colorPicker.SelectedColor = highLiteItem.Color; } if (hli.NicksInclude != null) textInclude.Text = string.Join(" ", hli.NicksInclude); if (hli.NicksExclude != null) textExclude.Text = string.Join(" ", hli.NicksExclude); textHiLite.ForeColor = IrcColor.colors[highLiteItem.Color]; textHiLite.Tag = highLiteItem.Color; textPlaySound.Text = highLiteItem.Sound; checkFlashTab.Checked = highLiteItem.FlashTab; }
private void buttonEdit_Click(object sender, EventArgs e) { foreach (ListViewItem item in listHighLite.SelectedItems) { HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Command = item.SubItems[1].Text; hli.Color = Convert.ToInt32(item.SubItems[2].Text); hli.FlashTab = Convert.ToBoolean(item.SubItems[3].Text); FormHighLite fi = new FormHighLite(hli, item.Index); fi.SaveHighLite += new FormHighLite.SaveHighLiteDelegate(UpdateHighLite); fi.ShowDialog(this.MainForm); } }
public override void SaveColorsForm() { iceChatHighLites.listHighLites.Clear(); foreach (ListViewItem item in listHighLite.Items) { HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Command = item.SubItems[1].Text; hli.Color = Convert.ToInt32(item.SubItems[2].Text); hli.Enabled = item.Checked; hli.NicksInclude = item.SubItems[4].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); ; hli.NicksExclude = item.SubItems[5].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); ; hli.FlashTab = Convert.ToBoolean(item.SubItems[3].Text); hli.Sound = item.SubItems[6].Text; iceChatHighLites.AddHighLight(hli); } SaveHighLites(); }
private void SaveNewHighLite(HighLiteItem hli, int listIndex) { if (hli.Match.Length > 0) { ListViewItem lvi = this.listHighLite.Items.Add(hli.Match); lvi.SubItems.Add(hli.Command.Replace(((char)3).ToString(), "").Replace(((char)2).ToString(), "")); lvi.SubItems.Add(hli.Color.ToString()); lvi.SubItems.Add(hli.FlashTab.ToString()); if (hli.NicksInclude != null) lvi.SubItems.Add(string.Join(" ", hli.NicksInclude)); else lvi.SubItems.Add(""); if (hli.NicksExclude != null) lvi.SubItems.Add(string.Join(" ", hli.NicksExclude)); else lvi.SubItems.Add(""); lvi.SubItems.Add(hli.Sound); lvi.ForeColor = IrcColor.colors[hli.Color]; lvi.Checked = true; } }
private void listHighLite_DoubleClick(object sender, EventArgs e) { //double click event unchecks the box.. annoying! if (listHighLite.SelectedItems.Count == 1) { ListViewItem item = listHighLite.SelectedItems[0]; if (listHighLite.FocusedItem == item) { if (listHighLite.FocusedItem.Checked == false) listHighLite.FocusedItem.Checked = true; else listHighLite.FocusedItem.Checked = false; } HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Command = item.SubItems[1].Text.Replace("", ((char)3).ToString()).Replace("", ((char)2).ToString()); hli.Color = Convert.ToInt32(item.SubItems[2].Text); hli.FlashTab = Convert.ToBoolean(item.SubItems[3].Text); hli.NicksInclude = item.SubItems[4].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); hli.NicksExclude = item.SubItems[5].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); hli.Sound = item.SubItems[6].Text; FormHighLite fi = new FormHighLite(hli, item.Index); fi.SaveHighLite += new FormHighLite.SaveHighLiteDelegate(UpdateHighLite); fi.ShowDialog(this.MainForm); } }
private void buttonEdit_Click(object sender, EventArgs e) { foreach (ListViewItem item in listHighLite.SelectedItems) { HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Command = item.SubItems[1].Text.Replace("", ((char)3).ToString()).Replace("", ((char)2).ToString()); hli.Color = Convert.ToInt32(item.SubItems[2].Text); hli.FlashTab = Convert.ToBoolean(item.SubItems[3].Text); hli.NicksInclude = item.SubItems[4].Text.Split(new string[] { " "},StringSplitOptions.RemoveEmptyEntries); hli.NicksExclude = item.SubItems[5].Text.Split(new string[] { " " }, StringSplitOptions.RemoveEmptyEntries); hli.Sound = item.SubItems[6].Text; FormHighLite fi = new FormHighLite(hli, item.Index); fi.SaveHighLite += new FormHighLite.SaveHighLiteDelegate(UpdateHighLite); fi.ShowDialog(this.MainForm); } }
public override void SaveColorsForm() { //MessageBox.Show("Saving:" + iceChatHighLites.listHighLites.Count + ":" + listHighLite.Items.Count); iceChatHighLites.listHighLites.Clear(); foreach (ListViewItem item in listHighLite.Items) { HighLiteItem hli = new HighLiteItem(); hli.Match = item.Text; hli.Command = item.SubItems[1].Text; hli.Color = Convert.ToInt32(item.SubItems[2].Text); hli.Enabled = item.Checked; hli.FlashTab = Convert.ToBoolean(item.SubItems[3].Text); iceChatHighLites.AddHighLight(hli); } SaveHighLites(); }