예제 #1
0
        public SyncFilter(Dictionary <Guid, WorkspaceSyncCategory> InUniqueIdToCategory, string[] InGlobalView, Dictionary <Guid, bool> InGlobalSyncCategories, bool bInGlobalProjectOnly, bool bInGlobalIncludeAllProjectsInSolution, string[] InWorkspaceView, Dictionary <Guid, bool> InWorkspaceSyncCategories, bool?bInWorkspaceProjectOnly, bool?bInWorkspaceIncludeAllProjectsInSolution)
        {
            InitializeComponent();

            UniqueIdToCategory     = InUniqueIdToCategory;
            GlobalSyncCategories   = InGlobalSyncCategories;
            GlobalView             = InGlobalView;
            bGlobalSyncAllProjects = bInGlobalProjectOnly;
            bGlobalIncludeAllProjectsInSolution = bInGlobalIncludeAllProjectsInSolution;
            WorkspaceSyncCategories             = InWorkspaceSyncCategories;
            WorkspaceView             = InWorkspaceView;
            bWorkspaceSyncAllProjects = bInWorkspaceProjectOnly;
            bWorkspaceIncludeAllProjectsInSolution = bInWorkspaceIncludeAllProjectsInSolution;

            Dictionary <Guid, bool> SyncCategories = WorkspaceSyncCategory.GetDefault(UniqueIdToCategory.Values);

            WorkspaceSyncCategory.ApplyDelta(SyncCategories, InGlobalSyncCategories);
            GlobalControl.SetView(GlobalView);
            SetExcludedCategories(GlobalControl.CategoriesCheckList, UniqueIdToCategory, SyncCategories);
            GlobalControl.SyncAllProjects.Checked = bGlobalSyncAllProjects;
            GlobalControl.IncludeAllProjectsInSolution.Checked = bGlobalIncludeAllProjectsInSolution;

            WorkspaceSyncCategory.ApplyDelta(SyncCategories, InWorkspaceSyncCategories);
            WorkspaceControl.SetView(WorkspaceView);
            SetExcludedCategories(WorkspaceControl.CategoriesCheckList, UniqueIdToCategory, SyncCategories);
            WorkspaceControl.SyncAllProjects.Checked = bWorkspaceSyncAllProjects ?? bGlobalSyncAllProjects;
            WorkspaceControl.IncludeAllProjectsInSolution.Checked = bWorkspaceIncludeAllProjectsInSolution ?? bGlobalIncludeAllProjectsInSolution;

            GlobalControl.CategoriesCheckList.ItemCheck     += GlobalControl_CategoriesCheckList_ItemCheck;
            GlobalControl.SyncAllProjects.CheckStateChanged += GlobalControl_SyncAllProjects_CheckStateChanged;
            GlobalControl.IncludeAllProjectsInSolution.CheckStateChanged += GlobalControl_IncludeAllProjectsInSolution_CheckStateChanged;
        }
예제 #2
0
        private void GetExcludedCategories(out Dictionary <Guid, bool> NewGlobalSyncCategories, out Dictionary <Guid, bool> NewWorkspaceSyncCategories)
        {
            Dictionary <Guid, bool> DefaultSyncCategories = WorkspaceSyncCategory.GetDefault(UniqueIdToCategory.Values);

            Dictionary <Guid, bool> GlobalSyncCategories = GetCategorySettings(GlobalControl.CategoriesCheckList);

            NewGlobalSyncCategories = WorkspaceSyncCategory.GetDelta(DefaultSyncCategories, GlobalSyncCategories);

            Dictionary <Guid, bool> WorkspaceSyncCategories = GetCategorySettings(WorkspaceControl.CategoriesCheckList);

            NewWorkspaceSyncCategories = WorkspaceSyncCategory.GetDelta(GlobalSyncCategories, WorkspaceSyncCategories);
        }