private void CustomVersion_Click(object sender, EventArgs e) { var filePath = string.Empty; using (OpenFileDialog openFileDialog = new OpenFileDialog()) { //Open the dialog at the Resources folder (from the application start location openFileDialog.InitialDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources"); openFileDialog.Filter = "7z files (*.7z)|*.7z|All files (*.*)|*.*"; openFileDialog.FilterIndex = 1; openFileDialog.RestoreDirectory = true; if (openFileDialog.ShowDialog() == DialogResult.OK) { //Get the path of specified file filePath = openFileDialog.FileName; //Clean up before and after yourself in case of unwanted additional hash/deltas Changer.Cleanup(); //Path will be selected from the dialog ProgressWindow window = new ProgressWindow(new Tuple <string, string>(filePath, armaText.Text)); window.ShowDialog(); Changer.Cleanup(); } } }
private void StableDowngrade_Click(object sender, EventArgs e) { //Clean up before and after yourself in case of unwanted additional hash/deltas Changer.Cleanup(); //Default path for latest updated (in this case files_1.80) ProgressWindow window = new ProgressWindow(new Tuple <string, string>(@Properties.Settings.Default.pathStable, armaText.Text)); window.ShowDialog(); Changer.Cleanup(); }