コード例 #1
0
        private void galnetAlwaysOnUnchecked(object sender, RoutedEventArgs e)
        {
            GalnetConfiguration configuration = GalnetConfiguration.FromFile();

            configuration.galnetAlwaysOn = galnetAlwaysOn.IsChecked.Value;
            configuration.ToFile();
            galnetMonitor()?.Reload();
        }
コード例 #2
0
        public ConfigurationWindow()
        {
            InitializeComponent();

            monitor = ((GalnetMonitor)EDDI.Instance.ObtainMonitor("Galnet monitor"));

            GalnetConfiguration configuration = GalnetConfiguration.FromFile();

            languageComboBox.SelectedValue = configuration.language;
        }
コード例 #3
0
        public ConfigurationWindow()
        {
            InitializeComponent();

            GalnetConfiguration         configuration = GalnetConfiguration.FromFile();
            Dictionary <string, string> langs         = galnetMonitor()?.GetGalnetLocales();

            languageComboBox.ItemsSource   = langs.Keys;
            languageComboBox.SelectedValue = configuration.language;
            galnetAlwaysOn.IsChecked       = configuration.galnetAlwaysOn;
        }
コード例 #4
0
ファイル: GalnetMonitor.cs プロジェクト: lagoth/EDDI
        public GalnetMonitor()
        {
            // Remove the old configuration file if it still exists
            if (File.Exists(Constants.DATA_DIR + @"\galnet"))
            {
                try
                {
                    File.Delete(Constants.DATA_DIR + @"\galnet");
                }
                catch { }
            }

            configuration = GalnetConfiguration.FromFile();
        }
コード例 #5
0
        private void onLanguageChanged(object sender, SelectionChangedEventArgs e)
        {
            string language = (string)((ComboBox)e.Source).SelectedValue;
            GalnetConfiguration configuration = GalnetConfiguration.FromFile();

            if (language != null && language != configuration.language)
            {
                // If the language changes we clear out the old articles
                GalnetSqLiteRepository.Instance.DeleteNews();
                configuration.lastuuid = null;
                configuration.language = language;
                configuration.ToFile();
                galnetMonitor()?.Reload();
            }
        }
コード例 #6
0
ファイル: GalnetMonitor.cs プロジェクト: lagoth/EDDI
 public void Reload()
 {
     configuration = GalnetConfiguration.FromFile();
 }