コード例 #1
0
 public MainWindowController(DbStudioViewsManager dbStudioViewsManager)
 {
     DbStudioViewsManager = dbStudioViewsManager;
     HostController       = new HostController(DbStudioViewsManager.AppName, DbStudioViewsManager.MainWindow);
     HostHelperController = new HostHelperController(DbStudioViewsManager.MainWindow);
     Logger = new Libraries.LibLogger.Core.LogManager();
 }
コード例 #2
0
 /// <summary>
 ///		Inicializa el formulario
 /// </summary>
 private void InitForm()
 {
     // Asigna el icono a la ventana
     Icon = System.Windows.Media.Imaging.BitmapFrame.Create(new Uri("pack://application:,,,./Resources/BauDbStudio.ico", UriKind.RelativeOrAbsolute));
     // Inicializa el contexto y los controles
     DbStudioViewsManager = new Controllers.DbStudioViewsManager("BauDbStudio",
                                                                 System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Bau.DbStudio"),
                                                                 this);
     // Añade los plugins
     DbStudioViewsManager.AddPlugin(new Libraries.DbStudio.Views.DbStudioViewManager());
     DbStudioViewsManager.AddPlugin(new Libraries.BlogReader.Views.BlogReaderPlugin());
     DbStudioViewsManager.AddPlugin(new Libraries.RestStudio.Views.RestStudioViewManager());
     DbStudioViewsManager.AddPlugin(new Libraries.ComicsReader.Plugin.ComicReaderPlugin());
     DbStudioViewsManager.AddPlugin(new Libraries.EbooksReader.Plugin.EBookReaderPlugin());
     DbStudioViewsManager.Initialize();
     // Inicializa el ViewModel
     DataContext = ViewModel = DbStudioViewsManager.PluginsStudioViewModel;
     // Carga los datos
     DbStudioViewsManager.Load(DbStudioViewsManager.ConfigurationController.PathData, DbStudioViewsManager.ConfigurationController.LastWorkSpace);
     ViewModel.LastFilesViewModel.Add(DbStudioViewsManager.ConfigurationController.LastFiles);
     // Añade los manejadores de eventos
     ViewModel.WorkspacesChanged += (sender, args) => ShowMenuWorkspaces();
     // Añade los paneles y barras de herramientas
     ShowPanes();
     ShowToolbars();
     ShowMenus();
     // Asigna los manejadores de eventos
     (DbStudioViewsManager.AppViewController as Controllers.AppViewsController).OpenDocumentRequired += (_, args) => AddTab(args.UserControl, args.ViewModel);
     // Asigna los manejadores de eventos del docker de documentos
     dckManager.Closing += (sender, args) => CloseWindow(args);
     dckManager.Closed  += (sender, args) => DestroyWindow(args);
     //dckManager.Closed += (sender, args) => DestroyTab(args);
     dckManager.ActiveDocumentChanged += (sender, args) => UpdateSelectedTab();
     // Cambia el tema
     SetTheme((Controls.DockLayout.DockLayoutManager.DockTheme)DbStudioViewsManager.ConfigurationController.LastThemeSelected);
     // Muestra el número de versión
     lblVersion.Text = GetAssemblyVersion();
     // Carga los menús de espacios de trabajo
     ShowMenuWorkspaces();
 }
コード例 #3
0
 public PluginsController(DbStudioViewsManager dbStudioViewsManager)
 {
     MainWindowController    = dbStudioViewsManager.MainWindowsController;
     HostPluginsController   = new HostPluginsController(dbStudioViewsManager);
     ConfigurationController = dbStudioViewsManager.ConfigurationController;
 }
コード例 #4
0
 public AppViewsController(DbStudioViewsManager dbStudioViewsManager)
 {
     DbStudioViewsManager = dbStudioViewsManager;
 }
コード例 #5
0
 public PluginsStudioController(DbStudioViewsManager dbStudioViewManager)
 {
     DbStudioViewManager = dbStudioViewManager;
     PluginsController   = new PluginsController(dbStudioViewManager);
 }
コード例 #6
0
 public HostPluginsController(DbStudioViewsManager dbStudioViewManager)
 {
     DbStudioViewManager = dbStudioViewManager;
 }