コード例 #1
0
        public screenSettings()
        {
            InitializeComponent();
            pageSettings = this;
            DBM.SQLInitialise();
            populateServers();

            List <string> config = CFM.ReadSettings();

            cboSettingsClrSch.SelectedValue = config[4];

            if (config[4] == "Light Theme")
            {
            }
            else if (config[4] == "Dark Theme")
            {
                VM.DarkTheme("screenSettings");
            }
        }
コード例 #2
0
        public screenStartup()
        {
            InitializeComponent();

            pageStartup = this;
            DBM.SQLInitialise();
            populateServers();

            MainWindow.main.ResizeMode = ResizeMode.NoResize;

            config = CFM.ReadSettings();

            if (config[4] == "Light Theme")
            {
            }
            else if (config[4] == "Dark Theme")
            {
                VM.DarkTheme("screenStartup");
            }

            Panel mainContainer = (Panel)this.Content;

            /// GetAll UIElement
            UIElementCollection element = mainContainer.Children;

            /// casting the UIElementCollection into List
            List <FrameworkElement> lstElement = element.Cast <FrameworkElement>().ToList();

            /// Geting all Control from list
            var lstControl = lstElement.OfType <Control>();

            foreach (Control control in lstControl)
            {
                Debug.WriteLine(control.GetType().ToString());
            }

            if (Convert.ToBoolean(config[0]) == true)
            {
                this.cbRememberUser.IsChecked = true;
                this.tbStartupUsername.Text   = config[1];
            }
        }