예제 #1
0
        private void setGlowToolStripMenuItem_DropDownItemClicked_1(object sender, ToolStripItemClickedEventArgs e)
        {
            GlowColor glowColor = new GlowColor();

            if (e.ClickedItem == redToolStripMenuItem)
            {
                glowColor = new GlowColor(Color.Red);
            }
            if (e.ClickedItem == greenToolStripMenuItem)
            {
                glowColor = new GlowColor(Color.Green);
            }
            if (e.ClickedItem == blueToolStripMenuItem)
            {
                glowColor = new GlowColor(Color.Blue);
            }
            if (e.ClickedItem == customToolStripMenuItem)
            {
                AlphaColorDialog colorDialog = new AlphaColorDialog()
                {
                    FullOpen = true,
                    Color    = Color.Gray,
                };
                nickBoxContextMenuStrip.Hide();
                if (colorDialog.ShowDialog() == DialogResult.OK)
                {
                    glowColor = new GlowColor(colorDialog.Color);
                }
            }

            toGlowListChange(glowColor);
        }
예제 #2
0
        private void toGlowListChange(GlowColor glowColor)
        {
            List <Entity> ToGlow      = Visuals.ToGlow;
            List <int>    entityIndex = new List <int>();

            foreach (DataGridViewCell i in nickBox.SelectedCells)
            {
                if (i.ColumnIndex == nickBox.Columns["idColumn"].Index)
                {
                    entityIndex.Add(Convert.ToInt32(i.Value));
                }
                if (i.ColumnIndex == nickBox.Columns["glowColumn"].Index)
                {
                    i.Style.BackColor = glowColor.ToColor;
                }
            }
            foreach (Entity x in Entity.List())
            {
                if (entityIndex.Contains(x.Index))
                {
                    ToGlow.Remove(ToGlow.Find(j => j.Index == x.Index));
                    x.Glowing      = true;
                    x.glowColor    = glowColor;
                    x.glowSettings = new GlowSettings(true, false, false);
                    ToGlow.Add(x);
                    continue;
                }
            }
            nickBox.ClearSelection();
            Visuals.ToGlow = ToGlow;
        }
예제 #3
0
        private void toGlowListChange(GlowColor glowColor)
        {
            var entityIndex = new List <int>();

            foreach (DataGridViewCell i in nickBox.SelectedCells)
            {
                if (i.ColumnIndex == nickBox.Columns["idColumn"].Index)
                {
                    var index = Convert.ToInt32(i.Value);
                    Visuals.Add(index, glowColor, new GlowSettings(true, false, false));
                }

                if (i.ColumnIndex == nickBox.Columns["glowColumn"].Index)
                {
                    i.Style.BackColor = glowColor.ToColor;
                }
            }

            nickBox.ClearSelection();
        }