public MainFrame() { InitializeComponent(); Icon = Resources.TaskbarIconWhite; // Center CenterToScreen(); // Version setzen lblVersion.Text = "USA.LIFE LAUNCHER v." + Assembly.GetExecutingAssembly().GetName().Version.ToString(); // Prüfen ob Pfad bereits gesetzt armaPath = Settings.Default.armaPath.ToString(); ///////////////////////////////////////////////7 string profilPathExists = "C:\\Users\"; ///////////////////////////////////////////////////////////////////// if (string.IsNullOrEmpty(armaPath)) { PathSelection selection = new PathSelection(); selection.ShowDialog(); } profilePath = Settings.Default.profilePath.ToString(); if (string.IsNullOrEmpty(profilePath)) { // if (!Directory.Exists(profilPathExists)) /////////////////////////////// // { MessageBox.Show("Bitte wähle deinen Arma3-Profilordner aus." + "\n" + "\n" + "Standartmäßig sollte dieser so aussehen: C:/Users/USERNAME/Documents/Arma3 - Other Profiles"); selectProfilePath(); // } } lblprofilePath.Text = profilePath; armaPath = Settings.Default["armaPath"].ToString(); localPath = Environment.GetEnvironmentVariable("localappdata") + "\\Arma 3\\MPMissionsCache"; profilePath = Settings.Default.profilePath.ToString(); // if (string.IsNullOrEmpty(profilePath)) // { // profilePath = Environment.GetEnvironmentVariable("userprofile") + "\\Documents\\Arma 3 - Other Profiles"; // } // lblprofilePath.Text = profilePath; // Update Profiles loadProfiles(); lblInstallationPath.Text = armaPath; // Settings cbSplash.Checked = Settings.Default.noSplash; cbWindow.Checked = Settings.Default.windowed; nudVram.Value = Settings.Default.maxVram; txtParams.Text = Settings.Default.customParams; cbHyper.Checked = Settings.Default.enableHT; cbIntro.Checked = Settings.Default.skipIntro; cbnologs.Checked = Settings.Default.noLogs; new Thread(() => updateStats(null, null)).Start(); tmrUpdateStats.Start(); wbChangelog.DocumentTitleChanged += AdaptChangelog; }
private void btnChangePath_Click(object sender, EventArgs e) { PathSelection selection = new PathSelection(); selection.ShowDialog(); armaPath = Settings.Default["armaPath"].ToString(); lblInstallationPath.Text = armaPath; }