Beispiel #1
0
        private void ChangeValues(UIParameters vp, Plugin p)
        {
            if (pm != null)
            {
                pm = (UIParameters)vp.Clone();

                statLabel.Font      = vp.TextFont;
                statLabel.ForeColor = vp.TextColor;

                BackColor = vp.Color;
                Opacity   = vp.Opacity;
            }
            if (p != null)
            {
                this.p         = p;
                statLabel.Text = p.Update();
            }
        }
Beispiel #2
0
        private void SetUIParameters_VisibleChanged(object sender, EventArgs e)
        {
            if (Visible == false)
            {
                if (DialogResult == DialogResult.OK)
                {
                    v1 = (UIParameters)v2.Clone();
                }
                else
                {
                    v2 = (UIParameters)v1.Clone();
                }
            }

            else
            {
                ChangeValues(v2);
            }
        }
Beispiel #3
0
        private void ChangeValues(UIParameters v)
        {
            v2 = (UIParameters)v.Clone();

            color1ChooseButton.BackColor = v.DesktopLabelColor1;
            color1ChooseButton.ForeColor = (colorDialog.Color.GetBrightness() < 0.5) ? Color.White : Color.Black;

            color2ChooseButton.BackColor = v.DesktopLabelColor2;
            color2ChooseButton.ForeColor = (colorDialog.Color.GetBrightness() < 0.5) ? Color.White : Color.Black;

            colorChooseButton.BackColor = v.Color;
            colorChooseButton.ForeColor = (colorDialog.Color.GetBrightness() < 0.5) ? Color.White : Color.Black;

            mainTextColorChooseButton.BackColor = v.TextColor;
            mainTextColorChooseButton.ForeColor = (colorDialog.Color.GetBrightness() < 0.5) ? Color.White : Color.Black;

            mainTextFontChooseButton.Font = new Font(v.TextFont.FontFamily, 8.25F, v.TextFont.Style, GraphicsUnit.Point, (byte)204);
            desktopChooseFontButton.Font  = new Font(v.DesktopLabelFont.FontFamily, 8.25F, v.DesktopLabelFont.Style, GraphicsUnit.Point, (byte)204);


            opacityNumeric.Value = (decimal)v2.Opacity;
            deskXnumeric.Value   = (decimal)v2.DesktopLabelCoordinates.X;
            deskYnumeric.Value   = (decimal)v2.DesktopLabelCoordinates.Y;
            switch (v2.DesktopLabelEffect)
            {
            case LinearGradientMode.BackwardDiagonal:
                desktopLabelEffectListBox.SelectedIndex = 0;
                break;

            case LinearGradientMode.ForwardDiagonal:
                desktopLabelEffectListBox.SelectedIndex = 1;
                break;

            case LinearGradientMode.Horizontal:
                desktopLabelEffectListBox.SelectedIndex = 2;
                break;

            case LinearGradientMode.Vertical:
                desktopLabelEffectListBox.SelectedIndex = 3;
                break;
            }
        }
Beispiel #4
0
 //TODO: Наклепать цветные кнопки
 public SetUIParameters(UIParameters v)
 {
     InitializeComponent();
     v2 = (UIParameters)v.Clone();
     v1 = (UIParameters)v.Clone();
 }