Skip to content

Commit

Permalink
Made the method static
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmyers committed Oct 5, 2023
1 parent 0f884e8 commit 0baa937
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/Chorus/UI/Clone/GetCloneFromInternetDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,18 +270,26 @@ private void OnDownloadClick(object sender, EventArgs e)
/// Starts a clone operation with the supplied information.
/// <param name="username">Username for Mercurial authentication</param>
/// <param name="password">Password for Mercurial authentication</param>
/// <param name="projectFolder">The parent directory to put the clone in</param>
/// <param name="projectName">Name of the project to clone</param>
/// <param name="projectUri">URI where the project can be found</param>
/// </summary>
public void StartClone(string username, string password, string projectName, Uri projectUri)
public static GetCloneFromInternetDialog StartClone(string username, string password, string projectFolder, string projectName, Uri projectUri)
{
_model.Username = username;
_model.Password = password;
_model.CustomUrl = projectUri.ToString();
_model.IsCustomUrl = true;
_model.LocalFolderName = projectName;

StartClone();
var model = new GetCloneFromInternetModel(projectFolder)
{
Username = username,
Password = password,
CustomUrl = projectUri.ToString(),
IsCustomUrl = true,
LocalFolderName = projectName
};

var dialog = new GetCloneFromInternetDialog(model);
dialog.Show();
dialog.StartClone();

return dialog;
}

private void StartClone()
Expand Down

0 comments on commit 0baa937

Please sign in to comment.