AddFormToManage() 공개 메소드

public AddFormToManage ( MaterialSkin.Controls.MaterialForm materialForm ) : void
materialForm MaterialSkin.Controls.MaterialForm
리턴 void
예제 #1
1
 public Setting(Login login)
 {
     InitializeComponent();;
     _login = login;
     materialSkinManager = _login._main.materialSkinManager;
     materialSkinManager.AddFormToManage(this);
 }
예제 #2
1
 public MemberSearch()
 {
     InitializeComponent();
     materialSkinManager = MaterialSkinManager.Instance;
     materialSkinManager.AddFormToManage(this);
     materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
 }
예제 #3
0
        /// <summary>
        /// Method to run all code upon startup.
        /// </summary>
        public Form1()
        {
            InitializeComponent();

            Directory.CreateDirectory("cards");//if the cards/ directory is not present, create one
            this.cardDir = getCardsDirectory();//set the global variable to the full path
            this.collection = makeList();

            // Initialize MaterialSkinManager with theme and color scheme
            materialSkinManager = MaterialSkinManager.Instance;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Green700, Primary.Green200, Accent.Red100, TextShade.WHITE);

            //populate the radio button panel under 'Create' tab
            populatePanel(readCardPanel);

            if (Directory.GetDirectories(this.cardDir).Length == 0)
            {
                materialLabel2.Text = "Get started by creating a new card group under 'Groups'.";
                materialLabel2.Location = new Point(165, 50);
            }
            else
            {
                materialLabel2.Text = "Select a card group to read.";
                materialLabel2.Location = new Point(258, 50);
            }

            populatePanel(createCardPanel);
            populatePanel(groupPanel);
        }
예제 #4
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;
            }
        }
예제 #5
0
 private void DesignerLogin()
 {
     MaterialSkin.MaterialSkinManager skinManager = MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     skinManager.ColorScheme = new ColorScheme(Primary.LightBlue900, Primary.LightBlue900, Primary.LightBlue900, Accent.LightBlue700, TextShade.WHITE);
 }
        private void Form1_Load(object sender, EventArgs e)
        {
            MaterialSkin.MaterialSkinManager sknmgr = MaterialSkin.MaterialSkinManager.Instance;
            sknmgr.AddFormToManage(this);

            sknmgr.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
            sknmgr.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Green400, MaterialSkin.Primary.Green700, MaterialSkin.Primary.Green500, MaterialSkin.Accent.Green400, MaterialSkin.TextShade.WHITE);
        }
예제 #7
0
 public Form1()
 {
     InitializeComponent();
     MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.LightBlue400, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.Blue500, Accent.Orange700, MaterialSkin.TextShade.WHITE);
 }
예제 #8
0
 public IstatistikSonuc()
 {
     InitializeComponent();
     MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.DARK;
     skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Green600, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.BlueGrey500, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
 }
예제 #9
0
 public frmDangNhap()
 {
     InitializeComponent();
     MaterialSkin.MaterialSkinManager manager = MaterialSkin.MaterialSkinManager.Instance;
     manager.AddFormToManage(this);
     manager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     manager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Blue300, MaterialSkin.Primary.Blue500, MaterialSkin.Primary.Blue500, MaterialSkin.Accent.LightBlue400, MaterialSkin.TextShade.WHITE);
 }
예제 #10
0
 public frmRegistro()
 {
     InitializeComponent();
     materialSkinManager = MaterialSkinManager.Instance;
     materialSkinManager.AddFormToManage(this);
     materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
     materialSkinManager.ColorScheme = new ColorScheme(Primary.LightBlue900, Primary.Grey400, Primary.Grey400, Accent.Yellow700, TextShade.WHITE);
 }
예제 #11
0
 public frmInfo()
 {
     InitializeComponent();
     skinManager = MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkinManager.Themes.DARK;
     skinManager.ColorScheme = new ColorScheme(Primary.Green600, Primary.Grey600, Primary.Grey900, Accent.LightBlue200, TextShade.WHITE);
 }
예제 #12
0
        public frmInicio()
        {
            InitializeComponent();

            materialSkinManager = MaterialSkinManager.Instance;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);
        }
