예제 #1
0
        private void Tile_MouseClick(object sender, EventArgs e)
        {
            MetroTile       tile       = (MetroTile)sender;
            MetroColorStyle colorStyle = (MetroColorStyle)tile.Tag;

            Program.MainStyleManager.Style = colorStyle;
        }
예제 #2
0
        public MetroColorStyle SelectWindowColor(int n)
        {
            WindowColor = n;
            MetroColorStyle style = MetroColorStyle.Default;

            switch (n)
            {
            case 1:
                style = MetroColorStyle.Red;
                break;

            case 2:
                style = MetroColorStyle.Lime;
                break;

            case 3:
                style = MetroColorStyle.Blue;
                break;

            case 4:
                style = MetroColorStyle.Silver;
                break;

            case 5:
                style = MetroColorStyle.Black;
                break;

            case 6:
                style = MetroColorStyle.Green;
                break;
            }

            return(style);
        }
예제 #3
0
        public static void SetDefaultStyle(this IContainer contr, MetroForm owner, MetroColorStyle style)
        {
            //IL_0009: Unknown result type (might be due to invalid IL or missing references)
            MetroStyleManager val = FindManager(contr, owner);

            val.set_Style(style);
        }
예제 #4
0
 private void SetColour(MetroColorStyle style)
 {
     Properties.Settings.Default.Theme = style;
     Properties.Settings.Default.Save();
     SetCurrentStyle();
     Invalidate();
 }
예제 #5
0
        public FormColor(MaterialForm form)
        {
            materialSkinManager = MaterialSkinManager.Instance;
            materialSkinManager.AddFormToManage(form);
            materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;

            switch (Esquema())
            {
                case 1:
                    materialSkinManager.ColorScheme = new ColorScheme(Primary.Blue700, Primary.Blue900, Primary.Blue500, Accent.Green400, TextShade.WHITE);
                    MetroColor = MetroColorStyle.Blue;
                    break;
                case 2:
                    materialSkinManager.ColorScheme = new ColorScheme(Primary.Orange700, Primary.Orange900, Primary.Orange500, Accent.Red700, TextShade.WHITE);
                    MetroColor = MetroColorStyle.Orange;
                    break;
                case 3:
                    materialSkinManager.ColorScheme = new ColorScheme(Primary.Indigo700, Primary.Indigo900, Primary.Indigo500, Accent.Pink400, TextShade.WHITE);
                    MetroColor = MetroColorStyle.Magenta;
                    break;
                default:
                    materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);
                    MetroColor = MetroColorStyle.Teal;
                    break;
            }
        }
예제 #6
0
        public static void ChangeStyle(MetroColorStyle style)
        {
            uc.mtAuthors.Style      = style;
            uc.mtBooks.Style        = style;
            uc.mtCategories.Style   = style;
            uc.mtCathedra.Style     = style;
            uc.mtDebtors.Style      = style;
            uc.mtDegrees.Style      = style;
            uc.mtEdition.Style      = style;
            uc.mtFaculty.Style      = style;
            uc.mtGiveBook.Style     = style;
            uc.mtOtherReaders.Style = style;
            uc.mtReaders.Style      = style;
            uc.mtRoomRead.Style     = style;
            uc.mtStudents.Style     = style;
            uc.mtTeachers.Style     = style;
            m.Style                = style;
            m.mcbThreme.Style      = style;
            m.mcbChangeStyle.Style = style;
            m.mcbFontWeight.Style  = style;
            m.mcbTextSize.Style    = style;
            m.mcbColor.Style       = style;

            m.Refresh();
            uc.Refresh();
        }
예제 #7
0
        public static System.Drawing.Color ToSystemColor(MetroColorStyle style)
        {
            switch (style)
            {
            case MetroColorStyle.Black: return(MetroColors.Black);

            case MetroColorStyle.Blue: return(MetroColors.Blue);

            case MetroColorStyle.Brown: return(MetroColors.Brown);

            case MetroColorStyle.Green: return(MetroColors.Green);

            case MetroColorStyle.Lime: return(MetroColors.Lime);

            case MetroColorStyle.Magenta: return(MetroColors.Magenta);

            case MetroColorStyle.Orange: return(MetroColors.Orange);

            case MetroColorStyle.Pink: return(MetroColors.Pink);

            case MetroColorStyle.Purple: return(MetroColors.Purple);

            case MetroColorStyle.Red: return(MetroColors.Red);

            case MetroColorStyle.Silver: return(MetroColors.Silver);

            case MetroColorStyle.Teal: return(MetroColors.Teal);

            case MetroColorStyle.White: return(MetroColors.White);

            case MetroColorStyle.Yellow: return(MetroColors.Yellow);

            default: return(MetroColors.Blue);
            }
        }
