コード例 #1
0
ファイル: Settings.xaml.cs プロジェクト: msh2050/MoalemYar
        private void LoadSettings()
        {
            if (AppVariable.ReadBoolSetting(AppVariable.CredentialLogin))
            {
                swLogin.IsChecked = true;
            }
            else
            {
                swLogin.IsChecked = false;
            }

            if (AppVariable.ReadBoolSetting(AppVariable.Autorun))
            {
                swAutoStart.IsChecked = true;
            }
            else
            {
                swAutoStart.IsChecked = false;
            }

            if (AppVariable.ReadBoolSetting(AppVariable.AutoSendReport))
            {
                swAutoReport.IsChecked = true;
            }
            else
            {
                swAutoReport.IsChecked = false;
            }

            var hb_Menu = AppVariable.ReadBoolSetting(AppVariable.HamburgerMenu);

            Hamborger_Menu.IsChecked = hb_Menu;

            var color = (Color)ColorConverter.ConvertFromString(AppVariable.ReadSetting(AppVariable.SkinCode));
            var brush = new SolidColorBrush(color);

            color1.Background = brush;
        }