• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# NavObject类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中NavObject的典型用法代码示例。如果您正苦于以下问题:C# NavObject类的具体用法?C# NavObject怎么用?C# NavObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NavObject类属于命名空间,在下文中一共展示了NavObject类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Init

 public void Init(NavObject navObject)
 {
     Username = navObject.Username;
     Repository = navObject.Repository;
     Branch = navObject.Branch ?? "master";
     Path = navObject.Path ?? "";
 }
开发者ID:vbassini,项目名称:CodeBucket,代码行数:7,代码来源:SourceTreeViewModel.cs


示例2: Init

 public void Init(NavObject navObject)
 {
     Username = navObject.Username;
     Repository = navObject.Repository;
     var filterString = string.Format("{0}/{1}/issues/", Username, Repository);
     _filters.Items.Reset(this.GetApplication().Account.Filters.Where(x => x.Type.StartsWith(filterString, StringComparison.Ordinal)).Select(x => new FilterModel(x)));
 }
开发者ID:xNUTs,项目名称:CodeBucket,代码行数:7,代码来源:IssuesFiltersViewModel.cs


示例3: Init

 public void Init(NavObject navObject)
 {
     User = navObject.Username;
     Repository = navObject.Repository;
     Node = navObject.Node;
     ShowRepository = navObject.ShowRepository;
 }
开发者ID:Jeff-Lewis,项目名称:CodeBucket,代码行数:7,代码来源:CommitViewModel.cs


示例4: Init

        public void Init(NavObject navObject)
        {
            IsEnterprise = navObject.IsEnterprise;
            WebDomain = navObject.WebDomain;

            if (WebDomain == null && !IsEnterprise)
            {
                WebDomain = GitHubSharp.Client.AccessTokenUri;
            }

            if (navObject.AttemptedAccountId >= 0)
            {
                AttemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId) as GitHubAccount;

                //This is a hack to get around the fact that WebDomain will be null for Enterprise users since the last version did not contain the variable
                if (WebDomain == null && IsEnterprise)
                {
                    try
                    {
                        WebDomain = AttemptedAccount.Domain.Substring(0, AttemptedAccount.Domain.IndexOf("/api"));
                    }
                    catch 
                    {
                        //Doh!
                    }
                }
            }
        }
开发者ID:ryanseys,项目名称:CodeHub,代码行数:28,代码来源:LoginViewModel.cs


示例5: Init

		public void Init(NavObject navObject)
		{
			if (navObject.AttemptedAccountId >= 0)
			{
				AttemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId) as BitbucketAccount;
			}
		}
开发者ID:vbassini,项目名称:CodeBucket,代码行数:7,代码来源:LoginViewModel.cs


示例6: Init

        public void Init(NavObject navObject)
        {
            Username = navObject.Username;
            Repository = navObject.Repository;
            SelectedLabels.Items.Reset(GetService<CodeFramework.Core.Services.IViewModelTxService>().Get() as IEnumerable<LabelModel>);

            var messenger = GetService<IMvxMessenger>();
            this.BindCollection(x => x.SelectedLabels, x => messenger.Publish(new SelectIssueLabelsMessage(this) { Labels = SelectedLabels.Items.ToArray() }));
        }
开发者ID:GirliOS,项目名称:CodeHub,代码行数:9,代码来源:IssueLabelsViewModel.cs


示例7: Init

        public void Init(NavObject navObject)
        {
            WebDomain = navObject.WebDomain ?? GitHubSharp.Client.AccessTokenUri;

            if (navObject.AttemptedAccountId >= 0)
            {
                AttemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId);
            }
        }
开发者ID:GitWatcher,项目名称:CodeHub,代码行数:9,代码来源:LoginViewModel.cs


示例8: Init

        public void Init(NavObject navObject)
        {
            Username = navObject.Username;
            Repository = navObject.Repository;
            Id = navObject.Id;
            SaveOnSelect = navObject.SaveOnSelect;
            SelectedMilestone = TxSevice.Get() as MilestoneModel;

            this.Bind(x => x.SelectedMilestone).Subscribe(x => SelectMilestone(x));
        }
