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! } } } }
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))); }
public void Init(NavObject navObject) { User = navObject.Username; Repository = navObject.Repository; Node = navObject.Node; ShowRepository = navObject.ShowRepository; }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; Branch = navObject.Branch ?? "master"; Path = navObject.Path ?? ""; }
public void Init(NavObject navObject) { if (navObject.AttemptedAccountId >= 0) { AttemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId) as BitbucketAccount; } }
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() })); }
public void Init(NavObject navObject) { WebDomain = navObject.WebDomain ?? GitHubSharp.Client.AccessTokenUri; if (navObject.AttemptedAccountId >= 0) { AttemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId); } }
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)); }); }
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); }
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)); }
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)); }
public void Init(NavObject navObject) { if (navObject.AttemptedAccountId >= 0) _attemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId) as BitbucketAccount; if (_attemptedAccount != null) { Username = _attemptedAccount.Username; } }
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)); }
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)); }
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; }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; Path = navObject.Path ?? string.Empty; Branch = navObject.Branch ?? "master"; if (!Path.StartsWith("/", StringComparison.Ordinal)) { Path = "/" + Path; } }
public void Init(NavObject navObject) { if (navObject.AttemptedAccountId >= 0) { _attemptedAccount = this.GetApplication().Accounts.Find(navObject.AttemptedAccountId) as BitbucketAccount; } if (_attemptedAccount != null) { Username = _attemptedAccount.Username; } }
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; }); }
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; }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; SelectedUser = TxSevice.Get() as UserModel; this.Bind(x => x.SelectedUser).Subscribe(x => { Messenger.Publish(new SelectedAssignedToMessage(this) { User = x }); ChangePresentation(new MvxClosePresentationHint(this)); }); }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; Id = navObject.Id; _editToken = _messageService.Listen <IssueEditMessage>(x => { if (x.Issue == null || x.Issue.Number != Issue.Number) { return; } Issue = x.Issue; }); }
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; }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; Id = navObject.Id; _editToken = Messenger.SubscribeOnMainThread <IssueEditMessage>(x => { if (x.Issue == null || x.Issue.Number != Issue.Number) { return; } Issue = x.Issue; }); }
// protected override Task Load(bool forceCacheInvalidation) // { // if (forceCacheInvalidation || Issue == null) // return Task.Run(() => this.RequestModel(this.GetApplication().Client.Users[Username].Repositories[Repository].Issues[Id].Get(), forceCacheInvalidation, response => Issue = response.Data)); // return Task.Delay(0); // } public void Init(NavObject navObject) { base.Init(navObject.Username, navObject.Repository); Id = navObject.Id; Issue = GetService <CodeFramework.Core.Services.IViewModelTxService>().Get() as IssueModel; if (Issue != null) { Title = Issue.Title; AssignedTo = Issue.Assignee; Milestone = Issue.Milestone; Labels.Items.Reset(Issue.Labels); Content = Issue.Body; IsOpen = string.Equals(Issue.State, "open"); } }
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; }
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; }
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; } }
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; }
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; }); }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; Id = navObject.Id; Comments.SortingFunction = x => x.OrderBy(y => y.UtcCreatedOn); _editToken = Messenger.SubscribeOnMainThread <IssueEditMessage>(x => { if (x.Issue == null || x.Issue.LocalId != Issue.LocalId) { return; } Issue = x.Issue; }); _deleteToken = Messenger.SubscribeOnMainThread <IssueDeleteMessage>(x => ChangePresentation(new MvxClosePresentationHint(this))); }
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; }
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; }
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; } }
public void Init(NavObject nav) { Username = nav.Username; Repository = nav.Repository; _issues = new FilterableCollectionViewModel <IssueModel, IssuesFilterModel>("IssuesViewModel:" + Username + "/" + Repository); _issues.GroupingFunction = Group; _issues.Bind(x => x.Filter).Subscribe(_ => LoadCommand.Execute(true)); _addToken = _messageService.Listen <IssueAddMessage>(x => { if (x.Issue == null || !DoesIssueBelong(x.Issue)) { return; } Issues.Items.Insert(0, x.Issue); }); _editToken = _messageService.Listen <IssueEditMessage>(x => { if (x.Issue == null || !DoesIssueBelong(x.Issue)) { return; } var item = Issues.Items.FirstOrDefault(y => y.Number == x.Issue.Number); if (item == null) { return; } var index = Issues.Items.IndexOf(item); using (Issues.DeferRefresh()) { Issues.Items.RemoveAt(index); Issues.Items.Insert(index, x.Issue); } }); }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; PullRequests.FilteringFunction = x => { var state = SelectedFilter == 0 ? "open" : "closed"; return x.Where(y => y.State == state); }; _pullRequestEditSubscription = Messenger.SubscribeOnMainThread<PullRequestEditMessage>(x => { if (x.PullRequest == null) return; var index = PullRequests.Items.IndexOf(x.PullRequest); if (index < 0) return; PullRequests.Items[index] = x.PullRequest; PullRequests.Refresh(); }); }
public void Init(NavObject navObject) { Username = navObject.Username; //Assign some sort of title if (Username != null) { if (IsMine) Title = "My Gists"; else { if (Username.EndsWith("s")) Title = Username + "' Gists"; else Title = Username + "'s Gists"; } } else { Title = "Gists"; } }
public void Init(NavObject navObject) { Username = navObject.Username ?? this.GetApplication().Account.Username; //Assign some sort of title if (Username != null) { if (IsMine) Title = "My Gists"; else { if (Username.EndsWith("s", System.StringComparison.Ordinal)) Title = Username + "' Gists"; else Title = Username + "'s Gists"; } } else { Title = "Gists"; } }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; Id = navObject.Id; _issueEditSubscription = Messenger.SubscribeOnMainThread <IssueEditMessage>(x => { if (x.Issue == null || x.Issue.Number != Id) { return; } Issue = x.Issue; }); _pullRequestEditSubscription = Messenger.SubscribeOnMainThread <PullRequestEditMessage>(x => { if (x.PullRequest == null || x.PullRequest.Number != Id) { return; } PullRequest = x.PullRequest; }); }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; Id = navObject.Id; _issueEditSubscription = _messageService.Listen <IssueEditMessage>(x => { if (x.Issue == null || x.Issue.Number != Id) { return; } Issue = x.Issue; }); _pullRequestEditSubscription = _messageService.Listen <PullRequestEditMessage>(x => { if (x.PullRequest == null || x.PullRequest.Number != Id) { return; } PullRequest = x.PullRequest; }); }
public void Init(NavObject navObject) { Username = navObject.Username; }
public void Init(NavObject navObject) { base.Init(navObject.Username, navObject.Repository); Id = navObject.Id; Issue = GetService <IViewModelTxService>().Get() as IssueModel; }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; }
public void Init(NavObject navObject) { Id = navObject.Id; }
public void Init(NavObject navObject) { Username = navObject.Username; RepositorySlug = navObject.RepositorySlug; }
public void Init(NavObject navObject) { Username = navObject.Username; Title = RepositoryName = navObject.Repository; }
public void Init(NavObject navObject) { base.Init(navObject); PullRequestId = navObject.PullRequestId; }
public void Init(NavObject navobject) { Username = navobject.Username; OrganizationName = navobject.OrganizagtionName; }
public void Init(NavObject navObject) { Title = Username = navObject.Username; }
public void Init(NavObject navObject) { base.Init(navObject); Branch = navObject.Branch; }
private void OnEnable() { startPanel = curPanel; }
public void Init(NavObject navObject) { Name = navObject.Username; }
public void ResetNav() { ftueActive = true; curPanel = startPanel; vidOptionsIndicator.SetActive(false); }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; _selectedFilter = navObject.IsShowingBranches ? 0 : 1; }
private void ChangeCurPanel(directions d) { if (ftueActive || uiController.disableButtons || uiController.isSleeping) { return; } if (d == directions.up) { if (curPanel.isBack || (curPanel.upNeighbor.isVideo && videoOptions.mediaController.disableVideoOptions)) { return; } else if (curPanel.upNeighbor != null && curPanel.upNeighbor.isVideo) { ShowVideoOptions(); indicator.SetActive(false); prevPanel = curPanel; curPanel = curPanel.upNeighbor ?? curPanel; moveIndicator(); } else if (prevPanel == null) { curPanel = curPanel.upNeighbor ?? curPanel; if (viewPort.activeInHierarchy && indicator.transform.localPosition.y > -84 && viewPort.transform.localPosition.y > 50) { var curPos = viewPort.transform.localPosition; viewPort.transform.localPosition = new Vector3(curPos.x, curPos.y - 131, curPos.z); } moveIndicator(); } } else if (d == directions.right) { if (curPanel.isVideo) { curPanel = curPanel.rightNeighbor ?? curPanel; moveIndicator(); } else if (prevPanel != null) { backIndicator.SetActive(false); indicator.SetActive(true); curPanel = prevPanel; prevPanel = null; } else { curPanel = curPanel.rightNeighbor ?? curPanel; moveIndicator(); } } else if (d == directions.down) { if (curPanel.isBack) { return; } else if (prevPanel != null) { HideOptions(); vidOptionsIndicator.SetActive(false); indicator.SetActive(true); curPanel = prevPanel; prevPanel = null; } else { curPanel = curPanel.downNeighbor ?? curPanel; if (viewPort.activeInHierarchy && indicator.transform.localPosition.y < -200 && viewPort.transform.localPosition.y < 280) { var curPos = viewPort.transform.localPosition; viewPort.transform.localPosition = new Vector3(curPos.x, curPos.y + 131, curPos.z); } moveIndicator(); } } else if (d == directions.left) { if (curPanel.isVideo) { curPanel = curPanel.leftNeighbor ?? curPanel; moveIndicator(); } else if (curPanel.leftNeighbor != null && curPanel.leftNeighbor.isBack) { backIndicator.SetActive(true); indicator.SetActive(false); prevPanel = curPanel; curPanel = curPanel.leftNeighbor ?? curPanel; } else { curPanel = curPanel.leftNeighbor ?? curPanel; moveIndicator(); } } else if (d == directions.click) { indicator.SetActive(false); if (curPanel != null && !curPanel.isVideo) { prevPanel = null; } curPanel.thisButton.onClick.Invoke(); backIndicator.SetActive(false); } }
public void Init(NavObject navObject) { Username = navObject.Username; Repository = navObject.Repository; PullRequestId = navObject.PullRequestId; }
public void Init(NavObject navObject) { OrganizationName = navObject.Name; }
public void Init(NavObject navObject) { Name = navObject.Name; }
public void Init(NavObject navObject) { RepositoryOwner = navObject.Username; RepositoryName = navObject.Repository; }