예제 #8
0
        private void StyleGrid(MetroThemeStyle theme, MetroColorStyle style)
        {
            metroGrid1.BorderStyle               = System.Windows.Forms.BorderStyle.None;
            metroGrid1.CellBorderStyle           = DataGridViewCellBorderStyle.None;
            metroGrid1.EnableHeadersVisualStyles = false;
            metroGrid1.SelectionMode             = DataGridViewSelectionMode.FullRowSelect;
            metroGrid1.BackColor       = MetroPaint.BackColor.Form(theme);
            metroGrid1.BackgroundColor = MetroPaint.BackColor.Form(theme);
            metroGrid1.GridColor       = MetroPaint.BackColor.Form(theme);
            metroGrid1.ForeColor       = MetroPaint.ForeColor.Button.Disabled(theme);
            metroGrid1.Font            = new Font("Segoe UI", 11f, FontStyle.Regular, GraphicsUnit.Pixel);

            metroGrid1.ColumnHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
            metroGrid1.ColumnHeadersDefaultCellStyle.BackColor = MetroPaint.GetStyleColor(style);
            metroGrid1.ColumnHeadersDefaultCellStyle.ForeColor = MetroPaint.ForeColor.Button.Press(theme);

            metroGrid1.RowHeadersBorderStyle = DataGridViewHeaderBorderStyle.None;
            metroGrid1.RowHeadersDefaultCellStyle.BackColor = MetroPaint.GetStyleColor(style);
            metroGrid1.RowHeadersDefaultCellStyle.ForeColor = MetroPaint.ForeColor.Button.Press(theme);

            metroGrid1.DefaultCellStyle.BackColor = MetroPaint.BackColor.Form(theme);

            metroGrid1.DefaultCellStyle.SelectionBackColor = MetroPaint.GetStyleColor(style);
            metroGrid1.DefaultCellStyle.SelectionForeColor = (theme == MetroThemeStyle.Light) ? Color.FromArgb(17, 17, 17) : Color.FromArgb(255, 255, 255);

            metroGrid1.DefaultCellStyle.SelectionBackColor = MetroPaint.GetStyleColor(style);
            metroGrid1.DefaultCellStyle.SelectionForeColor = (theme == MetroThemeStyle.Light) ? Color.FromArgb(17, 17, 17) : Color.FromArgb(255, 255, 255);

            metroGrid1.RowHeadersDefaultCellStyle.SelectionBackColor = MetroPaint.GetStyleColor(style);
            metroGrid1.RowHeadersDefaultCellStyle.SelectionForeColor = (theme == MetroThemeStyle.Light) ? Color.FromArgb(17, 17, 17) : Color.FromArgb(255, 255, 255);

            metroGrid1.ColumnHeadersDefaultCellStyle.SelectionBackColor = MetroPaint.GetStyleColor(style);
            metroGrid1.ColumnHeadersDefaultCellStyle.SelectionForeColor = (theme == MetroThemeStyle.Light) ? Color.FromArgb(17, 17, 17) : Color.FromArgb(255, 255, 255);
        }
        public static void SetDefaultStyle(this IContainer contr, MetroForm owner, MetroColorStyle style)
        {
            MetroStyleManager manager = FindManager(contr, owner);

            manager.Style = style;
            owner.Style   = style;
        }
예제 #10
0
        private void TemporaryTitleColor(MetroColorStyle color)
        {
            Style = color;     // Set title color
            Invalidate();      // Redraw

            colorTimer.Stop(); // Reset timer counter to prevent any overlap in previous recent method calls
            colorTimer.Start();
        }
예제 #11
0
 internal WaitingOverlaySub(Form form, MetroColorStyle metroColorStyle)
 {
     InitializeComponent();
     parentForm                  = form;
     this.metroColorStyle        = metroColorStyle;
     metroProgressSpinner1.Style = metroColorStyle;
     metroLabel1.Style           = metroColorStyle;
 }
예제 #12
0
        public frmMantEmpleados(Usuarios user)
        {
            usuarioActivo = user;
            FormColor color = new FormColor(this);
            MetroColor = color.MetroColor;

            InitializeComponent();
        }
예제 #13
0
        public frmReportesEmpleado(Usuarios user)
        {
            FormColor color = new FormColor(this);
            usuarioActivo = user;
            MetroColor = color.MetroColor;

            InitializeComponent();
        }
예제 #14
0
        public frmProductos(Usuarios user)
        {
            FormColor color = new FormColor(this);
            MetroColor = color.MetroColor;
            usuarioActivo = user;

            InitializeComponent();
        }
예제 #15
0
 public static bool SaveStyleSettings(MetroThemeStyle themeStyle, MetroColorStyle colorStyle)
 {
     Settings.Default["ThemeStyle"] = themeStyle;
     Settings.Default["ColorStyle"] = colorStyle;
     Settings.Default.Save();
     Settings.Default.Reload();
     return(true);
 }
예제 #16
0
 public void text_notification(string text, MetroColorStyle color, int duration)
 {
     Util.CreateTimer(duration, (timer) => {
         timer.Stop();
         notificationLabel.Text = "";
     });
     notificationLabel.Style = color;
     try { notificationLabel.Text = text; } catch (Exception ex) { }
 }
예제 #17
0
        public Color GetColor(MetroColorStyle color)
        {
            Color retorno = new Color();

            switch (color)
            {
            case MetroColorStyle.Orange:
                retorno = Color.DarkOrange;
                break;

            case MetroColorStyle.Green:
                retorno = Color.Green;
                break;

            case MetroColorStyle.Pink:
                retorno = Color.Pink;
                break;

            case MetroColorStyle.Purple:
                retorno = Color.Purple;
                break;

            case MetroColorStyle.Red:
                retorno = Color.Red;
                break;

            case MetroColorStyle.Silver:
                retorno = Color.Silver;
                break;

            case MetroColorStyle.Yellow:
                retorno = Color.Yellow;
                break;

            case MetroColorStyle.Brown:
                retorno = Color.SaddleBrown;
                break;

            case MetroColorStyle.Magenta:
                retorno = Color.Magenta;
                break;

            case MetroColorStyle.Blue:
                retorno = Color.DeepSkyBlue;
                break;

            case MetroColorStyle.Lime:
                retorno = Color.Lime;
                break;

            case MetroColorStyle.Teal:
                retorno = Color.Teal;
                break;
            }
            return(retorno);
        }
