Пример #1
0
        protected override void OnBackColorChanged(EventArgs e)
        {
            DarkColor  = ColorSettings.ChangeBrightness(-20, this.BackColor);
            LightColor = ColorSettings.ChangeBrightness(-10, this.BackColor);

            DarkPen  = new Pen(new SolidBrush(DarkColor));
            LightPen = new Pen(new SolidBrush(LightColor));
        }
Пример #2
0
        public Event()
        {
            InitializeComponent();

            Header.Font = new Font(MainForm.collection.Families[0], 18, FontStyle.Bold);

            ColorSettings.SetColors(this);
        }
Пример #3
0
        public AddWord()
        {
            InitializeComponent();
            SetFonts();
            ColorSettings.SetColors(this);

            CurrentWord = new Word();

            SetCurrentWeight(CurrentWord.Weight);
            DefaultWeight = CurrentWord.Weight;
        }
Пример #4
0
        public ChangeWord(Word word)
        {
            InitializeComponent();

            SetFonts();
            ColorSettings.SetColors(this);

            CurrentWord = word;

            word_textBox.Focus();
            word_textBox.Text = CurrentWord.Value;
            expl_textbox.Text = CurrentWord.Translate;
            DefaultWeight     = CurrentWord.Weight;
            SetCurrentWeight(CurrentWord.Weight);
        }
Пример #5
0
        public MainForm()
        {
            InitializeComponent();

            this.MouseWheel += Form_MouseWheel;

            SetFonts();
            ColorSettings.SetColors(this);

            GetControlList();

            for (int i = 0; i < PageLength; i++)
            {
                Controls_WordValue[i].Text     = "";
                Controls_WordTranslate[i].Text = "";
            }

            UpdateWordList();
            UpdatePage();

            CurrentPage = 1;
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            base.OnPaint(e);

            Pen pen         = new Pen(new SolidBrush(TopColor), 1);
            int height_Up   = Depth - 1;
            int height_Down = Height - Depth;

            float opacityStep = 1f / depth;

            for (int i = 0; i < Depth; i++)
            {
                // оба варианта хороши по своему
                pen.Color = ColorSettings.ComputeOpacityColor(BackColor, TopColor, opacityStep * (i + 1));
                pen.Color = ColorSettings.ChangeBrightness(-3 * i, TopColor);

                e.Graphics.DrawLine(pen, 0, height_Up, Width, height_Up);
                e.Graphics.DrawLine(pen, 0, height_Down, Width, height_Down);
                height_Up--;
                height_Down++;
            }
        }
Пример #7
0
 public Train()
 {
     InitializeComponent();
     ColorSettings.SetColors(this);
 }