当前位置: 首页>>代码示例>>C#>>正文


C# GitRepository.GetRemotes方法代码示例

本文整理汇总了C#中MonoDevelop.VersionControl.Git.GitRepository.GetRemotes方法的典型用法代码示例。如果您正苦于以下问题:C# GitRepository.GetRemotes方法的具体用法?C# GitRepository.GetRemotes怎么用?C# GitRepository.GetRemotes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MonoDevelop.VersionControl.Git.GitRepository的用法示例。


在下文中一共展示了GitRepository.GetRemotes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: EditBranchDialog

		public EditBranchDialog (GitRepository repo, string name, string tracking)
		{
			this.Build ();
			this.repo = repo;
			oldName = name;
			currentTracking = tracking;

			this.UseNativeContextMenus ();

			comboStore = new ListStore (typeof(string), typeof(Xwt.Drawing.Image), typeof (string), typeof(string));
			comboSources.Model = comboStore;
			var crp = new CellRendererImage ();
			comboSources.PackStart (crp, false);
			comboSources.AddAttribute (crp, "image", 1);
			var crt = new CellRendererText ();
			comboSources.PackStart (crt, true);
			comboSources.AddAttribute (crt, "text", 2);

			SemanticModelAttribute modelAttr = new SemanticModelAttribute ("comboStore__Branch", "comboStore__Icon", "comboStore__Name", "comboStore__Tracking");
			TypeDescriptor.AddAttributes (comboStore, modelAttr);

			foreach (Branch b in repo.GetBranches ()) {
				AddValues (b.FriendlyName, ImageService.GetIcon ("vc-branch", IconSize.Menu), "refs/heads/");
			}

			foreach (Remote r in repo.GetRemotes ()) {
				foreach (string b in repo.GetRemoteBranches (r.Name))
					AddValues (r.Name + "/" + b, ImageService.GetIcon ("vc-repository", IconSize.Menu), "refs/remotes/");
			}

			entryName.Text = name;
			checkTrack.Active = !string.IsNullOrEmpty (tracking);

			UpdateStatus ();
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:35,代码来源:EditBranchDialog.cs

示例2: PushDialog

		public PushDialog (GitRepository repo)
		{
			this.Build ();
			this.repo = repo;
			HasSeparator = false;
			
			changeList.DiffLoader = DiffLoader;
			
			List<string> list = new List<string> (repo.GetRemotes ().Select (r => r.Name));
			foreach (string s in list)
				remoteCombo.AppendText (s);
			remoteCombo.Active = list.IndexOf (repo.GetCurrentRemote ());
			
			UpdateChangeSet ();
		}
开发者ID:yayanyang,项目名称:monodevelop,代码行数:15,代码来源:PushDialog.cs

示例3: EditBranchDialog

		public EditBranchDialog (GitRepository repo, Branch branch, bool isNew)
		{
			this.Build ();
			this.repo =  repo;
			
			comboStore = new ListStore (typeof(string), typeof(Gdk.Pixbuf), typeof (string));
			comboSources.Model = comboStore;
			CellRendererPixbuf crp = new CellRendererPixbuf ();
			comboSources.PackStart (crp, false);
			comboSources.AddAttribute (crp, "pixbuf", 1);
			CellRendererText crt = new CellRendererText ();
			comboSources.PackStart (crt, true);
			comboSources.AddAttribute (crt, "text", 2);
			
			if (branch != null) {
				if (!isNew)
					oldName = branch.Name;
				currentTracking = branch.Tracking;
				entryName.Text = branch.Name;
				if (currentTracking != null)
					checkTrack.Active = true;
			}
			
			foreach (Branch b in repo.GetBranches ()) {
				AddValues (b.Name, ImageService.GetPixbuf ("vc-git-branch"));
			}
			
			foreach (string t in repo.GetTags ())
				AddValues (t, ImageService.GetPixbuf ("vc-git-tag"));
			
			foreach (RemoteSource r in repo.GetRemotes ()) {
				foreach (string b in repo.GetRemoteBranches (r.Name))
					AddValues (r.Name + "/" + b, ImageService.GetPixbuf ("md-web-search-icon"));
			}
				
			UpdateStatus ();
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:37,代码来源:EditBranchDialog.cs

示例4: EditBranchDialog

		public EditBranchDialog (GitRepository repo, Branch branch, bool isNew)
		{
			this.Build ();
			this.repo =  repo;
			
			comboStore = new ListStore (typeof(string), typeof(Xwt.Drawing.Image), typeof (string));
			comboSources.Model = comboStore;
			var crp = new CellRendererImage ();
			comboSources.PackStart (crp, false);
			comboSources.AddAttribute (crp, "image", 1);
			var crt = new CellRendererText ();
			comboSources.PackStart (crt, true);
			comboSources.AddAttribute (crt, "text", 2);
			
			if (branch != null) {
				if (!isNew)
					oldName = branch.Name;
				currentTracking = branch.Tracking;
				entryName.Text = branch.Name;
				checkTrack.Active = currentTracking != null;
			}
			
			foreach (Branch b in repo.GetBranches ()) {
				AddValues (b.Name, ImageService.GetIcon ("vc-branch", IconSize.Menu));
			}
			
			foreach (string t in repo.GetTags ())
				AddValues (t, ImageService.GetIcon ("vc-tag", IconSize.Menu));
			
			foreach (RemoteSource r in repo.GetRemotes ()) {
				foreach (string b in repo.GetRemoteBranches (r.Name))
					AddValues (r.Name + "/" + b, ImageService.GetIcon ("vc-repository", IconSize.Menu));
			}
				
			UpdateStatus ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:36,代码来源:EditBranchDialog.cs


注:本文中的MonoDevelop.VersionControl.Git.GitRepository.GetRemotes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。