예제 #18
0
        public static Pen GetStylePen(MetroColorStyle style)
        {
            switch (style)
            {
            case MetroColorStyle.Black:
                return(MetroPens.Black);

            case MetroColorStyle.White:
                return(MetroPens.White);

            case MetroColorStyle.Silver:
                return(MetroPens.Silver);

            case MetroColorStyle.Blue:
                return(MetroPens.Blue);

            case MetroColorStyle.Green:
                return(MetroPens.Green);

            case MetroColorStyle.Lime:
                return(MetroPens.Lime);

            case MetroColorStyle.Teal:
                return(MetroPens.Teal);

            case MetroColorStyle.Orange:
                return(MetroPens.Orange);

            case MetroColorStyle.Brown:
                return(MetroPens.Brown);

            case MetroColorStyle.Pink:
                return(MetroPens.Pink);

            case MetroColorStyle.Magenta:
                return(MetroPens.Magenta);

            case MetroColorStyle.Purple:
                return(MetroPens.Purple);

            case MetroColorStyle.Red:
                return(MetroPens.Red);

            case MetroColorStyle.Yellow:
                return(MetroPens.Yellow);

            case MetroColorStyle.BlueJeans:
                return(MetroPens.BlueJeans);

            case MetroColorStyle.Bittersweet:
                return(MetroPens.Bittersweet);

            default:
                return(MetroPens.Blue);
            }
        }
예제 #19
0
        public AuswahlDialog(string titel, string[] optionen, MetroColorStyle colorStyle = MetroColorStyle.Red)
        {
            InitializeComponent();
            this.Optionen   = optionen;
            this.Titel      = titel;
            this.ColorStyle = colorStyle;
            this.Style      = colorStyle;

            InitializeData();
        }
예제 #20
0
 public void setColor(MetroColorStyle color)
 {
     BeginInvoke((MethodInvoker) delegate
     {
         Style = color;
         metroStyleExtender1.Style = color;
         metroStyleManager1.Style  = color;
         metroStyleManager1.Style  = color;
     });
 }
예제 #21
0
        /// <summary>
        /// Shows InputBox and returns user-provided string
        /// <para></para>
        /// Returns <b>null</b> if user has clicked "Cancel", empty string if user has just clicked "OK", user-provided string otherwise
        /// </summary>
        /// <param name="prompt">Prompt text</param>
        /// <param name="metroColorStyle">MetroColorStyle of inputbox</param>
        /// <returns></returns>
        public static string Input(string prompt, MetroColorStyle metroColorStyle)
        {
            InputBox bform = new InputBox(metroColorStyle)
            {
                metroLabel1 = { Text = prompt }, temp = null
            };

            bform.ShowDialog();
            return(bform.temp);
        }
예제 #22
0
 public void text_notification(string text, MetroColorStyle color, int duration)
 {
     System.Timers.Timer notificationLabelTimer = new System.Timers.Timer(duration);
     notificationLabelTimer.SynchronizingObject = this;
     notificationLabelTimer.AutoReset           = false;
     notificationLabelTimer.Start();
     notificationLabelTimer.Elapsed += notificationLabelTimer_Elapsed;
     notificationLabel.Style         = color;
     notificationLabel.Text          = text;
 }
예제 #23
0
 public MessageBoxFX(string content, string title = "", MetroColorStyle style = MetroColorStyle.Red, MetroThemeStyle theme = MetroThemeStyle.Dark)
 {
     InitializeComponent();
     Label_Content.Text      = content;
     Label_Title.Text        = title;
     MetroStyleManager.Style = style;
     MetroStyleManager.Theme = theme;
     Text = string.IsNullOrEmpty(title) ? "提示" : title;
     Button_Confirm.Left = (Width - Button_Confirm.Width) / 2;
 }
예제 #24
0
 public void text_notification(string text, MetroColorStyle color, int duration)
 {
     System.Timers.Timer notificationLabelTimer = new System.Timers.Timer(duration);
     notificationLabelTimer.SynchronizingObject = this;
     notificationLabelTimer.AutoReset = false;
     notificationLabelTimer.Start();
     notificationLabelTimer.Elapsed += notificationLabelTimer_Elapsed;
     notificationLabel.Style = color;
     notificationLabel.Text = text;
 }
예제 #25
0
 private void UpdateStatus(string status, MetroColorStyle style = MetroColorStyle.Black)
 {
     if (this.InvokeRequired)
     {
         this.Invoke((MethodInvoker) delegate { UpdateStatus(status, style); });
         return;
     }
     this.labelStatus.Style = style;
     this.labelStatus.Text  = "Status: " + status;
 }
예제 #26
0
        private void settingsSet_Click(object sender, EventArgs e)
        {
            Theme = (MetroThemeStyle)settingsLight.SelectedItem;
            Style = (MetroColorStyle)settingsAccent.SelectedItem;

            using (TextWriter writer = new StreamWriter(path))
            {
                SaveSettings settingsToSave = new SaveSettings(Theme, Style);
                xml.Serialize(writer, settingsToSave);
            }
        }
        /// <summary>
        /// Creates a new metro menu with a particular theme and color
        /// </summary>
        /// <param name="Theme">The metro theme</param>
        /// <param name="Color">The metro color pallet</param>
        public MetroMenu(MetroThemeStyle Theme, MetroColorStyle Color)
            : base()
        {
            this.RenderMode = ToolStripRenderMode.Professional;
            this.TabStop = false;
            this.Name = "MainMenu";
            this.ChangeStyle(Theme, Color);

            this.ItemAdded += MetroMenu_ItemAdded;
            this.ItemRemoved += MetroMenu_ItemRemoved;
        }