开发者ID:GitWatcher,项目名称:CodeHub,代码行数:10,代码来源:IssueMilestonesViewModel.cs


示例9: Init

        public void Init(NavObject navObject)
        {
            Username = navObject.Username;
            Repository = navObject.Repository;
            Id = navObject.Id;
            SaveOnSelect = navObject.SaveOnSelect;

            _originalLables = GetService<CodeHub.Core.Services.IViewModelTxService>().Get() as IEnumerable<LabelModel>;
            SelectedLabels.Items.Reset(_originalLables);
        }
开发者ID:GitWatcher,项目名称:CodeHub,代码行数:10,代码来源:IssueLabelsViewModel.cs


示例10: Init

		public void Init(NavObject navObject) 
		{
			Username = navObject.Username;
			Repository = navObject.Repository;
			Id = navObject.Id;
			SaveOnSelect = navObject.SaveOnSelect;

			SelectedUser = TxSevice.Get() as BasicUserModel;
			this.Bind(x => x.SelectedUser, x => SelectUser(x));
		}
开发者ID:ryanseys,项目名称:CodeHub,代码行数:10,代码来源:IssueAssignedToViewModel.cs


示例11: Init

        public void Init(NavObject navObject)
        {
			if (navObject.AttemptedAccountId >= 0)
				_attemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId) as BitbucketAccount;

            if (_attemptedAccount != null)
            {
                Username = _attemptedAccount.Username;
            }
        }
开发者ID:vbassini,项目名称:CodeBucket,代码行数:10,代码来源:AddAccountViewModel.cs


示例12: Init

		public void Init(NavObject navObject) 
		{
			Username = navObject.Username;
			Repository = navObject.Repository;
			SelectedUser = TxSevice.Get() as UserModel;
			this.Bind(x => x.SelectedUser, x => {
				Messenger.Publish(new SelectedAssignedToMessage(this) { User = x });
				ChangePresentation(new Cirrious.MvvmCross.ViewModels.MvxClosePresentationHint(this));
			});
		}
开发者ID:vbassini,项目名称:CodeBucket,代码行数:10,代码来源:IssueAssignedToViewModel.cs


示例13: Init

		public void Init(NavObject navObject)
        {
			Username = navObject.Username;
			Repository = navObject.Repository;
			Page = navObject.Page ?? "Home";

			if (Page.StartsWith("/", StringComparison.Ordinal))
				Page = Page.Substring(1);

            CanEdit = true;
        }
开发者ID:vbassini,项目名称:CodeBucket,代码行数:11,代码来源:WikiViewModel.cs


示例14: Init

		public void Init(NavObject navObject)
		{
			Username = navObject.Username;
			Repository = navObject.Repository;
			Id = navObject.Id;
			SaveOnSelect = navObject.SaveOnSelect;
            var value = TxSevice.Get() as string;
            SelectedValue = value;

            this.Bind(x => x.SelectedValue, x => SelectValue(x));
		}
开发者ID:Mikoj,项目名称:CodeBucket,代码行数:11,代码来源:IssueVersionsViewModel.cs


示例15: Init

		public void Init(NavObject navObject)
		{
			Username = navObject.Username;
			Repository = navObject.Repository;
			Id = navObject.Id;
			SaveOnSelect = navObject.SaveOnSelect;
			var issue = TxSevice.Get() as string;
			SelectedMilestone = issue;

			this.Bind(x => x.SelectedMilestone, x => SelectMilestone(x));
		}
开发者ID:vbassini,项目名称:CodeBucket,代码行数:11,代码来源:IssueMilestonesViewModel.cs


示例16: Init

		public void Init(NavObject navObject)
        {
			Username = navObject.Username;
			Repository = navObject.Repository;
			Branch = navObject.Branch;
			Filename = navObject.Filename;

			_actualFilename = System.IO.Path.GetFileName(Filename);
			if (_actualFilename == null)
				_actualFilename = Filename.Substring(Filename.LastIndexOf('/') + 1);

			Title = _actualFilename;

			_commitFileModel = Mvx.Resolve<IViewModelTxService>().Get() as ChangesetDiffModel;
        }
