コード例 #1
0
 public ViewsFactory(
     MainWindowAdapter mainWindow,
     ModelObjects model
     )
 {
     this.mainWindow = mainWindow;
     this.model      = model;
 }
コード例 #2
0
ファイル: AppDelegate.cs プロジェクト: sabrogden/logjoint
        public override void DidFinishLaunching(NSNotification notification)
        {
            mainWindowAdapter = new MainWindowAdapter(this);
            var window = mainWindowAdapter.Window;             // get property to force loading of window's nib

            if (Environment.GetCommandLineArgs().FirstOrDefault(arg => arg == "--touch", null) != null)
            {
                NSApplication.SharedApplication.Terminate(this);
            }
            else
            {
                window.MakeKeyAndOrderFront(this);
            }
        }
コード例 #3
0
ファイル: ControlHostService.cs プロジェクト: brobits/ATF
        public ControlHostService(MainWindowAdapter mainWindowAdapter)
        {
            m_mainWindow               = mainWindowAdapter.MainWindow as Sce.Atf.Wpf.Controls.MainWindow;
            m_dockPanel                = new Wws.UI.Docking.DockPanel();
            m_mainWindow.MainContent   = m_dockPanel;
            mainWindowAdapter.Closing += m_mainWindow_Closing;
            mainWindowAdapter.Loaded  += m_mainWindow_Loaded;

            // TODO: temporarily stop compiler warning
            // TODO: Needs to be implemented!
            if (DockStateChanged == null)
            {
                return;
            }
        }
コード例 #4
0
ファイル: EntryPoint.cs プロジェクト: nabuk/IstLight
 public EntryPoint(MainWindowAdapter mainWindow, MainViewModel mainViewModel)
 {
     this.mainWindow = mainWindow;
     this.mainViewModel = mainViewModel;
 }
コード例 #5
0
        public static void WireupDependenciesAndInitMainWindow(MainWindowAdapter mainWindow)
        {
            ISynchronizationContext invokingSynchronization = new NSInvokeSynchronization();

            Properties.WebContentConfig webContentConfig = new Properties.WebContentConfig();

            var model = ModelFactory.Create(
                new ModelConfig {
                WorkspacesUrl         = Properties.Settings.Default.WorkspacesUrl,
                TelemetryUrl          = Properties.Settings.Default.TelemetryUrl,
                IssuesUrl             = Properties.Settings.Default.IssuesUrl,
                AutoUpdateUrl         = Properties.Settings.Default.AutoUpdateUrl,
                PluginsUrl            = Properties.Settings.Default.PluginsUrl,
                WebContentCacheConfig = webContentConfig,
                LogsDownloaderConfig  = webContentConfig,
                TraceListeners        = Properties.Settings.Default.TraceListenerConfig != null ?
                                        new [] { new TraceListener(Properties.Settings.Default.TraceListenerConfig) }
                                                : null
            },
                invokingSynchronization,
                (storageManager) => new PreprocessingCredentialsCache(
                    mainWindow.Window,
                    storageManager.GlobalSettingsEntry,
                    invokingSynchronization
                    ),
                (shutdown, webContentCache, traceSourceFactory) => new Presenters.WebViewTools.Presenter(
                    new WebBrowserDownloaderWindowController(),
                    invokingSynchronization,
                    webContentCache,
                    shutdown,
                    traceSourceFactory
                    ),
                new Drawing.Matrix.Factory(),
                RegularExpressions.LJRegexFactory.Instance
                );

            var viewsFactory = new Presenters.ViewsFactory(mainWindow, model);

            mainWindow.Init(model.InstancesCounter);
            mainWindow.SourcesManagementControlAdapter.SourcesListControlAdapter.Init(viewsFactory);
            var presentation = Presenters.Factory.Create(
                model,
                new ClipboardAccess(),
                new ShellOpen(),
                new AlertPopup(),
                new FileDialogs(),
                new PromptDialogController(),
                new AboutDialogConfig(),
                new DragDropHandler(
                    model.LogSourcesPreprocessings,
                    model.PreprocessingStepsFactory,
                    model.LogSourcesManager
                    ),
                mainWindow,
                viewsFactory
                );

            CustomURLSchemaEventsHandler.Instance.Init(
                presentation.MainFormPresenter,
                model.CommandLineHandler,
                invokingSynchronization
                );
            // todo: consider not depending on mono in the system.
            // It's required to start of updater tool during auto-update
            var monoChecker = new MonoChecker(
                presentation.MainFormPresenter,
                presentation.AlertPopup,
                model.TelemetryCollector,
                presentation.ShellOpen
                );

            model.PluginsManager.LoadPlugins(new Application(
                                                 model.ExpensibilityEntryPoint,
                                                 presentation.ExpensibilityEntryPoint,
                                                 viewsFactory
                                                 ), Properties.Settings.Default.LocalPlugins, false);

            foreach (var asm in model.PluginsManager.PluginAssemblies)
            {
                ObjCRuntime.Runtime.RegisterAssembly(asm);
            }
        }