Beispiel #1
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;
        }
Beispiel #2
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;
        }