예제 #28
0
 internal InputBox(MetroColorStyle metroColorStyle)
 {
     InitializeComponent();
     StyleManager.Style = metroColorStyle;
     button1.Click     += Button1Click;
     button2.Click     += Button2Click;
     BeginInvoke((MethodInvoker) delegate
     {
         Location = MousePosition;
         OnActivated(EventArgs.Empty);
     });
 }
예제 #29
0
        public static Color GetStyleColor(MetroColorStyle style)
        {
            switch (style)
            {
            case MetroColorStyle.Black:
                return(MetroColors.Black);

            case MetroColorStyle.White:
                return(MetroColors.White);

            case MetroColorStyle.Silver:
                return(MetroColors.Silver);

            case MetroColorStyle.Blue:
                return(MetroColors.Blue);

            case MetroColorStyle.LightGreen:
                return(MetroColors.LightGreen);

            case MetroColorStyle.DarkGreen:
                return(MetroColors.DarkGreen);

            case MetroColorStyle.Lime:
                return(MetroColors.Lime);

            case MetroColorStyle.Teal:
                return(MetroColors.Teal);

            case MetroColorStyle.Orange:
                return(MetroColors.Orange);

            case MetroColorStyle.Brown:
                return(MetroColors.Brown);

            case MetroColorStyle.Pink:
                return(MetroColors.Pink);

            case MetroColorStyle.Magenta:
                return(MetroColors.Magenta);

            case MetroColorStyle.Purple:
                return(MetroColors.Purple);

            case MetroColorStyle.Red:
                return(MetroColors.Red);

            case MetroColorStyle.Yellow:
                return(MetroColors.Yellow);

            default:
                return(MetroColors.Blue);
            }
        }
예제 #30
0
        public static void SetStyle(this IContainer container, MetroForm ownerForm, MetroColorStyle formStyle)
        {
            if (container == null)
            {
                container = new Container();
            }
            MetroStyleManager val = new MetroStyleManager(container);

            val.set_Owner((ContainerControl)(object)ownerForm);
            ownerForm.set_Style(formStyle);
            container.SetDefaultStyle(ownerForm, formStyle);
        }
예제 #31
0
        public static SolidBrush GetStyleBrush(MetroColorStyle style)
        {
            switch (style)
            {
            case MetroColorStyle.Black:
                return(MetroBrushes.Black);

            case MetroColorStyle.White:
                return(MetroBrushes.White);

            case MetroColorStyle.Silver:
                return(MetroBrushes.Silver);

            case MetroColorStyle.Blue:
                return(MetroBrushes.Blue);

            case MetroColorStyle.Green:
                return(MetroBrushes.Green);

            case MetroColorStyle.Lime:
                return(MetroBrushes.Lime);

            case MetroColorStyle.Teal:
                return(MetroBrushes.Teal);

            case MetroColorStyle.Orange:
                return(MetroBrushes.Orange);

            case MetroColorStyle.Brown:
                return(MetroBrushes.Brown);

            case MetroColorStyle.Pink:
                return(MetroBrushes.Pink);

            case MetroColorStyle.Magenta:
                return(MetroBrushes.Magenta);

            case MetroColorStyle.Purple:
                return(MetroBrushes.Purple);

            case MetroColorStyle.Red:
                return(MetroBrushes.Red);

            case MetroColorStyle.Yellow:
                return(MetroBrushes.Yellow);

            case MetroColorStyle.Custom:
                return(MetroBrushes.Custom);

            default:
                return(MetroBrushes.Blue);
            }
        }
예제 #32
0
        // Token: 0x06000014 RID: 20 RVA: 0x000023C4 File Offset: 0x000005C4
        public static void SetStyle(this IContainer container, MetroForm ownerForm, MetroColorStyle formStyle)
        {
            if (container == null)
            {
                container = new Container();
            }
            MetroStyleManager metroStyleManager = new MetroStyleManager(container);

            metroStyleManager.Owner = ownerForm;
            ownerForm.Style         = formStyle;
            container.SetDefaultStyle(ownerForm, formStyle);
        }
예제 #33
0
 public void ChangeColorStyle(MetroColorStyle style)
 {
     if (InvokeRequired)
     {
         Invoke((MethodInvoker) delegate { ChangeColorStyle(style); });
     }
     else
     {
         smMain.Style = style;
         Style        = style;
         Refresh();
     }
 }
 /// <summary>
 /// Changes the theme and/or color of this menu to a particular value
 /// </summary>
 /// <param name="Theme">The theme to change to</param>
 /// <param name="Color">The color to change to</param>
 public void ChangeStyle(MetroThemeStyle Theme, MetroColorStyle Color)
 {
     this.MetroTheme = Theme;
     this.MetroColor = Color;
     this.Renderer = new ToolStripProfessionalRenderer(new Drawing.MenuColorPallet(this.MetroTheme, this.MetroColor));
     System.Drawing.Color BC = MetroFramework.Drawing.MetroPaint.BackColor.Form(this.MetroTheme);
     System.Drawing.Color FC = MetroFramework.Drawing.MetroPaint.ForeColor.Title(this.MetroTheme);
     System.Drawing.Color Border = MetroFramework.Drawing.MetroPaint.BorderColor.Form(this.MetroTheme);
     this.BackColor = BC;
     this.ForeColor = FC;
     foreach (var Item in this.Items) ApplyColorsToMenuItem(BC, FC, Item);
     this.Refresh();
 }