예제 #13
0
 public BarcodeEncoderDecoder()
 {
     InitializeComponent();
     skinManager = MaterialSkin.MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.EnforceBackcolorOnAllComponents = false;
     skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     skinManager.ColorScheme = new ColorScheme(Primary.LightBlue700, Primary.LightBlue700, Primary.LightBlue700, Accent.LightBlue400, TextShade.WHITE);
 }
예제 #14
0
        public Load()
        {
            InitializeComponent();

            MaterialSkin.MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.Blue300, Primary.Blue400, Primary.Blue200, Accent.Red100, TextShade.WHITE);
        }
예제 #15
0
 public ConfigureParameters()
 {
     InitializeComponent();
     skinManager = MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
     skinManager.ColorScheme = new ColorScheme(Primary.BlueGrey700, Primary.Grey600, Primary.Grey900, Accent.LightBlue200, TextShade.WHITE);
     showCurrentParamsInWindow(ConfigurationManager.OpenExeConfiguration(Application.ExecutablePath));
 }
 public ESPconfiguration(string name)
 {
     InitializeComponent();
     this.btnName = name;
     skinManager  = MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkinManager.Themes.LIGHT;
     skinManager.ColorScheme = new ColorScheme(Primary.BlueGrey700, Primary.Grey600, Primary.Grey900, Accent.LightBlue200, TextShade.WHITE);
 }
예제 #17
0
 public Auth()
 {
     InitializeComponent();
     //Кастоматизация дизайна при помощи MaterialSkin.dll
     MaterialSkin.MaterialSkinManager SkinManager = MaterialSkin.MaterialSkinManager.Instance;
     SkinManager.AddFormToManage(this);
     SkinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     SkinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Teal800, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
 }
예제 #18
0
 public register()
 {
     InitializeComponent();
     reg_btn.Enabled = false;
     MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.DARK;
     skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Blue900, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.BlueGrey500, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
     this.MaximizeBox        = false;
 }
        public CoreMusicApp()
        {
            restoreMaxiState();
            rolling_size = this.ClientSize;
            last_size = this.ClientSize;
            Icon = Properties.Resources.MainIcon;
            Text = "Google Music Player";
            StartPosition = FormStartPosition.Manual;
            BackColor = Color.Black;
            // Stop the form disapearing
            MinimumSize = new Size(100, 100);

            skin = MaterialSkinManager.Instance;
            skin.AddFormToManage(this);
            if (Properties.Settings.Default.CustomTheme)
            {
                darkTheme();
            }
            else
            {
                lightTheme();
            }

            // Handle smaller mini player by changing the browser zoom level
            ResizeEnd += new EventHandler(ResizeEnd_ZoomHandler);

            // Setup the Web Browser
            InitializeCEF();

            // Don't forget to save all our settings
            FormClosed += (send, ev) =>
            {
                if (mini)
                {
                    saveMiniState();
                } else
                {
                    if (WindowState != FormWindowState.Normal)
                    {
                        WindowState = FormWindowState.Normal;
                    }
                    if (Maximized)
                    {
                        MaximizeWindow(false);
                    }
                    saveMaxiState();
                }
                Properties.Settings.Default.Save();
            };

            // Check for updates on the Github Release API
            checkForUpdates();
            RegisterKeyHooks();
        }
예제 #20
0
 public Personel_Ekrani()
 {
     InitializeComponent();
     MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.DARK;
     skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Grey600, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.Blue500, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);
     CMG.SubeIndeksi(new String(Giris_Ekrani.girilenNumara.ToCharArray(0, 5)));
     aktifPersonel = CMG.SeciliSube().PersonelGetir(Giris_Ekrani.girilenNumara);
     GorunmezYap();
 }
예제 #21
0
 public MainForm()
 {
     InitializeComponent();
     PopulateFunctions();
     PopulateMethods();
     PopulateAlphaMethods();
     _materialSkinManager = MaterialSkinManager.Instance;
     _materialSkinManager.AddFormToManage(this);
     _materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500,
         Accent.LightBlue200, TextShade.WHITE);
 }
