本文整理汇总了C#中NavObject类的典型用法代码示例。如果您正苦于以下问题:C# NavObject类的具体用法?C# NavObject怎么用?C# NavObject使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NavObject类属于命名空间,在下文中一共展示了NavObject类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Init
public void Init(NavObject navObject)
{
Username = navObject.Username;
Repository = navObject.Repository;
Branch = navObject.Branch ?? "master";
Path = navObject.Path ?? "";
}
示例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)));
}
示例3: Init
public void Init(NavObject navObject)
{
User = navObject.Username;
Repository = navObject.Repository;
Node = navObject.Node;
ShowRepository = navObject.ShowRepository;
}
示例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!
}
}
}
}
示例5: Init
public void Init(NavObject navObject)
{
if (navObject.AttemptedAccountId >= 0)
{
AttemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId) as BitbucketAccount;
}
}
示例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() }));
}
示例7: Init
public void Init(NavObject navObject)
{
WebDomain = navObject.WebDomain ?? GitHubSharp.Client.AccessTokenUri;
if (navObject.AttemptedAccountId >= 0)
{
AttemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId);
}
}
示例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));
}
示例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);
}
示例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));
}
示例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;
}
}
示例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));
});
}
示例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;
}
示例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));
}
示例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));
}