예제 #35
0
        public static Color GetMetroColorToSystemColor(MetroColorStyle color)
        {
            switch (color)
            {
            case MetroColorStyle.Black:
                return(Color.FromArgb(0, 0, 0));

            case MetroColorStyle.White:
                return(Color.FromArgb(255, 255, 255));

            case MetroColorStyle.Silver:
                return(Color.FromArgb(85, 85, 85));

            case MetroColorStyle.Blue:
                return(Color.FromArgb(0, 174, 219));

            case MetroColorStyle.Green:
                return(Color.FromArgb(0, 177, 89));

            case MetroColorStyle.Lime:
                return(Color.FromArgb(142, 188, 0));

            case MetroColorStyle.Teal:
                return(Color.FromArgb(0, 170, 173));

            case MetroColorStyle.Orange:
                return(Color.FromArgb(243, 119, 53));

            case MetroColorStyle.Brown:
                return(Color.FromArgb(165, 81, 0));

            case MetroColorStyle.Pink:
                return(Color.FromArgb(231, 113, 189));

            case MetroColorStyle.Magenta:
                return(Color.FromArgb(255, 0, 148));

            case MetroColorStyle.Purple:
                return(Color.FromArgb(124, 65, 153));

            case MetroColorStyle.Red:
                return(Color.FromArgb(209, 17, 65));

            case MetroColorStyle.Yellow:
                return(Color.FromArgb(255, 196, 37));

            default:
                return(Color.FromArgb(0, 174, 219));
            }
        }
예제 #36
0
 private void Watek_DodajKafelek(string ip, MetroColorStyle styl)
 {
     if (InvokeRequired)
     {
         Invoke((MethodInvoker) delegate
         {
             Watek_DodajKafelek2(ip, styl);
         });
     }
     else
     {
         Watek_DodajKafelek2(ip, styl);
     }
 }
예제 #37
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="parent"></param>
 /// <param name="label"></param>
 /// <param name="waitInMs"></param>
 public WaitingOverlay(MetroForm parent, string label, MetroColorStyle metroColorStyle, int waitInMs = 0)
 {
     InitializeComponent();
     parentForm    = parent;
     this.waitInMs = waitInMs;
     Load         += delegate
     {
         Size     = parentForm.Size;
         Location = parentForm.Location;
         panel    = new WaitingOverlaySub(this, metroColorStyle);
         panel.Show(this);
         Label = label;
     };
 }
예제 #38
0
        public AddKey(Main parentForm, Settings settings, MetroThemeStyle theme, MetroColorStyle color, int keyId)
        {
            InitializeComponent();

            _parentForm = parentForm;
            _settings   = settings;
            _keyId      = keyId;

            Theme = theme;
            Style = color;

            metroStyleManager.Theme = theme;
            metroStyleManager.Style = color;
        }
예제 #39
0
        public static SolidBrush GetStyleBrush(MetroColorStyle style)
        {
            switch (style)
            {
                case MetroColorStyle.Black:
                    return MetroBrushes.Black;

                case MetroColorStyle.White:
                    return MetroBrushes.White;

                case MetroColorStyle.Silver:
                    return MetroBrushes.Silver;

                case MetroColorStyle.Blue:
                    return MetroBrushes.Blue;

                case MetroColorStyle.Green:
                    return MetroBrushes.Green;

                case MetroColorStyle.Lime:
                    return MetroBrushes.Lime;

                case MetroColorStyle.Teal:
                    return MetroBrushes.Teal;

                case MetroColorStyle.Orange:
                    return MetroBrushes.Orange;

                case MetroColorStyle.Brown:
                    return MetroBrushes.Brown;

                case MetroColorStyle.Pink:
                    return MetroBrushes.Pink;

                case MetroColorStyle.Magenta:
                    return MetroBrushes.Magenta;

                case MetroColorStyle.Purple:
                    return MetroBrushes.Purple;

                case MetroColorStyle.Red:
                    return MetroBrushes.Red;

                case MetroColorStyle.Yellow:
                    return MetroBrushes.Yellow;

                default:
                    return MetroBrushes.Blue;
            }
        }
예제 #40
0
 public void ChangeStyle(MetroColorStyle style)
 {
     Style = style; msm.Style = style;
 }
예제 #41
0
 private void ChangeStyle(MetroColorStyle style)
 {
     Style = style;
     Main.ChangeStyle(style);
 }
 public MetroProfessionalColorTable(MetroThemeStyle theme, MetroColorStyle style)
 {
     _theme = theme;
     _style = style;
 }
