Ejemplo n.º 1
0
        // *****************************************************************
        public void CellColorDialog()
        {
            if (m_SelectedIndex < 0)
            {
                return;
            }
            ColorEditDialog dlg = new ColorEditDialog();

            dlg.Back = m_List[m_SelectedIndex].BackColor;
            dlg.Fore = m_List[m_SelectedIndex].ForeColor;


            if (dlg.ShowDialog() == DialogResult.OK)
            {
                m_List[m_SelectedIndex].SetColor(dlg.Back, dlg.Fore);
            }
        }
Ejemplo n.º 2
0
        // *****************************************************************
        public void AllColorDialog()
        {
            ColorEditDialog dlg = new ColorEditDialog();

            dlg.Fore = this.ForeColor;
            dlg.Back = this.BackColor;

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                this.ForeColor = dlg.Fore;
                this.BackColor = dlg.Back;
                if (m_List.Count > 0)
                {
                    for (int i = 0; i < m_List.Count; i++)
                    {
                        m_List[i].ForeColor = this.ForeColor;
                        m_List[i].BackColor = this.BackColor;
                    }
                }
                this.Invalidate();
            }
        }