Exemplo n.º 1
0
 private void LaunchCustomUrl(string url)
 {
     using (var targetComputer = new TemporaryFolder("clonetest-targetComputer"))
     {
         var model = new GetCloneFromInternetModel(targetComputer.Path);
         model.InitFromUri(url);
         using (var dlg = new GetCloneFromInternetDialog(model))
         {
             dlg.ShowDialog();
         }
     }
 }
Exemplo n.º 2
0
        private void Launch()
        {
            using (var targetComputer = new TemporaryFolder("clonetest-targetComputer"))
                using (var dest = new TemporaryFolder("clonetest"))
                {
                    Directory.CreateDirectory(dest.Combine("repo1"));
                    HgRepository.CreateRepositoryInExistingDir(dest.Combine("repo1"), new NullProgress());

                    //ok, the point here is that we already haved something called "repo1"
                    Directory.CreateDirectory(targetComputer.Combine("repo1"));

                    using (var dlg = new GetCloneFromInternetDialog(targetComputer.Path))
                    {
                        dlg.ShowDialog();
                    }
                }
        }
Exemplo n.º 3
0
        private static void DoClone()
        {
            var strAdaptItWorkFolder = AdaptItWorkFolder;

            if (!Directory.Exists(strAdaptItWorkFolder))
            {
                Directory.CreateDirectory(strAdaptItWorkFolder);
            }
#if DEBUG
            const string cstrHindiToUrdu             = "Hindi to Urdu adaptations";
            var          strHindiToUrduProjectFolder = Path.Combine(strAdaptItWorkFolder, cstrHindiToUrdu);
            if (Directory.Exists(strHindiToUrduProjectFolder))
            {
                Directory.Delete(strHindiToUrduProjectFolder, true);
            }
#endif

            var model = new GetCloneFromInternetModel(strAdaptItWorkFolder)
            {
#if DEBUG
                ProjectId       = "aikb-hindi-urdu",
                AccountName     = "bobeaton",
                Password        = "******",
                LocalFolderName = cstrHindiToUrdu,
#endif
                SelectedServerLabel = Resources.IDS_DefaultRepoServer
            };

            using (var dlg = new GetCloneFromInternetDialog(model))
            {
                if (DialogResult.Cancel == dlg.ShowDialog())
                {
                    return;
                }

                var strProjectFolder = dlg.PathToNewProject;
                Settings.Default.LastProjectFolder = strProjectFolder;
                Settings.Default.Save();
                InitializeLookupConverter(strProjectFolder);
            }
        }