예제 #1
0
        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;
        }
예제 #2
0
        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();
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
        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;
            }
        }
예제 #6
0
        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);
            }
        }
예제 #7
0
        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;
                }
            }
        }
예제 #8
0
        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();
        }
예제 #9
0
        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;
                }
            }
        }
예제 #10
0
        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);
            }
        }
예제 #11
0
        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;
        }
예제 #12
0
        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;
                }
            }
        }
예제 #13
0
        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;
        }
예제 #14
0
        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;
                }
            }
        }
예제 #15
0
        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;
            }
        }
예제 #16
0
 public void AddHighLight(HighLiteItem hli)
 {
     listHighLites.Add(hli);
 }
예제 #17
0
        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;
        }
예제 #18
0
        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);
            }
        }
예제 #19
0
        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();
        }
예제 #20
0
        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;
            }
        }
예제 #21
0
        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);

            }
        }
예제 #22
0
        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);
            }
        }
예제 #23
0
 public void AddHighLight(HighLiteItem hli)
 {
     listHighLites.Add(hli);
 }
예제 #24
0
        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();
        }