예제 #43
0
        public static Pen GetStylePen(MetroColorStyle style)
        {
            switch (style)
            {
                case MetroColorStyle.Black:
                    return MetroPens.Black;

                case MetroColorStyle.White:
                    return MetroPens.White;

                case MetroColorStyle.Silver:
                    return MetroPens.Silver;

                case MetroColorStyle.Blue:
                    return MetroPens.Blue;

                case MetroColorStyle.Green:
                    return MetroPens.Green;

                case MetroColorStyle.Lime:
                    return MetroPens.Lime;

                case MetroColorStyle.Teal:
                    return MetroPens.Teal;

                case MetroColorStyle.Orange:
                    return MetroPens.Orange;

                case MetroColorStyle.Brown:
                    return MetroPens.Brown;

                case MetroColorStyle.Pink:
                    return MetroPens.Pink;

                case MetroColorStyle.Magenta:
                    return MetroPens.Magenta;

                case MetroColorStyle.Purple:
                    return MetroPens.Purple;

                case MetroColorStyle.Red:
                    return MetroPens.Red;

                case MetroColorStyle.Yellow:
                    return MetroPens.Yellow;

                case MetroColorStyle.BlueJeans:
                    return MetroPens.BlueJeans;

                case MetroColorStyle.Bittersweet:
                    return MetroPens.Bittersweet;

                default:
                    return MetroPens.Blue;
            }
        }
