예제 #1
0
        private void newCategoryMenuItem_Click(object sender, EventArgs e)
        {
            if (repository == null)
            {
                return;
            }

            RepositoryCategory newRepositoryCategory;

            using (var formDashboardCategoryTitle = new FormDashboardCategoryTitle())
            {
                formDashboardCategoryTitle.ShowDialog(this);

                if (string.IsNullOrEmpty(formDashboardCategoryTitle.GetTitle()))
                {
                    return;
                }

                newRepositoryCategory = new RepositoryCategory(formDashboardCategoryTitle.GetTitle());
            }

            RepositoryCategory.RemoveRepository(repository);
            repository.RepositoryType = RepositoryType.Repository;
            newRepositoryCategory.AddRepository(repository);

            Repositories.RepositoryCategories.Add(newRepositoryCategory);

            dashboardCategoryChanged(this, null);
        }
예제 #2
0
        private void newCategoryMenuItem_Click(object sender, EventArgs e)
        {
            var toolStripItem = sender as ToolStripItem;

            if (toolStripItem == null)
            {
                return;
            }

            var repository = toolStripItem.Tag as Repository;

            if (repository == null)
            {
                return;
            }

            var formDashboardCategoryTitle = new FormDashboardCategoryTitle();

            formDashboardCategoryTitle.ShowDialog(this);

            if (string.IsNullOrEmpty(formDashboardCategoryTitle.GetTitle()))
            {
                return;
            }

            var newRepositoryCategory = new RepositoryCategory(formDashboardCategoryTitle.GetTitle());

            RepositoryCategory.RemoveRepository(repository);
            repository.RepositoryType = RepositoryType.Repository;
            newRepositoryCategory.AddRepository(repository);

            Repositories.RepositoryCategories.Add(newRepositoryCategory);

            dashboardCategoryChanged(this, null);
        }
        void newCategoryMenuItem_Click(object sender, EventArgs e)
        {
            ToolStripItem toolStripItem = sender as ToolStripItem;

            if (toolStripItem == null)
                return;

            Repository repository = toolStripItem.Tag as Repository;

            if (repository == null)
                return;

            FormDashboardCategoryTitle formDashboardCategoryTitle = new FormDashboardCategoryTitle();
            formDashboardCategoryTitle.ShowDialog();

            if (string.IsNullOrEmpty(formDashboardCategoryTitle.GetTitle()))
                return;

            RepositoryCategory newRepositoryCategory = new RepositoryCategory(formDashboardCategoryTitle.GetTitle());

            RepositoryCategory.RemoveRepository(repository);
            repository.RepositoryType = RepositoryType.Repository;
            newRepositoryCategory.AddRepository(repository);

            Repositories.RepositoryCategories.Add(newRepositoryCategory);

            dashboardCategoryChanged(this, null);
        }
예제 #4
0
        private void newCategoryMenuItem_Click(object sender, EventArgs e)
        {
            if (repository == null)
                return;

            RepositoryCategory newRepositoryCategory;

            using (var formDashboardCategoryTitle = new FormDashboardCategoryTitle())
            {
                formDashboardCategoryTitle.ShowDialog(this);

                if (string.IsNullOrEmpty(formDashboardCategoryTitle.GetTitle()))
                    return;

                newRepositoryCategory = new RepositoryCategory(formDashboardCategoryTitle.GetTitle());
            }

            RepositoryCategory.RemoveRepository(repository);
            repository.RepositoryType = RepositoryType.Repository;
            newRepositoryCategory.AddRepository(repository);

            Repositories.RepositoryCategories.Add(newRepositoryCategory);

            dashboardCategoryChanged(this, null);
        }