예제 #22
0
        public RetiroDolares(string clienteIngresado)
        {
            InitializeComponent();

            materialSkinManager = MaterialSkinManager.Instance;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);

            // Definiendo los valores del cliente
            elCliente = Cliente.ObtenerCliente(clienteIngresado);
        }
예제 #23
0
 private void InitUI()
 {
     MaterialSkin.MaterialSkinManager skinManager = MaterialSkinManager.Instance;
     skinManager.AddFormToManage(this);
     skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
     skinManager.ColorScheme = new ColorScheme(
         MaterialSkin.Primary.Green600,
         MaterialSkin.Primary.BlueGrey900,
         MaterialSkin.Primary.Blue500,
         Accent.Orange700,
         MaterialSkin.TextShade.WHITE
         );
     tbUsername.Focus();
 }
예제 #24
0
        public ServerForm()
        {
            InitializeComponent();

            server = new Server();
            server.RemoteComputersListChangedEvent += UpdateRemoteComputers;


            MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance;
            skinManager.AddFormToManage(this);
            skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
            skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Amber900, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.Green300, MaterialSkin.Accent.Orange700, MaterialSkin.TextShade.WHITE);

            Label7.Text = Environment.MachineName;
            Label6.Text = Dns.GetHostByName(Environment.MachineName).AddressList[0].ToString();
        }
예제 #25
0
파일: FormBase.cs 프로젝트: hernanjhc/ERP
        protected FormBase()
        {
            //    FormBorderStyle = FormBorderStyle.FixedSingle;
            MaximizeBox   = false;
            MinimizeBox   = false;
            ShowInTaskbar = false;
            SizeGripStyle = SizeGripStyle.Hide;
            StartPosition = FormStartPosition.CenterScreen;
            //Icon = Properties.Resources.app2;

            //color form
            MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance;
            skinManager.AddFormToManage(this);
            skinManager.Theme = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
            //skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.LightBlue400, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.Blue500, Accent.Orange700, MaterialSkin.TextShade.WHITE);
            skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Cyan700, MaterialSkin.Primary.Cyan700, MaterialSkin.Primary.Blue500, Accent.LightBlue400, MaterialSkin.TextShade.WHITE);
        }
예제 #26
0
        public RatingForm(int salonId)
        {
            InitializeComponent();
            materialSkinManager = MaterialSkin.MaterialSkinManager.Instance;
            materialSkinManager.EnforceBackcolorOnAllComponents = true;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Indigo500,
                                                                           MaterialSkin.Primary.Indigo700,
                                                                           MaterialSkin.Primary.Indigo100,
                                                                           MaterialSkin.Accent.Pink200,
                                                                           TextShade.WHITE);

            _ratingControler = new RatingControler();
            rating           = 0.0;
            this.salonId     = salonId;
        }
예제 #27
0
        public Home()
        {
            MaterialSkin.MaterialSkinManager skin_manager = MaterialSkin.MaterialSkinManager.Instance;
            skin_manager.AddFormToManage(this);
            skin_manager.Theme = MaterialSkin.MaterialSkinManager.Themes.DARK;
            MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance;

            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = MaterialSkinManager.Themes.DARK;

            // Configure color schema
            //materialSkinManager.ColorScheme = new ColorScheme(
            //    Primary.Blue400, Primary.ggr
            //    Primary.Blue500, Accent.LightBlue200,
            //    TextShade.WHITE
            //);
            InitializeComponent();
        }
예제 #28
0
        public AddCostumer()
        {
            MaterialSkin.MaterialSkinManager skin_manager = MaterialSkin.MaterialSkinManager.Instance;
            skin_manager.AddFormToManage(this);
            skin_manager.Theme = MaterialSkin.MaterialSkinManager.Themes.DARK;
            MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance;

            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;

            // Configure color schema
            materialSkinManager.ColorScheme = new ColorScheme(
                Primary.Blue400, Primary.Blue500,
                Primary.Blue500, Accent.LightBlue200,
                TextShade.WHITE
                );
            InitializeComponent();
        }
