Пример #1
0
        public void EditRepositoryHandler(object sender, EventArgs e)
        {
            RepositoryDialog dialog = new RepositoryDialog(currentWorkspace);

            dialog.Run();
            dialog.Destroy();
        }
Пример #2
0
        public void AddRepositoryHandler(object sender, EventArgs e)
        {
            RepositoryDialog dialog = new RepositoryDialog(null);

            if (dialog.Run() == (int)ResponseType.Ok)
            {
                try
                {
                    ICredentials         creds = new TFCredential(dialog.Username, dialog.Password);
                    TeamFoundationServer tfs   = TeamFoundationServerFactory.GetServer(dialog.Server, creds);

                    VersionControlServer vcs = tfs.GetService(typeof(VersionControlServer)) as VersionControlServer;
                    vcs.CreateWorkspace(dialog.WorkspaceName, dialog.Username,
                                        "Created by OpenTF Gui", null, Environment.MachineName);
                }
                catch (WebException ex)
                {
                    Console.WriteLine(ex.ToString());
                }
            }

            dialog.Destroy();
        }
Пример #3
0
        public void EditRepositoryHandler(object sender, EventArgs e)
        {
            RepositoryDialog dialog = new RepositoryDialog(currentWorkspace);

            dialog.Run();
            dialog.Destroy();
        }
Пример #4
0
        public void AddRepositoryHandler(object sender, EventArgs e)
        {
            RepositoryDialog dialog = new RepositoryDialog(null);
            if (dialog.Run() == (int)ResponseType.Ok)
            {
                try
                    {
                        ICredentials creds = new TFCredential(dialog.Username, dialog.Password);
                        TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(dialog.Server, creds);

                        VersionControlServer vcs = tfs.GetService(typeof(VersionControlServer)) as VersionControlServer;
                        vcs.CreateWorkspace(dialog.WorkspaceName, dialog.Username,
                                                                "Created by OpenTF Gui", null, Environment.MachineName);
                    }
                catch (WebException ex)
                    {
                        Console.WriteLine(ex.ToString());
                    }
            }

            dialog.Destroy();
        }