Esempio n. 1
0
 public ModulePublicationTab(IModuniModel moduniModel, GUIStyles styles)
 {
     this.moduniModel        = moduniModel;
     this.styles             = styles;
     this.modulesToggleGroup = new ModulesToggleGroup(this.CreateSelectors(moduniModel.ProjectModules, moduniModel.Modules));
     this.moduniModel.OnProjectModulesUpdated += this.OnProjectModulesUpdated;
     this.commitMessage = ModulePublicationTab.DefaultCommitMessage;
 }
Esempio n. 2
0
        public ModuleRepositoryStatus(IModule module, GUIStyles styles)
        {
            this.module = module;
            this.OnModuleFilesUpdated(module, module.Files);
            this.styles = styles;

            this.module.OnFilesUpdated += this.OnModuleFilesUpdated;
        }
Esempio n. 3
0
 public ModuleImportationTab(IModuniModel moduniModel, GUIStyles styles)
 {
     this.styles      = styles;
     this.moduniModel = moduniModel;
     this.moduniModel.OnModulesUpdated        += this.OnModulesUpdated;
     this.moduniModel.OnProjectModulesUpdated += this.OnProjectModulesUpdated;
     this.modulesSelector = new ModulesImportationSelector(this.CreateSelectors(this.moduniModel.Modules, this.moduniModel.ProjectModules));
 }
Esempio n. 4
0
        public ConfigurationTab(DeveloperSettings developerSettings, IEnumerable <ARepositoryManagerSettings> repositoriesManagersSettings, GUIStyles styles)
        {
            this.originalDeveloperSettings            = developerSettings;
            this.originalRepositoriesManagersSettings = repositoriesManagersSettings;

            this.CloneOriginalSettings();

            this.repositoryManagerSettingsFactory = new RepositoryManagerSettingsFactory();
            this.settingsTypes = new List <string>(this.repositoryManagerSettingsFactory.GetSettingsTypes());
            this.styles        = styles;
        }