예제 #29
0
 public Main()
 {
     InitializeComponent();
     materialSkinManager = MaterialSkinManager.Instance;
     materialSkinManager.ColorScheme = new ColorScheme(Primary.Blue400, Primary.LightBlue800, Primary.BlueGrey400,
                                                        Accent.LightBlue400, TextShade.WHITE);
     if (Settings.Default.LightTheme)
     {
         materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
     }
     else
     {
         materialSkinManager.Theme = MaterialSkinManager.Themes.DARK;
     }
     materialSkinManager.AddFormToManage(this);
     if (!DesignMode)
     {
         if (silentStart) System.Threading.Thread.Sleep(2000);
         _login = new Login(this);
     }
 }
예제 #30
0
        public Form1()
        {
            InitializeComponent();

            /* MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance;
             * materialSkinManager.AddFormToManage(this);
             * materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
             *
             *
             * // Configure color schema
             * materialSkinManager.ColorScheme = new ColorScheme(
             *   Primary.Blue400, Primary.Blue500,
             *   Primary.Blue500, Accent.LightBlue200,
             *   TextShade.WHITE
             * );*/

            MaterialSkin.MaterialSkinManager skinManager = MaterialSkin.MaterialSkinManager.Instance;
            skinManager.AddFormToManage(this);
            skinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
            skinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.LightBlue400, MaterialSkin.Primary.BlueGrey900, MaterialSkin.Primary.Blue500, Accent.Orange700, MaterialSkin.TextShade.WHITE);
        }
예제 #31
0
        public MainForm()
        {
            InitializeComponent();
            ApiHelper.InitializeClient();

            materialSkinManager = MaterialSkin.MaterialSkinManager.Instance;
            materialSkinManager.EnforceBackcolorOnAllComponents = true;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme       = MaterialSkin.MaterialSkinManager.Themes.LIGHT;
            materialSkinManager.ColorScheme = new MaterialSkin.ColorScheme(MaterialSkin.Primary.Indigo500,
                                                                           MaterialSkin.Primary.Indigo700,
                                                                           MaterialSkin.Primary.Indigo100,
                                                                           MaterialSkin.Accent.Pink200,
                                                                           TextShade.WHITE);

            _vehicleControler              = new VehicleControler();
            _ratingControler               = new RatingControler();
            _carShowroomControler          = new CarShowroomControler();
            _carShowroomContainerControler = new CarShowroomContainerControler();

            VehicleListData.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            KoszykList.SelectionMode      = DataGridViewSelectionMode.FullRowSelect;
        }
예제 #32
0
 public void AddFormToDesinger(MaterialForm materialForm)
 {
     manager.AddFormToManage(materialForm);
 }
        public CoreMusicApp()
        {
            PlaybackAPI.Instance.UpdateApplicationStatus(true);

            restoreMaxiState();
            rolling_size = this.ClientSize;
            last_size = this.ClientSize;
            Icon = Properties.Resources.MainIcon;
            Text = "Google Music Player";
            StartPosition = FormStartPosition.Manual;
            BackColor = Color.Black;
            // Stop the form disapearing
            MinimumSize = new Size(100, 100);

            // Initially Hide
            Opacity = 0;

            // Show Splash Screen
            splash = new SplashScreen();
            splash.Show();
            splash.Location = new Point(Location.X + (Width / 2) - (splash.Width / 2), Location.Y + (Height / 2) - (splash.Height / 2));

            skin = MaterialSkinManager.Instance;
            skin.AddFormToManage(this);
            if (Properties.Settings.Default.CustomTheme)
            {
                darkTheme();
            }
            else
            {
                lightTheme();
            }

            // Handle smaller mini player by changing the browser zoom level
            ResizeEnd += new EventHandler(ResizeEnd_ZoomHandler);

            // Setup the Web Browser
            InitializeCEF();

            // Update PlaybackAPI to reflect the closed application
            FormClosing += (send, ev) =>
            {
                PlaybackAPI.Instance.UpdateApplicationStatus(false);
            };

            // Don't forget to save all our settings
            FormClosed += (send, ev) =>
            {
                if (mini)
                {
                    saveMiniState();
                } else
                {
                    if (WindowState != FormWindowState.Normal)
                    {
                        WindowState = FormWindowState.Normal;
                    }
                    if (Maximized)
                    {
                        MaximizeWindow(false);
                    }
                    saveMaxiState();
                }
                Properties.Settings.Default.Save();
            };

            // Check for updates on the Github Release API
            RegisterKeyHooks();
            InitializeUpdater();
        }
