예제 #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();
        }