コード例 #1
0
        async void OnBranchCellClicked(object sender, EventArgs e)
        {
            ContentView.FileList.Branches.Normalize();

            BranchCell cell = (BranchCell)sender;

            cell.Highlight();

            CurrentBranch = cell.Branch.Name;

            var content = await HubClient.Instance.GetRepositoryContent(GithubOwner, GithubRepo, CurrentBranch, GithubPath);

            ContentView.FileList.Show(content.ToGithubFiles());
        }
コード例 #2
0
        public void Add(IReadOnlyList <Octokit.Branch> branches)
        {
            Clear();

            foreach (var branch in branches)
            {
                var cell = BranchCell.FromBranch(branch);

                cell.Click += delegate {
                    Normalize();
                    UpdateText(cell.Branch.Name);
                    cell.Highlight();

                    if (CellClick != null)
                    {
                        CellClick(cell, EventArgs.Empty);
                    }
                };

                header.Add(cell);
            }
        }