private void Settings_FormClosing(object sender, FormClosingEventArgs e) { if (AllUserConfig.maxSimDownloads != (int)numericDownloads.Value) { MaxNumOfSimVideos.changeNumber((int)numericDownloads.Value); } AllUserConfig.maxSimDownloads = (int)numericDownloads.Value; if (cbLanguage.SelectedIndex == 0) { AllUserConfig.lang = "en"; } else { AllUserConfig.lang = "mk"; } }
private void Main_Load(object sender, EventArgs e) { Thread autoUpdateThread = new Thread(() => autoUpdate()); if (AllUserConfig.firstTimeAppRunning) { LanguageSelection languageSelectionForm = new LanguageSelection(); languageSelectionForm.ShowDialog(); } if (AllUserConfig.lang == "mk") { AllUserConfig.languageRM = new ResourceManager("YTDownloader.language_mk", Assembly.GetExecutingAssembly()); menuPicture.Image = Properties.Resources.MenuMkd; } else { menuPicture.Image = Properties.Resources.MenuEng; } Text = AllUserConfig.languageRM.GetString("ProgramTitle"); MaxNumOfSimVideos.changeNumber(AllUserConfig.maxSimDownloads); activityTab = new ActivityTab(); downloadTab = new DownloadTab(); activityTab.MdiParent = this; downloadTab.MdiParent = this; activityTab.Show(); activityTab.Location = new Point(0, 161); downloadTab.Show(); downloadTab.Location = new Point(0, 161); btnDownloadTab.TabStop = false; btnDownloadTab.FlatStyle = FlatStyle.Flat; btnDownloadTab.FlatAppearance.BorderSize = 0; btnDownloadTab.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); btnDownloadTab.Text = AllUserConfig.languageRM.GetString("downloadTab"); btnActivityTab.TabStop = false; btnActivityTab.FlatStyle = FlatStyle.Flat; btnActivityTab.FlatAppearance.BorderSize = 0; btnActivityTab.FlatAppearance.BorderColor = Color.FromArgb(0, 255, 255, 255); btnActivityTab.BackColor = Color.DarkGray; btnActivityTab.Text = AllUserConfig.languageRM.GetString("activityTab"); btnDownloadTab.FlatAppearance.MouseOverBackColor = DefaultBackColor; btnActivityTab.FlatAppearance.MouseOverBackColor = Color.FromArgb(152, 152, 152); autoUpdateThread.Start(); }