예제 #44
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent(MetroThemeStyle theme, MetroColorStyle style)
        {
            this.metroStyleManager = new MetroFramework.Components.MetroStyleManager();
            this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
            this.metroLabel2 = new MetroFramework.Controls.MetroLabel();
            this.lblLogin = new MetroFramework.Controls.MetroLabel();
            this.lblPassword = new MetroFramework.Controls.MetroLabel();
            this.dateTimePicker2 = new System.Windows.Forms.DateTimePicker();
            this.metroLabel3 = new MetroFramework.Controls.MetroLabel();
            this.metroLabel4 = new MetroFramework.Controls.MetroLabel();
            this.dateTimePicker3 = new System.Windows.Forms.DateTimePicker();
            this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
            this.metroLabel5 = new MetroFramework.Controls.MetroLabel();
            this.metroLabel6 = new MetroFramework.Controls.MetroLabel();
            this.btnOK = new MetroFramework.Controls.MetroButton();
            this.btnCancel = new MetroFramework.Controls.MetroButton();
            this.btnManageBreaks = new MetroFramework.Controls.MetroButton();
            this.lblTimeInMinutes = new MetroLabel();
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
            this.SuspendLayout();

            this.metroStyleManager.Style = metroStyleManager.Style;
            this.metroStyleManager.Theme = metroStyleManager.Theme;
            this.metroStyleManager.OwnerForm = this;
            metroStyleManager.UpdateOwnerForm();
            // 
            // metroLabel1
            // 
            this.metroLabel1.AutoSize = true;
            this.metroLabel1.CustomBackground = false;
            this.metroLabel1.CustomForeColor = false;
            this.metroLabel1.FontSize = MetroFramework.MetroLabelSize.Medium;
            this.metroLabel1.FontWeight = MetroFramework.MetroLabelWeight.Bold;
            this.metroLabel1.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
            this.metroLabel1.Location = new System.Drawing.Point(24, 17);
            this.metroLabel1.Name = "metroLabel1";
            this.metroLabel1.Size = new System.Drawing.Size(94, 19);
            this.metroLabel1.Style = metroStyleManager.Style;
            this.metroLabel1.StyleManager = metroStyleManager;
            this.metroLabel1.TabIndex = 0;
            this.metroLabel1.Text = "Login Name:";
            this.metroLabel1.Theme = metroStyleManager.Theme;
            this.metroLabel1.UseStyleColors = false;
            // 
            // metroLabel2
            // 
            this.metroLabel2.AutoSize = true;
            this.metroLabel2.CustomBackground = false;
            this.metroLabel2.CustomForeColor = false;
            this.metroLabel2.FontSize = MetroFramework.MetroLabelSize.Medium;
            this.metroLabel2.FontWeight = MetroFramework.MetroLabelWeight.Bold;
            this.metroLabel2.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
            this.metroLabel2.Location = new System.Drawing.Point(24, 40);
            this.metroLabel2.Name = "metroLabel2";
            this.metroLabel2.Size = new System.Drawing.Size(77, 19);
            this.metroLabel2.Style = metroStyleManager.Style;
            this.metroLabel2.StyleManager = metroStyleManager;
            this.metroLabel2.TabIndex = 1;
            this.metroLabel2.Text = "Password:"******"lblLogin";
            this.lblLogin.Size = new System.Drawing.Size(41, 19);
            this.lblLogin.Style = metroStyleManager.Style;
            this.lblLogin.StyleManager = metroStyleManager;
            this.lblLogin.TabIndex = 2;
            this.lblLogin.Text = "Login";
            this.lblLogin.Theme = metroStyleManager.Theme;
            this.lblLogin.UseStyleColors = false;
            // 
            // lblPassword
            // 
            this.lblPassword.AutoSize = true;
            this.lblPassword.CustomBackground = false;
            this.lblPassword.CustomForeColor = false;
            this.lblPassword.FontSize = MetroFramework.MetroLabelSize.Medium;
            this.lblPassword.FontWeight = MetroFramework.MetroLabelWeight.Light;
            this.lblPassword.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
            this.lblPassword.Location = new System.Drawing.Point(115, 40);
            this.lblPassword.Name = "lblPassword";
            this.lblPassword.Size = new System.Drawing.Size(64, 19);
            this.lblPassword.Style = metroStyleManager.Style;
            this.lblPassword.StyleManager = metroStyleManager;
            this.lblPassword.TabIndex = 3;
            this.lblPassword.Text = "Password";
            this.lblPassword.Theme = metroStyleManager.Theme;
            this.lblPassword.UseStyleColors = false;
            // 
            // dateTimePicker2
            // 
            this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Time;
            this.dateTimePicker2.Location = new System.Drawing.Point(139, 78);
            this.dateTimePicker2.Name = "dateTimePicker2";
            this.dateTimePicker2.Size = new System.Drawing.Size(94, 20);
            this.dateTimePicker2.TabIndex = 4;
            // 
            // metroLabel3
            // 
            this.metroLabel3.AutoSize = true;
            this.metroLabel3.CustomBackground = false;
            this.metroLabel3.CustomForeColor = false;
            this.metroLabel3.FontSize = MetroFramework.MetroLabelSize.Medium;
            this.metroLabel3.FontWeight = MetroFramework.MetroLabelWeight.Light;
            this.metroLabel3.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
            this.metroLabel3.Location = new System.Drawing.Point(24, 78);
            this.metroLabel3.Name = "metroLabel3";
            this.metroLabel3.Size = new System.Drawing.Size(72, 19);
            this.metroLabel3.Style = metroStyleManager.Style;
            this.metroLabel3.StyleManager = metroStyleManager;
            this.metroLabel3.TabIndex = 5;
            this.metroLabel3.Text = "Start Time:";
            this.metroLabel3.Theme = metroStyleManager.Theme;
            this.metroLabel3.UseStyleColors = false;
            // 
            // metroLabel4
            // 
            this.metroLabel4.AutoSize = true;
            this.metroLabel4.CustomBackground = false;
            this.metroLabel4.CustomForeColor = false;
            this.metroLabel4.FontSize = MetroFramework.MetroLabelSize.Medium;
            this.metroLabel4.FontWeight = MetroFramework.MetroLabelWeight.Light;
            this.metroLabel4.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
            this.metroLabel4.Location = new System.Drawing.Point(24, 111);
            this.metroLabel4.Name = "metroLabel4";
            this.metroLabel4.Size = new System.Drawing.Size(72, 19);
            this.metroLabel4.Style = metroStyleManager.Style;
            this.metroLabel4.StyleManager = metroStyleManager;
            this.metroLabel4.TabIndex = 6;
            this.metroLabel4.Text = "Stop Time:";
            this.metroLabel4.Theme = metroStyleManager.Theme;
            this.metroLabel4.UseStyleColors = false;
            // 
            // dateTimePicker3
            // 
            this.dateTimePicker3.Format = System.Windows.Forms.DateTimePickerFormat.Time;
            this.dateTimePicker3.Location = new System.Drawing.Point(139, 110);
            this.dateTimePicker3.Name = "dateTimePicker3";
            this.dateTimePicker3.Size = new System.Drawing.Size(94, 20);
            this.dateTimePicker3.TabIndex = 7;
            // 
            // numericUpDown1
            // 
            this.numericUpDown1.Location = new System.Drawing.Point(139, 150);
            this.numericUpDown1.Maximum = new decimal(new int[] {
            365,
            0,
            0,
            0});
            this.numericUpDown1.Name = "numericUpDown1";
            this.numericUpDown1.Size = new System.Drawing.Size(94, 20);
            this.numericUpDown1.TabIndex = 8;
            // 
            // metroLabel5
            // 
            this.metroLabel5.AutoSize = true;
            this.metroLabel5.CustomBackground = false;
            this.metroLabel5.CustomForeColor = false;
            this.metroLabel5.FontSize = MetroFramework.MetroLabelSize.Medium;
            this.metroLabel5.FontWeight = MetroFramework.MetroLabelWeight.Light;
            this.metroLabel5.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
            this.metroLabel5.Location = new System.Drawing.Point(24, 150);
            this.metroLabel5.Name = "metroLabel5";
            this.metroLabel5.Size = new System.Drawing.Size(109, 19);
            this.metroLabel5.Style = metroStyleManager.Style;
            this.metroLabel5.StyleManager = metroStyleManager;
            this.metroLabel5.TabIndex = 9;
            this.metroLabel5.Text = "Days (24h cycles):";
            this.metroLabel5.Theme = metroStyleManager.Theme;
            this.metroLabel5.UseStyleColors = false;
            ///
            this.metroLabel6.AutoSize = true;
            this.metroLabel6.CustomBackground = false;
            this.metroLabel6.CustomForeColor = false;
            this.metroLabel6.FontSize = MetroFramework.MetroLabelSize.Medium;
            this.metroLabel6.FontWeight = MetroFramework.MetroLabelWeight.Light;
            this.metroLabel6.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
            this.metroLabel6.Location = new System.Drawing.Point(24, 183);
            this.metroLabel6.Name = "metroLabel6";
            this.metroLabel6.Size = new System.Drawing.Size(150, 19);
            this.metroLabel6.Style = metroStyleManager.Style;
            this.metroLabel6.StyleManager = metroStyleManager;
            this.metroLabel6.TabIndex = 159;
            this.metroLabel6.Text = "Time in minutes:";
            this.metroLabel6.Theme = metroStyleManager.Theme;
            this.metroLabel6.UseStyleColors = false;
            // 
            ///
            this.lblTimeInMinutes.AutoSize = true;
            this.lblTimeInMinutes.CustomBackground = false;
            this.lblTimeInMinutes.CustomForeColor = false;
            this.lblTimeInMinutes.FontSize = MetroFramework.MetroLabelSize.Medium;
            this.lblTimeInMinutes.FontWeight = MetroFramework.MetroLabelWeight.Light;
            this.lblTimeInMinutes.LabelMode = MetroFramework.Controls.MetroLabelMode.Default;
            this.lblTimeInMinutes.Location = new System.Drawing.Point(139, 183);
            this.lblTimeInMinutes.Name = "metroLabel7";
            this.lblTimeInMinutes.Size = new System.Drawing.Size(109, 19);
            this.lblTimeInMinutes.Style = metroStyleManager.Style;
            this.lblTimeInMinutes.StyleManager = metroStyleManager;
            this.lblTimeInMinutes.TabIndex = 13679;
            this.lblTimeInMinutes.Text = "0";
            this.lblTimeInMinutes.Theme = metroStyleManager.Theme;
            this.lblTimeInMinutes.UseStyleColors = false;
            // 
            // btnOK
            // 
            this.btnOK.Highlight = false;
            this.btnOK.Location = new System.Drawing.Point(207, 227);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new System.Drawing.Size(75, 23);
            this.btnOK.Style = metroStyleManager.Style;
            this.btnOK.StyleManager = metroStyleManager;
            this.btnOK.TabIndex = 10;
            this.btnOK.Text = "Save";
            this.btnOK.Theme = metroStyleManager.Theme;
            // 
            // btnCancel
            // 
            this.btnCancel.Highlight = false;
            this.btnCancel.Location = new System.Drawing.Point(10, 227);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(75, 23);
            this.btnCancel.Style = metroStyleManager.Style;
            this.btnCancel.StyleManager = metroStyleManager;
            this.btnCancel.TabIndex = 11;
            this.btnCancel.Text = "Cancel";
            this.btnCancel.Theme = metroStyleManager.Theme;
            // 
            // btnManageBreaks
            // 
            this.btnManageBreaks.Highlight = false;
            this.btnManageBreaks.Location = new System.Drawing.Point(100, 227);
            this.btnManageBreaks.Name = "btnManageBreaks";
            this.btnManageBreaks.Size = new System.Drawing.Size(90, 23);
            this.btnManageBreaks.Style = metroStyleManager.Style;
            this.btnManageBreaks.StyleManager = metroStyleManager;
            this.btnManageBreaks.TabIndex = 11;
            this.btnManageBreaks.Text = "Manage Breaks";
            this.btnManageBreaks.Theme = metroStyleManager.Theme;
            // 
            // SchedulerForm
            // 
            this.ClientSize = new System.Drawing.Size(292, 273);
            this.Controls.Add(this.btnCancel);
            this.Controls.Add(this.btnOK);
            this.Controls.Add(this.btnManageBreaks);
            this.Controls.Add(this.metroLabel5);
            this.Controls.Add(this.numericUpDown1);
            this.Controls.Add(this.dateTimePicker3);
            this.Controls.Add(this.metroLabel4);
            this.Controls.Add(this.metroLabel3);
            this.Controls.Add(this.dateTimePicker2);
            this.Controls.Add(this.lblPassword);
            this.Controls.Add(this.lblLogin);
            this.Controls.Add(this.metroLabel2);
            this.Controls.Add(this.metroLabel1);
            this.Controls.Add(this.metroLabel6);
            this.Controls.Add(this.lblTimeInMinutes);
            this.Location = new System.Drawing.Point(0, 0);
            this.MaximizeBox = false;
            this.MaximumSize = new System.Drawing.Size(292, 273);
            this.MinimizeBox = false;
            this.MinimumSize = new System.Drawing.Size(292, 273);
            this.Name = "SchedulerForm";
            this.Resizable = false;
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }
예제 #45
0
            /// <summary>
            /// Initializes a new instance of the <see cref="MetroCtxRenderer"/> class.
            /// </summary>
            /// <param name="theme">The theme.</param>
            /// <param name="style">The style.</param>
            public MetroCtxRenderer(MetroThemeStyle theme, MetroColorStyle style) : base(new ToolStripColors(theme, style))
            {
                _theme = theme;

            }
