private void BrowseButton_Click(object sender, RoutedEventArgs e) { OpenFileDialog projDialog = new OpenFileDialog(); projDialog.Title = "Open UE4 Project File"; projDialog.Filter = "Unreal Engine Project File|*.uproject"; if (projDialog.ShowDialog() == true) { projFile = Path.GetFullPath(projDialog.FileName); Console.WriteLine("Value returned: " + projFile); ProjectPath.Clear(); ProjectPath.AppendText(projFile); } }
// Populate Text Boxes if neccessary. private void ProjectPath_Init(object sender, EventArgs e) { var ini = new INIFile(); ini.Load(appconfig + "LauncherConfig.ini"); if (ini.HasSetting("ProjectConfiguration", "CurrentProject")) { var currentProject = ini.GetValue("ProjectConfiguration", "CurrentProject").ToString(); projFile = currentProject; ProjectPath.AppendText(currentProject); Console.WriteLine("Populated element: ProjectPath"); } else { Console.WriteLine("WARNING: No key defined in configuration file."); } }