예제 #1
0
        public ChangesetView(ExploreView exploreView, int stopAfter)
        {
            this.exploreView = exploreView;
                this.stopAfter = stopAfter;

                InitializeChangesetList();
        }
예제 #2
0
        public DirectoryView(ExploreView exploreView)
        {
            this.exploreView = exploreView;
                menu = new DirectoryMenu(exploreView);

                store = new Gtk.ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(ItemType));
                Model = store;

                sortableColumns = new SortableColumns(this, store);

            #if HAVE_ATLEAST_GTK_210
                EnableGridLines = TreeViewGridLines.Vertical;
            #endif
                // setup main column with image/text data
                TreeViewColumn column = new TreeViewColumn ();
                CellRendererText crt = new CellRendererText();
                CellRendererPixbuf crp = new CellRendererPixbuf();
                column.Title = "Name";
                column.PackStart(crp, false);
                column.PackStart(crt, true);
                column.AddAttribute(crp, "pixbuf", 0);
                column.AddAttribute(crt, "text", 1);
                AppendColumn(column);
                AppendColumn("Status", ColumnIndex.Status);
                AppendColumn("Owner", ColumnIndex.Owner);
                AppendColumn("Latest", ColumnIndex.Latest);

                Selection.Mode = SelectionMode.Multiple;
                KeyReleaseEvent += MyKeyReleaseEventHandler;
                ButtonPressEvent += MyButtonPressEventHandler;
        }
예제 #3
0
        public DirectoryView(ExploreView exploreView)
        {
            this.exploreView = exploreView;
            menu             = new DirectoryMenu(exploreView);

            store = new Gtk.ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string), typeof(ItemType));
            Model = store;

            sortableColumns = new SortableColumns(this, store);

#if HAVE_ATLEAST_GTK_210
            EnableGridLines = TreeViewGridLines.Vertical;
#endif
            // setup main column with image/text data
            TreeViewColumn     column = new TreeViewColumn();
            CellRendererText   crt    = new CellRendererText();
            CellRendererPixbuf crp    = new CellRendererPixbuf();
            column.Title = "Name";
            column.PackStart(crp, false);
            column.PackStart(crt, true);
            column.AddAttribute(crp, "pixbuf", 0);
            column.AddAttribute(crt, "text", 1);
            AppendColumn(column);
            AppendColumn("Status", ColumnIndex.Status);
            AppendColumn("Owner", ColumnIndex.Owner);
            AppendColumn("Latest", ColumnIndex.Latest);

            Selection.Mode    = SelectionMode.Multiple;
            KeyReleaseEvent  += MyKeyReleaseEventHandler;
            ButtonPressEvent += MyButtonPressEventHandler;
        }
예제 #4
0
        public ChangesetView(ExploreView exploreView, int stopAfter)
        {
            this.exploreView = exploreView;
            this.stopAfter   = stopAfter;

            InitializeChangesetList();
        }
예제 #5
0
        public DirectoryMenu(ExploreView exploreView)
        {
            this.exploreView = exploreView;

                getLatestItem = AddImageMenuItem("Get Latest", Images.Update);
                getLatestItem.Activated += GetLatestHandler;

                ShowAll();
        }
예제 #6
0
        public DirectoryMenu(ExploreView exploreView)
        {
            this.exploreView = exploreView;

            getLatestItem            = AddImageMenuItem("Get Latest", Images.Update);
            getLatestItem.Activated += GetLatestHandler;

            ShowAll();
        }
예제 #7
0
        public TeamFoundationView()
            : base()
        {
            this.ContentName = "Team Foundation Browser";
                this.IsViewOnly = true;

                exploreView = new ExploreView(this, 50);
                exploreView.ShowChangeset += MyShowChangesetEventHandler;
                exploreView.ShowFile += MyShowFileEventHandler;

                exploreView.ShowAll();
        }