예제 #46
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ToolStripColors"/> class.
 /// </summary>
 /// <param name="theme">The theme.</param>
 /// <param name="style">The style.</param>
 public ToolStripColors(MetroThemeStyle theme, MetroColorStyle style)
 {
     _theme = theme;
     _style = style;
 }
예제 #47
0
 public contextcolors(MetroFramework.MetroThemeStyle Theme, MetroColorStyle Style)
 {
     _theme = Theme;
     _style = Style;
 }
예제 #48
0
 public MetroCTXRenderer(MetroFramework.MetroThemeStyle Theme, MetroColorStyle Style) : base(new contextcolors(Theme, Style)) { }
예제 #49
0
 public MetroCTXRenderer(MetroThemeStyle Theme, MetroColorStyle Style)
     : base(new contextcolors(Theme, Style))
 {
     theme = Theme;
     style = Style;
 }
 public MetroToolStripProfessionalRenderer(MetroThemeStyle theme, MetroColorStyle style)
     : base(new MetroProfessionalColorTable(theme, style))
 {
 }
예제 #51
0
		public void text_notification(string text, MetroColorStyle color, int duration) {
			Util.CreateTimer(duration, (timer) => {
				timer.Stop();
				notificationLabel.Text = "";
			});
			notificationLabel.Style = color;
			try { notificationLabel.Text = text; } catch(Exception ex) { }
		}