Beispiel #1
0
 public ScheduleController()
 {
     _forumThreadFacade = new ForumThreadFacade();
     _quizFacade        = new QuizFacade();
     _moduleFacade      = new ModuleFacade();
     crsFacade          = new CourseFacade();
     usrFacade          = new UserFacade();
     schFacade          = new ScheduleFacade();
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            IUnityContainer container = new UnityContainer();

            var moduleFacade = ModuleFacade.Create(new ModuleProviderOfConsole <MainModule>(container));

            moduleFacade.InitAllModules();

            var plugins = moduleFacade.GetAllPlugins();
            var modules = moduleFacade.GetAllModules();

            var test1 = container.Resolve <ITest1>();
            var test2 = container.Resolve <ITest2>();

            Console.ReadLine();
        }
Beispiel #3
0
 public ModuleController()
 {
     _moduleFacade = new ModuleFacade();
     _docFacade    = new DocumentFacade();
 }
Beispiel #4
0
        public FormMain()
        {
            InitializeComponent();

            DockContainer          = new DockContainer();
            DockContainer.MainForm = this;
            DockContainer.Dock     = DockStyle.Fill;

            this.toolStripContainer1.ContentPanel.Controls.Add(this.DockContainer);

            DockContainer.ShowDocumentIcon = true;

            DockContainer.DocumentStyle = DocumentStyles.DockingWindow;

            DockContainer.ActiveDocumentChanged += new EventHandler(_DockContainer_ActiveDocumentChanged);

            DockContainer.ActiveContentChanged += new EventHandler(_DockContainer_ActiveContentChanged);

            DockContainer.ContextMenu = new ContextMenu();

            Assembly exe = this.GetType().Assembly;

            ResourceService.RegisterNeutralStrings(new ResourceManager("PAT.Main.Properties.StringResources", exe));
            ResourceService.RegisterNeutralImages(new ResourceManager("PAT.Main.Properties.BitmapResources", exe));

            WorkbenchSingleton.DockContainer = DockContainer;
            WorkbenchSingleton.InitializeWorkbench();

            CoreStartup startup = new CoreStartup(Common.Ultility.Ultility.APPLICATION_NAME);

            startup.ConfigDirectory = Common.Ultility.Ultility.APPLICATION_PATH;
            startup.DataDirectory   = Common.Ultility.Ultility.APPLICATION_PATH;

            startup.StartCoreServices();
            startup.RunInitialization();

            ((ToolStripProfessionalRenderer)StandardToolBar.Renderer).ColorTable.UseSystemColors = true;

            Output_Window           = new OutputDockingWindow();
            Output_Window.Icon      = Common.Ultility.Ultility.GetIcon("Output");
            Output_Window.Disposed += new EventHandler(output_Window_Disposed);

            ErrorListWindow                       = new ErrorListWindow();
            ErrorListWindow.Icon                  = Common.Ultility.Ultility.GetIcon("ErrorList");
            ErrorListWindow.Disposed             += new EventHandler(ErrorListWindow_Disposed);
            ErrorListWindow.ListView.DoubleClick += new EventHandler(ErrorListView_DoubleClick);


            this.toolStripContainer1.TopToolStripPanel.Controls.Clear();
            this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.FunctionalToolBar);
            this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.StandardToolBar);
            this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.MenuStrip);

            StandardToolBar.Location   = new Point(3, 24);
            FunctionalToolBar.Location = new Point(3, 49);
            FunctionalToolBar.Size     = new Size(409, 25);
            MenuStrip.Dock             = DockStyle.Top;
            MenuStrip.Location         = new Point(0, 0);

            CheckForItemState();

            CurrentModule = new ModuleFacade();
            Language      = HighlightingManager.Manager.AddHighlightingStrategy(Path.Combine(Application.StartupPath, "Syntax.xshd"));
            OpenFilter    = Language.Name + " (*" + Language.ExtensionString + ")|*" + Language.ExtensionString;

            CurrentModule.ShowModel += new ShowModelHandler(ShowModel);
            CurrentModule.ExampleMenualToolbarInitialize(this.MenuButton_Examples);
            CurrentModule.ReadConfiguration();

            //Common.Ultility.Ultility.ModuleFolderNames.Add(moduleFolderName);
            Common.Ultility.Ultility.ModuleNames      = new List <string>();
            Common.Ultility.Ultility.ModuleDictionary = new Dictionary <string, ModuleFacadeBase>();

            Common.Ultility.Ultility.ModuleNames.Add(Language.Name);
            Common.Ultility.Ultility.ModuleDictionary.Add(Language.Name, CurrentModule);
            Common.Ultility.Ultility.Images.ImageList.Images.Add(Language.Name, CurrentModule.ModuleIcon);

            this.FunctionalToolBar.SuspendLayout();
            CurrentModule.ToolbarInitialize(this.FunctionalToolBar, Toolbar_Button_Click);
            this.FunctionalToolBar.ResumeLayout();
        }