예제 #8
0
        public RepositoryView(ExploreView exploreView, ICredentialsProvider credentialsProvider)
        {
            this.exploreView         = exploreView;
            menu                     = new RepositoryMenu(exploreView);
            this.credentialsProvider = credentialsProvider;

            // setup main column with image/text data
            TreeViewColumn     column = new TreeViewColumn();
            CellRendererText   crt    = new CellRendererText();
            CellRendererPixbuf crp    = new CellRendererPixbuf();

            column.Title = "Repository";
            column.PackStart(crp, false);
            column.PackStart(crt, true);
            column.AddAttribute(crp, "pixbuf", 0);
            column.AddAttribute(crt, "text", 1);
            column.SetCellDataFunc(crt, new Gtk.TreeCellDataFunc(RenderRepositoryName));
            AppendColumn(column);

            WorkspaceInfo[] infos = Workstation.Current.GetAllLocalWorkspaceInfo();
            foreach (WorkspaceInfo info in infos)
            {
                ICredentials         credentials = credentialsProvider.GetCredentials(info.ServerUri, null);
                TeamFoundationServer tfs         = TeamFoundationServerFactory.GetServer(info.ServerUri.ToString(), credentials);
                VersionControlServer vcs         = tfs.GetService(typeof(VersionControlServer)) as VersionControlServer;

                Workspace workspace = vcs.GetWorkspace(info.Name, info.OwnerName);
                workspace.RefreshMappings();

                string       label      = String.Format("{0}@{1}", info.Name, info.ServerUri.Host.ToString());
                Gtk.TreeIter serverIter = store.AppendValues(Images.Repository, label, info.ServerUri.ToString(), VersionControlPath.RootFolder, workspace, true);
                store.AppendValues(serverIter, null, "", "", "", null, true);
            }

            Model            = store;
            HeadersVisible   = true;
            KeyReleaseEvent += MyKeyReleaseEventHandler;

            ShowAll();
        }
예제 #9
0
        public RepositoryMenu(ExploreView exploreView)
        {
            this.exploreView = exploreView;

            getLatestItem            = AddImageMenuItem("Get Latest", Images.Update);
            getLatestItem.Activated += GetLatestHandler;

            workingFolderItem            = AddImageMenuItem("Working Folder...", Images.Folder);
            workingFolderItem.Activated += WorkingFolderHandler;

            Append(new SeparatorMenuItem());

            addRepoItem            = AddImageMenuItem("Add Repository...", Stock.Add);
            addRepoItem.Activated += AddRepositoryHandler;

            editRepoItem            = AddImageMenuItem("Edit Repository...", Stock.Edit);
            editRepoItem.Activated += EditRepositoryHandler;

            deleteRepoItem = AddImageMenuItem("Delete Repository", Stock.Delete);

            ShowAll();
        }
예제 #10
0
        public RepositoryMenu(ExploreView exploreView)
        {
            this.exploreView = exploreView;

                getLatestItem = AddImageMenuItem("Get Latest", Images.Update);
                getLatestItem.Activated += GetLatestHandler;

                workingFolderItem = AddImageMenuItem("Working Folder...", Images.Folder);
                workingFolderItem.Activated += WorkingFolderHandler;

                Append(new SeparatorMenuItem());

                addRepoItem = AddImageMenuItem("Add Repository...", Stock.Add);
                addRepoItem.Activated += AddRepositoryHandler;

                editRepoItem = AddImageMenuItem("Edit Repository...", Stock.Edit);
                editRepoItem.Activated += EditRepositoryHandler;

                deleteRepoItem = AddImageMenuItem("Delete Repository", Stock.Delete);

                ShowAll();
        }
예제 #11
0
        public RepositoryView(ExploreView exploreView, ICredentialsProvider credentialsProvider)
        {
            this.exploreView = exploreView;
                menu = new RepositoryMenu(exploreView);
                this.credentialsProvider = credentialsProvider;

                // setup main column with image/text data
                TreeViewColumn column = new TreeViewColumn ();
                CellRendererText crt = new CellRendererText();
                CellRendererPixbuf crp = new CellRendererPixbuf();
                column.Title = "Repository";
                column.PackStart(crp, false);
                column.PackStart(crt, true);
                column.AddAttribute(crp, "pixbuf", 0);
                column.AddAttribute(crt, "text", 1);
                column.SetCellDataFunc(crt, new Gtk.TreeCellDataFunc (RenderRepositoryName));
                AppendColumn(column);

                WorkspaceInfo[] infos = Workstation.Current.GetAllLocalWorkspaceInfo();
                foreach (WorkspaceInfo info in infos)
                    {
                        ICredentials credentials = credentialsProvider.GetCredentials(info.ServerUri, null);
                        TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(info.ServerUri.ToString(), credentials);
                        VersionControlServer vcs = tfs.GetService(typeof(VersionControlServer)) as VersionControlServer;

                        Workspace workspace = vcs.GetWorkspace(info.Name, info.OwnerName);
                        workspace.RefreshMappings();

                        string label = String.Format("{0}@{1}", info.Name, info.ServerUri.Host.ToString());
                        Gtk.TreeIter serverIter = store.AppendValues(Images.Repository, label, info.ServerUri.ToString(), VersionControlPath.RootFolder, workspace, true);
                        store.AppendValues(serverIter, null, "", "", "", null, true);
                    }

                Model = store;
                HeadersVisible = true;
                KeyReleaseEvent += MyKeyReleaseEventHandler;

                ShowAll();
        }
예제 #12
0
 public TeamFoundationPad()
     : base("Team Foundation Browser")
 {
     exploreView = new ExploreView(this, 50);
         exploreView.ShowAll();
 }