public static string FindDefaultWorkspace(IWin32Window Owner, PerforceConnection DefaultConnection, string StreamName, TextWriter Log)
        {
            FindDefaultWorkspaceTask FindWorkspace = new FindDefaultWorkspaceTask(StreamName);

            string ErrorMessage;

            PerforceModalTask.Execute(Owner, DefaultConnection, FindWorkspace, "Finding workspace", "Finding default workspace, please wait...", Log, out ErrorMessage);

            return(FindWorkspace.WorkspaceName);
        }
Beispiel #2
0
        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);
            }
        }