コード例 #1
0
        private void BrowseButton4_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog editorDialog = new OpenFileDialog();

            editorDialog.Title  = "Open UE4Editor Executable";
            editorDialog.Filter = "Application|*.exe";
            if (editorDialog.ShowDialog() == true)
            {
                editorExeFile = Path.GetFullPath(editorDialog.FileName);
                Console.WriteLine("Value returned: " + editorDialog);

                EditorPath.Clear();
                EditorPath.AppendText(editorExeFile);
            }
        }
コード例 #2
0
        private void EditorPath_Init(object sender, EventArgs e)
        {
            var ini = new INIFile();

            ini.Load(appconfig + "LauncherConfig.ini");

            // Check if a key exists in an INI file
            if (ini.HasSetting("ProjectConfiguration", "EditorExeFile"))
            {
                var editorExe = ini.GetValue("ProjectConfiguration", "EditorExeFile").ToString();

                editorExeFile = editorExe;

                EditorPath.AppendText(editorExe);
                Console.WriteLine("Populated element: EditorPath");
            }
            else
            {
                Console.WriteLine("WARNING: No key defined in configuration file.");
            }
        }