Closes this project with running editor and opens the given project. The project file path.
(string projectFilePath)
| 817 | /// </summary> |
| 818 | /// <param name="projectFilePath">The project file path.</param> |
| 819 | public void OpenProject(string projectFilePath) |
| 820 | { |
| 821 | if (projectFilePath == null || !File.Exists(projectFilePath)) |
| 822 | { |
| 823 | MessageBox.Show("Missing project"); |
| 824 | return; |
| 825 | } |
| 826 | |
| 827 | // Cache project path and start editor exit (it will open new instance on valid closing) |
| 828 | _projectToOpen = StringUtils.NormalizePath(Path.GetDirectoryName(projectFilePath)); |
| 829 | Windows.MainWindow.Close(ClosingReason.User); |
| 830 | } |
| 831 | |
| 832 | /// <summary> |
| 833 | /// Ensure that editor is in a given state, otherwise throws <see cref="InvalidStateException"/>. |
nothing calls this directly
no test coverage detected