Exemplo n.º 1
0
        public static void LoadCurrentTheme()
        {
            StreamReader TextFile = new StreamReader(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + @"\ThemeConfig.txt");
            string       CurrentLine;
            int          IndexOfColour;

            while ((CurrentLine = TextFile.ReadLine()) != null)
            {
                IndexOfColour = CurrentLine.IndexOf("#");

                if (CurrentLine.Contains("TitleBarColor: "))
                {
                    ThemeMethods.SetTopBarThemeManual(ColorTranslator.FromHtml(CurrentLine.Substring(IndexOfColour)));
                }
                else if (CurrentLine.Contains("SideBarColor: "))
                {
                    ThemeMethods.SetSideBarThemeManual(ColorTranslator.FromHtml(CurrentLine.Substring(IndexOfColour)));
                }
                else if (CurrentLine.Contains("AccentColor: "))
                {
                    ThemeMethods.SetThemeAccentManual(ColorTranslator.FromHtml(CurrentLine.Substring(IndexOfColour)));
                }
            }

            TextFile.Dispose();
        }
Exemplo n.º 2
0
        ///
        /// Sets up swappable screens!
        ///
        public void SetupSwappableScreens()
        {
            this.IsMdiContainer = true;

            ThemeMenu = new ThemeMenuTinyUI();
            ThemeMethods.DoThemeAssets(ThemeMenu);
            Program.OpenedForms.Add(ThemeMenu);
            ThemeMenu.MdiParent = this;

            WelcomeMenu = new WelcomeScreenTinyUI();
            ThemeMethods.DoThemeAssets(WelcomeMenu);
            Program.OpenedForms.Add(WelcomeMenu);
            WelcomeMenu.MdiParent = this;

            WarpUtilitiesMenu = new WarpUtilities();
            ThemeMethods.DoThemeAssets(WarpUtilitiesMenu);
            Program.OpenedForms.Add(WarpUtilitiesMenu);
            WarpUtilitiesMenu.MdiParent = this;

            // Warp Menu Sub Menu
            ThemeMethods.DoThemeAssets(WarpUtilitiesMenu.WarpInformationOverlay);
            Program.OpenedForms.Add(WarpUtilitiesMenu.WarpInformationOverlay);

            OptionsMenu = new OptionsScreenTinyUI();
            ThemeMethods.DoThemeAssets(OptionsMenu);
            Program.OpenedForms.Add(OptionsMenu);
            OptionsMenu.MdiParent = this;

            ThemeMDIClients();
        }
Exemplo n.º 3
0
        ThemeSampleMenu ThemeSampleMenu;       /// Must declare swappable screen and update SetupSwappableScreens() for new screens.

        ///
        /// Sets up swappable screens!
        ///
        public void SetupSwappableScreens()
        {
            this.IsMdiContainer = true;

            ControlsSampleMenu = new ControlsSampleMenu();
            ThemeMethods.DoThemeAssets(ControlsSampleMenu);
            Program.OpenedForms.Add(ControlsSampleMenu);
            ControlsSampleMenu.MdiParent = this;

            ThemeSampleMenu = new ThemeSampleMenu();
            ThemeMethods.DoThemeAssets(ThemeSampleMenu);
            Program.OpenedForms.Add(ThemeSampleMenu);
            ThemeSampleMenu.MdiParent = this;

            ThemeMDIClients();
        }
Exemplo n.º 4
0
        public void InitializeSystem()
        {
            Toolstrip_Bottom.Renderer = new MyToolStrip();                                                                            // Do not draw an outline on toolstrips!
            this.Region = System.Drawing.Region.FromHrgn(WinAPIComponents.CreateRoundRectRgn(0, 0, this.Width, this.Height, 30, 30)); // Rounded edges!

            Program.xFonts.SetupMainWindow(this);                                                                                     // Call SetupFonts in xFonts object.
            ButtonColour = Color.FromArgb(232, 234, 246);                                                                             // Set the button default colour to the background colour of the light control buttons.

            /// Set local theme overrides!
            RedirectThemeValues();               // Must preceede following.
            ThemeMethods.DoThemeAssets(this);    // Automatically theme assets!

            SetupSwappableScreens();             // If using Swappable forms!
            ThemeMethods.AutoLoadCurrentTheme(); // Automatically theme the world!

            SplashLoader.xSetPercentage(100);
            SplashLoader.UpdateStatusCircleComplete = true;
        }
 private void Btn_Load_Click(object sender, EventArgs e)
 {
     ThemeMethods.LoadCurrentTheme();
     MessageBox.Show("Load successful!");
 }
 private void Btn_Save_Click(object sender, EventArgs e)
 {
     ThemeMethods.SaveCurrentTheme();
     MessageBox.Show("Save successful!");
 }
Exemplo n.º 7
0
 private void Btn_Save_Click(object sender, EventArgs e)
 {
     ThemeMethods.SaveCurrentTheme();
 }
Exemplo n.º 8
0
 private void Btn_Load_Click(object sender, EventArgs e)
 {
     ThemeMethods.LoadCurrentTheme();
 }