Beispiel #1
0
        private void mnSetting_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                SettingWindow sw = new SettingWindow()
                {
                    Owner = this
                };
                sw.BoardFontInfo   = FontInfo.GetControlFont(this.tbBoard);
                sw.BoardBackground = this.tbBoard.Background;
                if (sw.ShowDialog() == true)
                {
                    RegistryHelper regHelper = new RegistryHelper(this);
                    regHelper.SaveSettings();
                    this.HighlightCurrentString();
                    this.ResetClientsUpdate();
                }
            }
            catch (Exception ex)
            {
#if DEBUG
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex.StackTrace);
#endif
                MessageBox.Show(ex.Message, "Применение (сохранение) настроек", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
Beispiel #2
0
        private void mnSetting_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                SettingWindow sw = new SettingWindow()
                {
                    Owner = this
                };
                sw.BoardFontInfo   = FontInfo.GetControlFont(this.tbBoard);
                sw.BoardBackground = this.tbBoard.Background;

                if (sw.ShowDialog() == true)
                {
                    FontInfo.ApplyFont(this.tbBoard, sw.BoardFontInfo);
                    this.tbBoard.Background = sw.BoardBackground;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                MessageBox.Show(ex.Message, "Применение настроек", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
Beispiel #3
0
        private void mnSetting_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                SettingWindow sw = new SettingWindow() { Owner = this };
                sw.BoardFontInfo = FontInfo.GetControlFont(this.tbBoard);
                sw.BoardBackground = this.tbBoard.Background;

                if (sw.ShowDialog() == true)
                {
                    FontInfo.ApplyFont(this.tbBoard, sw.BoardFontInfo);
                    this.tbBoard.Background = sw.BoardBackground;
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                MessageBox.Show(ex.Message, "Применение настроек", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }