public Window_Setting()
 {
     InitializeComponent();
     settings = Settings.Reload();
     for (double i = 7.5; i < 28; i = i + 0.5)
     {
         Combobox_FontSize.Items.Add(i);
     }
     Combobox_FontSize.SelectedItem         = settings.FontSize;
     Combobox_AddonFile.ItemsSource         = Dictionary_Addons.ReloadList();
     Combobox_AddonFile.SelectedItem        = settings.AddonFile;
     Combobox_Language.ItemsSource          = MainWindow.Descriptions_Chinese.LanguageList;
     Combobox_Language.SelectedIndex        = Combobox_Language.Items.Count > 0 ? 0 : -1;
     TextBox_FontColor.Text                 = settings.FontColor.ToString();
     Checkbox_AutoCopyToClipboard.IsChecked = settings.AutoCopyToClipboard;
 }
        public MainWindow()
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            InitializeComponent();
            DataContext = this;
            Settings.Reload();
            TextSize  = Settings.FontSize;
            TextColor = Settings.FontColor;

            Descriptions_Origin  = AnalyzeTxt.AnalyzeTextFile(App.Filename_Origin);
            Descriptions_Chinese = AnalyzeTxt.AnalyzeTextFile(App.Filename_Translate);
            Dictionary_ItemName  = AnalyzeDatcs.GetDictionary(AnalyzeDatcs.ConvertDatToCSV(App.Filename_Words));

            if (!Directory.Exists(App.Directory_BaseType) || !File.Exists(Path.Combine(App.Directory_BaseType, "Active+Skill+Gem.json")))
            {
                BaseTypeHelper.DownloadAsync().Wait();
            }
            var jsonList = Directory.GetFiles(App.Directory_BaseType, "*.json").ToList();

            foreach (var x in jsonList)
            {
                Dictionary_BaseType = BaseType.AnalyzeJsonFile(x, Dictionary_BaseType);
            }

            if (!string.IsNullOrWhiteSpace(Settings.AddonFile))
            {
                Dictionary_Addons.Reload(Settings.AddonFile);
            }
            ApplicationHelper applicationHelper = new ApplicationHelper();

            applicationHelper.ForegroundWindowChanged += () =>
            {
                POE_Foreground = ApplicationHelper.IsPathOfExileTop(Handle);
                Opacity        = POE_Foreground ? 1 : 0;
                if (POE_Foreground)
                {
                    POE_Rect = ApplicationHelper.PathOfExileDimentions;
                    Left     = POE_Rect.Left;
                    Top      = POE_Rect.Top;
                    Width    = POE_Rect.Right - POE_Rect.Left;
                    Height   = POE_Rect.Bottom - POE_Rect.Top;
                }
            };
        }
 private void Button_ReloadList_Click(object sender, RoutedEventArgs e)
 {
     Combobox_AddonFile.ItemsSource = Dictionary_Addons.ReloadList();
 }