Пример #1
0
        private void CheckBox_Checked(object sender, RoutedEventArgs e)
        {
            CheckBox rb = sender as CheckBox;

            if (rb != null)
            {
                if (Convert.ToBoolean(rb.IsChecked))
                {
                    ClassSetUpUser.ShovH = false;
                    ClassSetUpUser.saveUseSet();
                }
                else
                {
                    ClassSetUpUser.ShovH = true;
                    ClassSetUpUser.saveUseSet();
                }
            }
        }
Пример #2
0
        private async void RadioButton_Checked(object sender, RoutedEventArgs e)
        {
            RadioButton rb = sender as RadioButton;

            if (rb != null)
            {
                MessageDialog messageDialog = new MessageDialog("Параметры будут применены после перезагрузки приложения");
                string        colorName     = rb.Tag.ToString();
                switch (colorName)
                {
                case "Light":
                    try
                    {
                        ClassSetUpUser.Application = "Light";
                        ClassSetUpUser.saveUseSet();
                        if (!ClassSetUpUser.start)
                        {
                            await messageDialog.ShowAsync();
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageDialog message = new MessageDialog(ex.ToString());
                        await message.ShowAsync();
                    }
                    break;

                case "Dark":
                    ClassSetUpUser.Application = "Dark";
                    ClassSetUpUser.saveUseSet();
                    if (!ClassSetUpUser.start)
                    {
                        await messageDialog.ShowAsync();
                    }

                    break;
                }
            }
            ClassSetUpUser.start = false;
        }
Пример #3
0
 private void AppBarButton_Click_1(object sender, RoutedEventArgs e)
 {
     ClassSetUpUser.saveUseSet();
 }