示例#1
0
        private void AddDashboardEntry(RepositoryCategory entry)
        {
            var dashboardCategory = new DashboardCategory(entry.Description, entry);

            this.groupLayoutPanel.Controls.Add(dashboardCategory);

            dashboardCategory.DashboardItemClick       += dashboardItem_Click;
            dashboardCategory.DashboardCategoryChanged += dashboardCategory_DashboardCategoryChanged;
        }
示例#2
0
        public void ShowRecentRepositories()
        {
            if (!Visible)
            {
                return;
            }
            //Make sure the dashboard is only initialized once
            if (!initialized)
            {
                //Remove favourites
                for (int i = splitContainer5.Panel2.Controls.Count; i > 0; i--)
                {
                    DashboardCategory dashboarCategory = splitContainer5.Panel2.Controls[i - 1] as DashboardCategory;
                    if (dashboarCategory != null)
                    {
                        dashboarCategory.DashboardCategoryChanged -= dashboardCategory_DashboardCategoryChanged;
                        dashboarCategory.DashboardItemClick       -= dashboardItem_Click;
                        dashboarCategory.Clear();
                        splitContainer5.Panel2.Controls.RemoveAt(i - 1);
                    }
                }

                //Show favourites
                Repositories.RepositoryCategories.Aggregate(0, AddDashboardEntry);

                splitContainer7.SplitterDistance = splitContainer7.Height - (DonateCategory.Height + 25);

                initialized = true;
                splitContainer7.SplitterDistance = splitContainer7.Height - (DonateCategory.Height + 25);

                initialized = true;
            }

            RecentRepositories.Clear();

            RepositoryCategory filteredRecentRepositoryHistory = new RepositoryCategory();

            filteredRecentRepositoryHistory.Description  = Repositories.RepositoryHistory.Description;
            filteredRecentRepositoryHistory.CategoryType = Repositories.RepositoryHistory.CategoryType;

            foreach (Repository repository in Repositories.RepositoryHistory.Repositories)
            {
                if (!Repositories.RepositoryCategories.Any(c => c.Repositories.Any(r => r.Path != null && r.Path.Equals(repository.Path, StringComparison.CurrentCultureIgnoreCase))))
                {
                    repository.RepositoryType = RepositoryType.History;
                    filteredRecentRepositoryHistory.Repositories.Add(repository);
                }
            }

            RecentRepositories.RepositoryCategory = filteredRecentRepositoryHistory;
        }
示例#3
0
        private int AddDashboardEntry(int y, RepositoryCategory entry)
        {
            var dashboardCategory = new DashboardCategory(entry.Description, entry)
            {
                Location = new Point(0, y),
                Width    = splitContainer5.Panel2.Width
            };

            splitContainer5.Panel2.Controls.Add(dashboardCategory);
            dashboardCategory.BringToFront();
            y += dashboardCategory.Height;

            dashboardCategory.DashboardItemClick       += dashboardItem_Click;
            dashboardCategory.DashboardCategoryChanged += dashboardCategory_DashboardCategoryChanged;

            return(y);
        }
示例#4
0
        private void AddDashboardEntry(RepositoryCategory entry)
        {
            var dashboardCategory = new DashboardCategory(entry.Description, entry);
            this.groupLayoutPanel.Controls.Add(dashboardCategory);

            dashboardCategory.DashboardItemClick += dashboardItem_Click;
            dashboardCategory.DashboardCategoryChanged += dashboardCategory_DashboardCategoryChanged;
        }
示例#5
0
        private int AddDashboardEntry(int y, RepositoryCategory entry)
        {
            var dashboardCategory = new DashboardCategory(entry.Description, entry)
                                        {
                                            Location = new Point(0, y),
                                            Width = splitContainer5.Panel2.Width
                                        };
            splitContainer5.Panel2.Controls.Add(dashboardCategory);
            dashboardCategory.BringToFront();
            y += dashboardCategory.Height;

            dashboardCategory.DashboardItemClick += dashboardItem_Click;
            dashboardCategory.DashboardCategoryChanged += dashboardCategory_DashboardCategoryChanged;

            return y;
        }
示例#6
0
        private int AddDashboardEntry(int y, RepositoryCategory entry)
        {
            DashboardCategory dashboardCategory = new DashboardCategory(entry.Description, entry)
                                                      {
                                                          Location = new Point(0, y),
                                                          Width = splitContainer5.Panel2.Width
                                                      };
            dashboardCategory.DashboardItemClick += new EventHandler(dashboardItem_Click);
            splitContainer5.Panel2.Controls.Add(dashboardCategory);
            dashboardCategory.BringToFront();
            y += dashboardCategory.Height;

            //Recalculate hieght when list is changed
            //entry.ListChanged += entry_ListChanged;
            dashboardCategory.DashboardCategoryChanged += new EventHandler(dashboardCategory_DashboardCategoryChanged);

            return y;
        }