예제 #34
0
        public FormMain()
        {
            InitializeComponent();

            menuStrip.Renderer = new MyRenderer();
            menu_Tools_Autocat_List.Renderer = new MyRenderer();
            contextCat.Renderer = new MyRenderer();
            contextGame.Renderer = new MyRenderer();
            contextGameFav.Renderer = new MyRenderer();
            contextGameHidden.Renderer = new MyRenderer();
            contextGameAddCat.Renderer = new MyRenderer();
            contextGameRemCat.Renderer = new MyRenderer();
            contextAutoCat.Renderer = new MyRenderer();

            // Initialize MaterialSkinManager
            materialSkinManager = MaterialSkinManager.Instance;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = new DarkTheme();
            materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue700, TextShade.WHITE);

            lstCategories.BackColor = formColor;
            lstCategories.ForeColor = textColor;

            InitializeLstGames();
        }
        public UpdateDialog(string changeLog, string oldVersion, string newVersion)
        {
            // Hide some controls
            MaximizeBox = false;
            MinimizeBox = false;
            
            // Theme it :D
            skin = MaterialSkinManager.Instance;
            // Small color change between the update dialog and the core app
            MaterialSkinManager.BACKGROUND_LIGHT = Color.FromArgb(255, 255, 255, 255);
            FormClosing += (send, res) =>
            {
                MaterialSkinManager.BACKGROUND_LIGHT = Color.FromArgb(255, 239, 108, 0);
            };
            // Material skin should manage this form
            skin.AddFormToManage(this);
            SetTopLevel(true);
            InitializeComponent();

            // Click hooks
            this.notNowButton.MouseClick += async (res, send) =>
            {
                await TaskEx.Delay(400);
                Close();
            };
            this.updateButton.MouseClick += async (res, send) =>
            {
                DialogResult = DialogResult.Yes;
                await TaskEx.Delay(400);
                Close();
            };

            // Calculate how big the change log is
            string[] lines = changeLog.Split(new string[] { "\n" }, StringSplitOptions.None);
            int drawnLines = 0;
            int lineHeight = 20;
            foreach(string line in lines) {
                drawnLines += (int)Math.Ceiling((double)((TextRenderer.MeasureText(line, changeLogText.Font).Width) / (double)(changeLogText.Width)));
            }
            // Put the changelog text into the label
            changeLogText.Text = changeLog;

            // Update the size and position of controls to accomodate the changelog
            changeLogText.Size = new Size(changeLogText.Size.Width, lineHeight * drawnLines);
            ClientSize = new Size(500, 140 + Math.Max(160, lineHeight * drawnLines));
            notNowButton.Location = new Point(notNowButton.Location.X, ClientSize.Height - 43);
            updateButton.Location = new Point(updateButton.Location.X, ClientSize.Height - 43);

            // Position the update notification in the center of the primary screen
            Rectangle area = Screen.PrimaryScreen.WorkingArea;
            StartPosition = FormStartPosition.Manual;
            Screen s = Screen.PrimaryScreen;
            Point loc = s.WorkingArea.Location;
            int X = (s.WorkingArea.Width / 2) - (Size.Width / 2) + loc.X;
            int Y = (s.WorkingArea.Height / 2) - (Size.Height / 2) + loc.Y;
            Location = new Point((X > 0 ? X : 0), (Y > 0 ? Y : 0));

            DialogResult = DialogResult.Cancel;
        }
예제 #36
-1
        public MainForm()
        {
            InitializeComponent();

            // Initialize MaterialSkinManager
            materialSkinManager = MaterialSkinManager.Instance;
            materialSkinManager.AddFormToManage(this);
            materialSkinManager.Theme = new LightTheme();
            materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);

            // Add dummy data to the listview
            seedListView();
        }