コード例 #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;
        }
コード例 #6
0
        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);
 }