Esempio n. 5
0
        public ModuleStateEditor(ModuleState moduleStateToBeEdited, IEnumerable <Tuple <IRepositoryManager, IModule> > modules, string validationLabel, GUIStyles styles)
        {
            this.validationLabel     = validationLabel;
            this.styles              = styles;
            this.objectEdited        = moduleStateToBeEdited;
            this.dependenciesEditors = new DependenciesEditor(this.objectEdited.Dependencies, modules.ToList());
            this.Modules             = modules;

            this.version   = new BranchVersion(1, 0, 0);
            this.tag       = new Tag("New tag", Color.red);
            this.trlLabels = new string[] { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
        }
Esempio n. 6
0
        public ModuniEditorWindow()
        {
            this.moduniModel = new ModuniModel();
            this.moduniModel.OnMessageTriggered += this.OnMessageTriggered;

            this.styles = new GUIStyles();

            ModuleCreationTab moduleCreationTab = new ModuleCreationTab(this.moduniModel, this.styles);

            moduleCreationTab.OnMessageTriggered        += this.OnMessageTriggered;
            moduleCreationTab.OnModuleCreationCompleted += this.OnModuleCreationCompleted;
            ModuleModificationTab moduleModificationTab = new ModuleModificationTab(this.moduniModel, this.styles);

            moduleModificationTab.OnMessageTriggered            += this.OnMessageTriggered;
            moduleModificationTab.OnModuleModificationCompleted += this.OnModuleModificationCompleted;
            ModuleImportationTab moduleImportationTab = new ModuleImportationTab(this.moduniModel, this.styles);

            moduleImportationTab.OnMessageTriggered += this.OnMessageTriggered;
            moduleImportationTab.OnModulesSelected  += this.OnModulesSelectedForImportation;
            ModulePublicationTab modulePublicationTab = new ModulePublicationTab(this.moduniModel, this.styles);

            modulePublicationTab.OnMessageTriggered += this.OnMessageTriggered;
            modulePublicationTab.OnModuleChangesPublicationSelected += this.OnModuleSelectedForChangesPublication;
            modulePublicationTab.OnModuleVersionPublicationSelected += this.OnModuleSelectedForVersionPublication;
            ProjectModuleDeletionTab projectModuleDeletionTab = new ProjectModuleDeletionTab(this.moduniModel, this.styles);

            projectModuleDeletionTab.OnMessageTriggered += this.OnMessageTriggered;
            projectModuleDeletionTab.OnModulesSelected  += this.OnModulesSelectedForDeletion;
            ConfigurationTab configurationTab = new ConfigurationTab(this.moduniModel.DeveloperSettings, this.moduniModel.RepositoriesManagersSettings, this.styles);

            configurationTab.OnConfigurationSaved += this.OnConfigurationSaved;
            configurationTab.OnMessageTriggered   += this.OnMessageTriggered;
            this.tabs = new ITab[]
            {
                moduleCreationTab,
                moduleModificationTab,
                moduleImportationTab,
                modulePublicationTab,
                projectModuleDeletionTab,
                configurationTab
            };
            this.tabsNames = new string[this.tabs.Length];
            for (int i = 0; i < this.tabs.Length; i++)
            {
                this.tabsNames[i] = this.tabs[i].Name;
            }
            this.activeTab             = this.tabs[0];
            this.selectedToolbarButton = 0;

            this.messageBoard         = new MessageBoard();
            EditorApplication.update += () => this.Repaint();
        }
Esempio n. 7
0
        public ModuleModificationTab(IModuniModel moduniModel, GUIStyles styles)
        {
            this.moduniModel = moduniModel;
            this.styles      = styles;

            this.modulesToggleGroupState             = new ModulesToggleGroup(this.CreateSelectors(moduniModel.ProjectModules, moduniModel.Modules));
            this.modulesToggleGroupState.OnSelected += this.OnModuleSelected;

            this.moduleEditorState            = new ModuleStateEditor(this.moduniModel.ModuleFactory.CreateModuleState(), moduniModel.Modules, "Modify module", this.styles);
            this.moduleEditorState.IsCreation = false;
            this.moduleEditorState.IsVersionEditionEnabled = false;
            this.moduleEditorState.OnMessageTriggered     += this.OnModuleEditorMessageTriggered;
            this.moduleEditorState.OnEditionCompleted     += this.OnModuleEditionCompleted;

            this.moduniModel.OnProjectModulesUpdated += this.OnProjectModulesUpdated;

            this.currentState = this.modulesToggleGroupState;
        }
Esempio n. 8
0
        public ModuleVersionSelector(Tuple <IRepositoryManager, IModule> moduleSelectable, IModule projectModule, GUIStyles styles)
        {
            this.moduleSelectable = moduleSelectable;
            this.projectModule    = projectModule;
            this.styles           = styles;

            if (this.projectModule != null)
            {
                this.repositoryStatus = new ModuleRepositoryStatus(projectModule, styles);
            }

            this.maxVersion = this.moduleSelectable.Item2.Versions.Where((BranchVersion branchVersion) => branchVersion.IsVersion).Max();
            if (projectModule != null)
            {
                this.versionSelected = this.moduleSelectable.Item2.Versions.FindIndex((BranchVersion branchVersion) => branchVersion.ToString() == projectModule.CurrentBranchVersion.ToString());
            }
            else
            {
                this.versionSelected = this.moduleSelectable.Item2.Versions.FindIndex((BranchVersion branchVersion) => branchVersion.ToString() == "master");
            }
            this.versionsAvailable = this.moduleSelectable.Item2.Versions.Select <BranchVersion, string>((BranchVersion branchVersion) => branchVersion.ToString()).ToArray();
        }
Esempio n. 9
0
        public ModuleCreationTab(IModuniModel moduniModel, GUIStyles styles)
        {
            this.styles      = styles;
            this.moduniModel = moduniModel;

            this.repositoryManagerSelectorState             = new RepositoryManagerSelector(this.moduniModel.RepositoriesManagers);
            this.repositoryManagerSelectorState.OnSelected += this.OnRepositoryManagerSelected;

            this.moduleEditorState = new ModuleStateEditor(moduniModel.ModuleFactory.CreateModuleState(), moduniModel.Modules, "Create module", this.styles);
            this.moduleEditorState.OnMessageTriggered += delegate(Message message)
            {
                if (this.OnMessageTriggered != null)
                {
                    this.OnMessageTriggered(message);
                }
            };
            this.moduleEditorState.OnEditionCompleted      += this.OnModuleEditionCompleted;
            this.moduniModel.OnModulesUpdated              += this.OnModulesUpdated;
            this.moduniModel.OnRepositoriesManagersUpdated += this.OnRepositoriesManagersUpdated;

            this.currentState = this.repositoryManagerSelectorState;
        }
Esempio n. 10
0
 public ModuleDetails(IModule module, IEnumerable <Tuple <IRepositoryManager, IModule> > otherModules, GUIStyles styles)
 {
     this.module       = module;
     this.otherModules = otherModules;
     this.styles       = styles;
 }
Esempio n. 11
0
 public SimpleModuleSelector(Tuple <IRepositoryManager, IModule> moduleSelectable, GUIStyles styles)
 {
     this.moduleSelectable = moduleSelectable;
     this.styles           = styles;
 }