开发者ID:vbassini,项目名称:CodeBucket,代码行数:15,代码来源:ChangesetDiffViewModel.cs


示例17: Init

		public void Init(NavObject navObject)
		{
			_path = navObject.Path;
			_name = navObject.Name;
			_user = navObject.User;
			_repository = navObject.Repository;
			_branch = navObject.Branch;

			//Create the filename
			var fileName = System.IO.Path.GetFileName(_path);
			if (fileName == null)
				fileName = _path.Substring(_path.LastIndexOf('/') + 1);

			//Create the temp file path
			Title = fileName;
		}
开发者ID:Jeff-Lewis,项目名称:CodeBucket,代码行数:16,代码来源:SourceViewModel.cs


示例18: Init

		public void Init(NavObject navObject)
        {
			//Create the filename
			var fileName = System.IO.Path.GetFileName(navObject.Filename);
			if (fileName == null)
				fileName = navObject.Filename.Substring(navObject.Filename.LastIndexOf('/') + 1);

			//Create the temp file path
			Title = fileName;

			_id = navObject.GistId;
			_filename = navObject.Filename;

			//Grab the data
			_fileModel = GetService<IViewModelTxService>().Get() as GistFileModel;
        }
开发者ID:GirliOS,项目名称:CodeHub,代码行数:16,代码来源:GistFileViewModel.cs


示例19: Init

        public void Init(NavObject navObject)
        {
			if (navObject.AttemptedAccountId >= 0)
				_attemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId) as GitHubAccount;

            if (_attemptedAccount != null)
            {
                Username = _attemptedAccount.Username;
                IsEnterprise = _attemptedAccount.Domain != null;
                if (IsEnterprise)
                    Domain = _attemptedAccount.Domain;
            }
            else
            {
                IsEnterprise = navObject.IsEnterprise;
            }
        }
开发者ID:nghialv,项目名称:CodeHub,代码行数:17,代码来源:AddAccountViewModel.cs


示例20: Init

		public void Init(NavObject nav)
		{
			Username = nav.Username;
			Repository = nav.Repository;
            Simple = nav.Simple;
			_issues = new FilterableCollectionViewModel<IssueModel, IssuesFilterModel>("IssuesViewModel:" + Username + "/" + Repository);
			_issues.GroupingFunction = Group;
			_issues.Bind(x => x.Filter, () => LoadCommand.Execute(true));

			_addToken = Messenger.SubscribeOnMainThread<IssueAddMessage>(x =>
			{
				if (x.Issue == null || !DoesIssueBelong(x.Issue))
					return;
				Issues.Items.Insert(0, x.Issue);
			});

			_editToken = Messenger.SubscribeOnMainThread<IssueEditMessage>(x =>
			{
				if (x.Issue == null || !DoesIssueBelong(x.Issue))
					return;
				
				var item = Issues.Items.FirstOrDefault(y => y.LocalId == x.Issue.LocalId);
				if (item == null)
					return;

				var index = Issues.Items.IndexOf(item);

				using (Issues.DeferRefresh())
				{
					Issues.Items.RemoveAt(index);
					Issues.Items.Insert(index, x.Issue);
				}
			});

            _deleteToken = Messenger.SubscribeOnMainThread<IssueDeleteMessage>(x =>
            {
                var find = Issues.Items.FirstOrDefault(i => i.LocalId == x.Issue.LocalId);
                if (find != null)
                    Issues.Items.Remove(find);
            });

            _filterToken = Messenger.SubscribeOnMainThread<IssuesFilterMessage>(x => {
                _issues.Filter = x.Filter;
            });
		}
开发者ID:Mikoj,项目名称:CodeBucket,代码行数:45,代码来源:IssuesViewModel.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NavigateToItem类代码示例发布时间:2022-05-24
下一篇:
C# NavGraph类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap