public static bool ShowModal(IWin32Window Owner, PerforceConnection DefaultConnection, string StreamName, string ProjectPath, out WorkspaceInfo WorkspaceInfo, TextWriter Log) { string WorkspaceName = FindDefaultWorkspace(Owner, DefaultConnection, StreamName, Log); AutomatedSyncWindow Window = new AutomatedSyncWindow(StreamName, ProjectPath, WorkspaceName, DefaultConnection, Log); if (Window.ShowDialog() == DialogResult.OK) { WorkspaceInfo = Window.SelectedWorkspaceInfo; return(true); } else { WorkspaceInfo = null; return(false); } }
public static bool ShowModal(IWin32Window Owner, PerforceConnection DefaultConnection, string StreamName, string ProjectPath, out WorkspaceInfo WorkspaceInfo, TextWriter Log) { FindDefaultWorkspaceTask FindWorkspace = new FindDefaultWorkspaceTask(StreamName); string ErrorMessage; PerforceModalTask.Execute(Owner, DefaultConnection, FindWorkspace, "Finding workspace", "Finding default workspace, please wait...", Log, out ErrorMessage); AutomatedSyncWindow Window = new AutomatedSyncWindow(StreamName, ProjectPath, FindWorkspace.WorkspaceName, DefaultConnection, Log); if (Window.ShowDialog() == DialogResult.OK) { WorkspaceInfo = Window.SelectedWorkspaceInfo; return(true); } else { WorkspaceInfo = null; return(false); } }