private bool TryGetWorkspaceSettings(out NewWorkspaceSettings Settings) { string NewWorkspaceName = NameTextBox.Text.Trim(); if (NewWorkspaceName.Length == 0) { NewWorkspaceName = GetDefaultWorkspaceName(); if (NewWorkspaceName.Length == 0) { Settings = null; return(false); } } string NewStream = StreamTextBox.Text.Trim(); if (!NewStream.StartsWith("//") || NewStream.IndexOf('/', 2) == -1) { Settings = null; return(false); } string NewRootDir = RootDirTextBox.Text.Trim(); if (NewRootDir.Length == 0) { NewRootDir = GetDefaultWorkspaceRootDir(); if (NewRootDir.Length == 0) { Settings = null; return(false); } } try { NewRootDir = Path.GetFullPath(NewRootDir); } catch { Settings = null; return(false); } Settings = new NewWorkspaceSettings { Name = NewWorkspaceName, Stream = NewStream, RootDir = NewRootDir }; return(true); }
public NewWorkspaceTask(NewWorkspaceSettings Settings, string Owner, string HostName) { this.Settings = Settings; this.Owner = Owner; this.HostName = HostName; }