Ejemplo n.º 1
0
        public TutorialStepPresenter(IStepView view, string contentPath, Lifetime lifetime, ISolution solution, IPsiFiles psiFiles,
                                     TextControlManager textControlManager, IShellLocks shellLocks, IEditorManager editorManager,
                                     DocumentManager documentManager, IUIApplication environment, IActionManager actionManager,
                                     IPsiServices psiServices, IActionShortcuts shortcutManager)
        {
            _stepView          = view;
            Lifetime           = lifetime;
            Solution           = solution;
            PsiFiles           = psiFiles;
            TextControlManager = textControlManager;
            ShellLocks         = shellLocks;
            EditorManager      = editorManager;
            DocumentManager    = documentManager;
            Environment        = environment;
            ActionManager      = actionManager;
            _contentPath       = contentPath;
            _codeNavigator     = new SourceCodeNavigator(lifetime, solution, psiFiles, textControlManager, shellLocks, editorManager,
                                                         documentManager, environment);
            _steps = new Dictionary <int, TutorialStep>();
            _steps = TutorialXmlReader.ReadTutorialSteps(contentPath);

            _currentStepId = TutorialXmlReader.ReadCurrentStep(contentPath);
            CurrentStep    = _steps[_currentStepId];

            lifetime.AddBracket(
                () => { _stepView.NextStep += GoNext; },
                () => { _stepView.NextStep -= GoNext; });

            ProcessStep();
        }
Ejemplo n.º 2
0
        private void DoSave()
        {
            IEditorManager action = tvProjects.SelectedNode.Tag as IEditorManager;

            if (action == null)
            {
                return;
            }

            if (action.CurrentEditor == null)
            {
                return;
            }

            if (!action.CurrentEditor.Valid)
            {
                MessageBox.Show("資料驗證錯誤 !", "錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            try
            {
                action.CurrentEditor.Save();
            }
            catch (Exception ex)
            {
                MessageBox.Show("資料儲存失敗 !\n" + ex.Message, "錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 3
0
 public ExhibitUseCases(
     ExhibitRepository exhibitRepository,
     IEditorManager editorManager)
 {
     _exhibitRepository = exhibitRepository;
     _editorManager     = editorManager;
 }
Ejemplo n.º 4
0
        public MainChecker(Lifetime lifetime, TutStep.TutorialStep step, ISolution solution, IPsiFiles psiFiles,
                           TextControlManager textControlManager, IShellLocks shellLocks,
                           IEditorManager editorManager, DocumentManager documentManager)
        {
            _lifetime           = lifetime;
            _currentStep        = step;
            _solution           = solution;
            _textControlManager = textControlManager;
            _documentManager    = documentManager;
            _editorManager      = editorManager;

            if (step.Check.Actions != null)
            {
                _stepActionChecker = new StepActionChecker(lifetime, shellLocks, psiFiles);
            }

            if (step.Check.Method == null)
            {
                return;
            }
            _stepPsiChecker = new StepPsiChecker(lifetime, solution, psiFiles,
                                                 shellLocks);
            _stepNavigationChecker = new StepNavigationChecker(lifetime, solution, psiFiles, textControlManager,
                                                               shellLocks);
        }
Ejemplo n.º 5
0
        public TutorialRunner([NotNull] Lifetime lifetime, ISolution solution, IPsiFiles psiFiles,
                              [NotNull] ISolutionStateTracker solutionStateTracker,
                              [NotNull] GlobalSettings globalSettings, TextControlManager textControlManager, IShellLocks shellLocks,
                              IEditorManager editorManager, DocumentManager documentManager, IUIApplication environment,
                              IActionManager actionManager, ToolWindowManager toolWindowManager, TutorialWindowDescriptor tutorialWindowDescriptor,
                              IWindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager,
                              IColorThemeManager colorThemeManager)
        {
            if (lifetime == null)
            {
                throw new ArgumentNullException("lifetime");
            }
            if (solutionStateTracker == null)
            {
                throw new ArgumentNullException("solutionStateTracker");
            }
            if (globalSettings == null)
            {
                throw new ArgumentNullException("globalSettings");
            }


            foreach (var tutorial in globalSettings.AvailableTutorials)
            {
                if (VsCommunication.GetCurrentSolutionPath() == tutorial.Value)
                {
                    solutionStateTracker.AfterPsiLoaded.Advise(lifetime,
                                                               sol => RunTutorial(globalSettings.GetPath(tutorial.Key, PathType.WorkCopyContentFile), lifetime, solution, psiFiles,
                                                                                  textControlManager, shellLocks, editorManager, documentManager, environment, actionManager, toolWindowManager,
                                                                                  tutorialWindowDescriptor, windowsHookManager, psiServices, shortcutManager, colorThemeManager));
                }
            }
        }
Ejemplo n.º 6
0
        public PassthroughHost(Lifetime lifetime,
                               ISolution solution,
                               IThreading threading,
                               IEditorManager editorManager,
                               UnitySolutionTracker unitySolutionTracker,
                               BackendUnityHost backendUnityHost,
                               FrontendBackendHost frontendBackendHost)
        {
            mySolution            = solution;
            myThreading           = threading;
            myEditorManager       = editorManager;
            myBackendUnityHost    = backendUnityHost;
            myFrontendBackendHost = frontendBackendHost;

            if (!frontendBackendHost.IsAvailable)
            {
                return;
            }

            unitySolutionTracker.IsUnityProject.View(lifetime, (unityProjectLifetime, args) =>
            {
                var model = frontendBackendHost.Model;
                if (args && model != null)
                {
                    AdviseFrontendToUnityModel(unityProjectLifetime, model);

                    // Advise the backend/Unity model as high priority so we can add our subscriptions first
                    using (Signal.PriorityAdviseCookie.Create())
                    {
                        backendUnityHost.BackendUnityModel.ViewNotNull(unityProjectLifetime,
                                                                       AdviseUnityToFrontendModel);
                    }
                }
            });
        }
Ejemplo n.º 7
0
        public TutorialWindowRunner([NotNull] Lifetime lifetime, ISolution solution, IPsiFiles psiFiles,
                                    ChangeManager changeManager, [NotNull] ISolutionStateTracker solutionStateTracker,
                                    [NotNull] GlobalSettings globalSettings, TextControlManager textControlManager, IShellLocks shellLocks,
                                    IEditorManager editorManager, DocumentManager documentManager, IUIApplication environment,
                                    IActionManager actionManager,
                                    WindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager,
                                    IColorThemeManager colorThemeManager, IThreading threading)
        {
            if (lifetime == null)
            {
                throw new ArgumentNullException("lifetime");
            }
            if (solutionStateTracker == null)
            {
                throw new ArgumentNullException("solutionStateTracker");
            }
            if (globalSettings == null)
            {
                throw new ArgumentNullException("globalSettings");
            }


            foreach (var tutorial in globalSettings.AvailableTutorials)
            {
                if (VsIntegration.GetCurrentSolutionPath() == tutorial.Value)
                {
                    solutionStateTracker.AfterSolutionOpened.Advise(lifetime,
                                                                    () =>
                                                                    RunTutorial(globalSettings, tutorial.Key, lifetime, solution, psiFiles, changeManager,
                                                                                textControlManager, shellLocks, editorManager, documentManager, environment,
                                                                                actionManager, windowsHookManager, psiServices, shortcutManager, colorThemeManager,
                                                                                threading));
                }
            }
        }
Ejemplo n.º 8
0
 public ContactUsController(IContactUsManager ContactUsManager, IErrorLogManager errorLogManager, IEmailTemplateManager templateManager, IEditorManager editorManager)
     : base(errorLogManager)
 {
     _ContactUsManager = ContactUsManager;
     _templateManager  = templateManager;
     _editorManager    = editorManager;
 }
Ejemplo n.º 9
0
 public PostCardController(IUserManager userManager, IErrorLogManager errorLogManager, IEmailTemplateManager templateManager, IEditorManager editorManager)
     : base(errorLogManager)
 {
     _userManager     = userManager;
     _templateManager = templateManager;
     _editorManager   = editorManager;
 }
Ejemplo n.º 10
0
        public static void NavigateToNode(DocumentManager documentManager, IEditorManager editorManager,
                                          ITreeNode treeNode, bool activate)
        {
            if (treeNode == null)
            {
                return;
            }

            var range = treeNode.GetDocumentRange();

            if (!range.IsValid())
            {
                return;
            }

            var projectFile = documentManager.TryGetProjectFile(range.Document);

            if (projectFile == null)
            {
                return;
            }

            var textControl = editorManager.OpenProjectFile(projectFile, activate);

            textControl?.Caret.MoveTo(range.TextRange.EndOffset, CaretVisualPlacement.DontScrollIfVisible);
        }
Ejemplo n.º 11
0
 public UIAppCommandImpl(Window window, IProjectManager manager, IProjectShell shell, IEditorManager editorManager)
 {
     this.window        = window;
     this.shell         = shell;
     this.manager       = manager;
     this.editorManager = editorManager;
 }
Ejemplo n.º 12
0
        public void ShowTutorialWindow(int tutorialId, Lifetime lifetime,
                                       ISolution solution, IPsiFiles psiFiles, ChangeManager changeManager, TextControlManager textControlManager,
                                       IShellLocks shellLocks, IEditorManager editorManager, DocumentManager documentManager,
                                       IUIApplication environment,
                                       IActionManager actionManager, WindowsHookManager windowsHookManager, IPsiServices psiServices,
                                       IActionShortcuts shortcutManager, IColorThemeManager colorThemeManager, IThreading threading)
        {
            var contentPath = _globalSettings.GetPath(tutorialId, PathType.WorkCopyContentFile);

            _runningTutorial = tutorialId;

            threading.ExecuteOrQueue("RunTutorialWindow", () =>
            {
                _tutorialWindow = new TutorialWindow(contentPath, lifetime, this, solution, psiFiles, changeManager,
                                                     textControlManager,
                                                     shellLocks, editorManager, documentManager, environment, actionManager, _toolWindowClass,
                                                     windowsHookManager, colorThemeManager);

                lifetime.AddBracket(
                    () =>
                {
                    _tutorialWindow.Show();
                    _homeWindow.HideLoadingImages();
                },
                    () =>
                {
                    _tutorialWindow.Close();
                    _tutorialWindow  = null;
                    _runningTutorial = 0;
                    _homeWindow.EnableButtons(true);
                });
            });
        }
Ejemplo n.º 13
0
 public ProjectShellViewModel(IProjectManager manager, IEditorManager eManager, IEnumerable <IToolPaneViewModel> tools)
 {
     _Manager                 = manager;
     _EditorManager           = eManager;
     State                    = ShellState.Backstage;
     _Tools                   = new ObservableCollection <IToolPaneViewModel>(tools);
     manager.PropertyChanged += manager_PropertyChanged;
 }
Ejemplo n.º 14
0
 public Tutorial3Checks(ISolution solution, IEditorManager editorManager, DocumentManager documentManager,
                        ITextControlManager textControlManager)
 {
     Solution           = solution;
     EditorManager      = editorManager;
     DocumentManager    = documentManager;
     TextControlManager = textControlManager;
 }
Ejemplo n.º 15
0
        private void CheckBeforeMove(CancelEventArgs e)
        {
            if (!_currentDataChanged)
            {
                return;
            }

            TreeNode selected = tvProjects.SelectedNode;

            if (selected == null)
            {
                return;
            }

            IEditorManager em = selected.Tag as IEditorManager;

            if (em == null)
            {
                return;
            }

            IEditable edit = em.CurrentEditor;

            if (edit == null)
            {
                return;
            }

            string msg = "編輯文件已變更且尚未儲存, 離開前是否要進行儲存?\n";

            msg += "按「是」儲存後離開。\n";
            msg += "按「否」不儲存離開。\n";
            msg += "按「取消」停留在原文件。\n";
            DialogResult r = MessageBox.Show(msg, "提示", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);

            if (r == DialogResult.Cancel)
            {
                e.Cancel = true;
            }
            else if (r == DialogResult.Yes)
            {
                if (edit.Valid)
                {
                    edit.Save();
                }
                else
                {
                    MessageBox.Show("文件內容有誤, 請修正後再行儲存", "警告", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    e.Cancel = true;
                }
            }
            else
            {
                _currentDataChanged = false;
                rsbtnSave.Enabled   = false;
            }
        }
Ejemplo n.º 16
0
        private void NewAbout_Load(object sender, System.EventArgs e)
        {
            this.fun1.Start();
            Assembly asmblyMyGen      = System.Reflection.Assembly.GetEntryAssembly();
            Assembly asmblyZeus       = System.Reflection.Assembly.GetAssembly(typeof(Zeus.ZeusTemplate));
            Assembly asmblyPlugins    = System.Reflection.Assembly.GetAssembly(typeof(Zeus.IZeusCodeSegment));
            Assembly asmblyMyMeta     = System.Reflection.Assembly.GetAssembly(typeof(MyMeta.Database));
            Assembly asmblyScintilla  = System.Reflection.Assembly.GetAssembly(typeof(Scintilla.ScintillaControl));
            Assembly asmblyWinFormsUI = System.Reflection.Assembly.GetAssembly(typeof(DockContent));

            lstBoxProducts.Items.Add("MyGeneration".PadRight(29) + asmblyMyGen.GetName().Version.ToString());
            lstBoxProducts.Items.Add("MyMeta".PadRight(29) + asmblyMyMeta.GetName().Version.ToString());
            lstBoxProducts.Items.Add("Zeus Parser".PadRight(29) + asmblyZeus.GetName().Version.ToString());
            lstBoxProducts.Items.Add("Plug-in Interface".PadRight(29) + asmblyPlugins.GetName().Version.ToString());
            lstBoxProducts.Items.Add("ScintillaNet".PadRight(29) + asmblyScintilla.GetName().Version.ToString());
            lstBoxProducts.Items.Add("Scintilla".PadRight(29) + "1.60");
            lstBoxProducts.Items.Add("DockPanel Suite".PadRight(29) + asmblyWinFormsUI.GetName().Version.ToString());
            lstBoxProducts.Items.Add("Npgsql".PadRight(29) + GetAssemblyVersion("Npgsql", "1.0.0.0"));
            lstBoxProducts.Items.Add("Firebird .Net Data Provider".PadRight(29) + GetAssemblyVersion("FirebirdSql.Data.Firebird", "1.7.1.0"));
            lstBoxProducts.Items.Add("System.Data.SQLite".PadRight(29) + GetAssemblyVersion("System.Data.SQLite", "1.0.38.0"));
#if !IGNORE_VISTA
            lstBoxProducts.Items.Add("VistaDB 2.0 ADO.NET Provider".PadRight(29) + "2.0.16");
#else
            lstBoxProducts.Items.Add(""); // number of items must match
#endif
            lstBoxProducts.Items.Add("Dnp.Utils".PadRight(29) + GetAssemblyVersion("Dnp.Utils", "1.0.0.0"));

            foreach (string pluginName in MyMeta.dbRoot.Plugins.Keys)
            {
                IMyMetaPlugin plugin = dbRoot.Plugins[pluginName] as IMyMetaPlugin;
                int           index  = lstBoxProducts.Items.Add(plugin.ProviderName.PadRight(29) + plugin.GetType().Assembly.GetName().Version.ToString());
                plugins[index] = plugin;
            }

            foreach (string pluginName in PluginManager.ContentManagers.Keys)
            {
                IContentManager plugin = PluginManager.ContentManagers[pluginName] as IContentManager;
                int             index  = lstBoxProducts.Items.Add(plugin.Name.PadRight(29) + plugin.GetType().Assembly.GetName().Version.ToString());
                cmPlugins[index] = plugin;
            }

            foreach (string pluginName in PluginManager.SimplePluginManagers.Keys)
            {
                ISimplePluginManager plugin = PluginManager.SimplePluginManagers[pluginName] as ISimplePluginManager;
                int index = lstBoxProducts.Items.Add(plugin.Name.PadRight(29) + plugin.GetType().Assembly.GetName().Version.ToString());
                smPlugins[index] = plugin;
            }

            foreach (string pluginName in PluginManager.EditorManagers.Keys)
            {
                IEditorManager plugin = PluginManager.EditorManagers[pluginName] as IEditorManager;
                int            index  = lstBoxProducts.Items.Add(plugin.Name.PadRight(29) + plugin.GetType().Assembly.GetName().Version.ToString());
                emPlugins[index] = plugin;
            }

            lstBoxProducts.SelectedIndex = 0;
        }
Ejemplo n.º 17
0
 public PostCardController(IErrorLogManager errorLogManager, IImageManager imageManager, IRecipientManager recipientManager, IEditorManager editorManager, IPaymentManager paymentManager)
     : base(errorLogManager)
 {
     _imageManager     = imageManager;
     _recipientManager = recipientManager;
     _editorManager    = editorManager;
     _errorLogManager  = errorLogManager;
     _paymentManager   = paymentManager;
 }
Ejemplo n.º 18
0
 public CulturalEventUseCases(
     SubdivisionRepository subdivisionRepository,
     CulturalEventRepository culturalEventRepository,
     IEditorManager editorManager)
 {
     _subdivisionRepository = subdivisionRepository;
     _culturalEventRepository = culturalEventRepository;
     _editorManager = editorManager;
 }
Ejemplo n.º 19
0
 public SourceCodeNavigator(Lifetime lifetime, ISolution solution, IPsiFiles psiFiles, IShellLocks shellLocks,
                            IEditorManager editorManager, DocumentManager documentManager)
 {
     _lifetime        = lifetime;
     _solution        = solution;
     _psiFiles        = psiFiles;
     _shellLocks      = shellLocks;
     _documentManager = documentManager;
     _editorManager   = editorManager;
 }
Ejemplo n.º 20
0
 public HomeController(IUserManager userManager, IErrorLogManager errorLogManager, IEmailTemplateManager emailTemplateManager, INotificationStackManager notificationStackManager, IRecipientManager recipientManager, IEditorManager editorManager, IPaymentManager paymentManager, IAddressBookManager addressBookManager)
 {
     _userManager              = userManager;
     _emailTemplateManager     = emailTemplateManager;
     _errorLogManager          = errorLogManager;
     _notificationStackManager = notificationStackManager;
     _recipientManager         = recipientManager;
     _editorManager            = editorManager;
     _paymentManager           = paymentManager;
     _addressBookManager       = addressBookManager;
 }
Ejemplo n.º 21
0
 public HomeController(IErrorLogManager errorLogManager, IImageManager imageManager, IRecipientManager recipientManager, IEditorManager editorManager, IUserManager userManager, IPaymentManager paymentManager, ICMSManager cmsManager, IFAQManager faqManager)
     : base(errorLogManager)
 {
     _imageManager     = imageManager;
     _recipientManager = recipientManager;
     _editorManager    = editorManager;
     _errorLogManager  = errorLogManager;
     _userManager      = userManager;
     _paymentManager   = paymentManager;
     _cmsManager       = cmsManager;
     _faqManager       = faqManager;
 }
Ejemplo n.º 22
0
        private void AboutBox_OnLoading(object sender, System.EventArgs e)
        {
            _aboutBoxLogo.Start();
            Assembly asmblyMyGen      = Assembly.GetEntryAssembly();
            Assembly asmblyZeus       = Assembly.GetAssembly(typeof(Zeus.ZeusTemplate));
            Assembly asmblyPlugins    = Assembly.GetAssembly(typeof(Zeus.IZeusCodeSegment));
            Assembly asmblyMyMeta     = Assembly.GetAssembly(typeof(MyMeta.Database));
            Assembly asmblyScintilla  = Assembly.GetAssembly(typeof(Scintilla.ScintillaControl));
            Assembly asmblyWinFormsUI = Assembly.GetAssembly(typeof(DockContent));

            _productsListBox.Items.Add("MyGeneration".PadRight(29) + asmblyMyGen.GetName().Version);
            _productsListBox.Items.Add("MyMeta".PadRight(29) + asmblyMyMeta.GetName().Version);
            _productsListBox.Items.Add("Zeus Parser".PadRight(29) + asmblyZeus.GetName().Version);
            _productsListBox.Items.Add("Plug-in Interface".PadRight(29) + asmblyPlugins.GetName().Version);
            _productsListBox.Items.Add("ScintillaNet".PadRight(29) + asmblyScintilla.GetName().Version);
            _productsListBox.Items.Add("Scintilla".PadRight(29) + "1.60");
            _productsListBox.Items.Add("DockPanel Suite".PadRight(29) + asmblyWinFormsUI.GetName().Version);
            _productsListBox.Items.Add("Npgsql".PadRight(29) + GetAssemblyVersion("Npgsql", "1.0.0.0"));
            _productsListBox.Items.Add("Firebird .Net Data Provider".PadRight(29) + GetAssemblyVersion("FirebirdSql.Data.Firebird", "1.7.1.0"));
            _productsListBox.Items.Add("System.Data.SQLite".PadRight(29) + GetAssemblyVersion("System.Data.SQLite", "1.0.38.0"));
            _productsListBox.Items.Add("VistaDB 2.0 ADO.NET Provider".PadRight(29) + "2.0.16");
            _productsListBox.Items.Add("Dnp.Utils".PadRight(29) + GetAssemblyVersion("Dnp.Utils", "1.0.0.0"));

            foreach (string pluginName in MyMeta.dbRoot.Plugins.Keys)
            {
                var plugin = dbRoot.Plugins[pluginName] as IMyMetaPlugin;
                var index  = _productsListBox.Items.Add(plugin.ProviderName.PadRight(29) + plugin.GetType().Assembly.GetName().Version);
                _myMetaPlugins[index] = plugin;
            }

            foreach (var pluginName in PluginManager.ContentManagers.Keys)
            {
                IContentManager plugin = PluginManager.ContentManagers[pluginName];
                var             index  = _productsListBox.Items.Add(plugin.Name.PadRight(29) + plugin.GetType().Assembly.GetName().Version);
                _contentManagerPlugins[index] = plugin;
            }

            foreach (var pluginName in PluginManager.SimplePluginManagers.Keys)
            {
                ISimplePluginManager plugin = PluginManager.SimplePluginManagers[pluginName];
                var index = _productsListBox.Items.Add(plugin.Name.PadRight(29) + plugin.GetType().Assembly.GetName().Version);
                _simplePluginManagers[index] = plugin;
            }

            foreach (var pluginName in PluginManager.EditorManagers.Keys)
            {
                IEditorManager plugin = PluginManager.EditorManagers[pluginName];
                var            index  = _productsListBox.Items.Add(plugin.Name.PadRight(29) + plugin.GetType().Assembly.GetName().Version);
                _editorManagerPlugins[index] = plugin;
            }

            _productsListBox.SelectedIndex = 0;
        }
Ejemplo n.º 23
0
 public SourceCodeNavigator(Lifetime lifetime, ISolution solution, IPsiFiles psiFiles,
                            TextControlManager textControlManager, IShellLocks shellLocks,
                            IEditorManager editorManager, DocumentManager documentManager, IUIApplication environment)
 {
     _lifetime           = lifetime;
     _solution           = solution;
     _psiFiles           = psiFiles;
     _textControlManager = textControlManager;
     _shellLocks         = shellLocks;
     _documentManager    = documentManager;
     _environment        = environment;
     _editorManager      = editorManager;
 }
Ejemplo n.º 24
0
        private void tvProjects_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            IEditorManager em = tvProjects.SelectedNode.Tag as IEditorManager;

            if (em == null)
            {
                return;
            }
            if (em.CurrentEditor == null)
            {
                return;
            }
            DoEdit(em.CurrentEditor);
        }
Ejemplo n.º 25
0
 public SubdivisionUseCases(
     SubdivisionRepository subdivisionRepository,
     ObjectStorageConfig config,
     IEditorManager editorManager,
     IFileUseCases fileUseCases,
     INotificationUseCases notificationUseCases,
     IExhibitUseCases exhibitUseCases)
 {
     _subdivisionRepository = subdivisionRepository;
     _config               = config;
     _editorManager        = editorManager;
     _fileUseCases         = fileUseCases;
     _notificationUseCases = notificationUseCases;
     _exhibitUseCases      = exhibitUseCases;
 }
Ejemplo n.º 26
0
 public HomeController(IUserManager userManager, IErrorLogManager errorLogManager, ICMSManager cmsManager, IMembershipManager membershipManager, IFAQManager faqManager, ISubscriberManager subsManager, ITestimonialManager testimonialManager, IImageManager imageManager,
                       IEditorManager editorManager, IRecipientManager _recipientManager, IEmailManager _emailManager)
     : base(errorLogManager)
 {
     _userManager           = userManager;
     _cmsManager            = cmsManager;
     _membershipManager     = membershipManager;
     _faqManager            = faqManager;
     _subsManager           = subsManager;
     _testimonialManager    = testimonialManager;
     _imageManager          = imageManager;
     _editorManager         = editorManager;
     this._recipientManager = _recipientManager;
     this._EmailManager     = _emailManager;
 }
Ejemplo n.º 27
0
        public PassthroughHost(Lifetime lifetime,
                               ISolution solution,
                               IThreading threading,
                               IEditorManager editorManager,
                               UnitySolutionTracker unitySolutionTracker,
                               BackendUnityHost backendUnityHost,
                               FrontendBackendHost frontendBackendHost)
        {
            mySolution            = solution;
            myThreading           = threading;
            myEditorManager       = editorManager;
            myBackendUnityHost    = backendUnityHost;
            myFrontendBackendHost = frontendBackendHost;

            if (!frontendBackendHost.IsAvailable)
            {
                return;
            }

            unitySolutionTracker.IsUnityProject.View(lifetime, (unityProjectLifetime, args) =>
            {
                var model = frontendBackendHost.Model;
                if (args && model != null)
                {
                    AdviseFrontendToUnityModel(unityProjectLifetime, model);

                    // Advise the backend/Unity model as high priority so we get called back before other subscribers.
                    // This allows us to populate the protocol on reconnection before other subscribes start to advise
                    using (Signal.PriorityAdviseCookie.Create())
                    {
                        backendUnityHost.BackendUnityModel.ViewNotNull(unityProjectLifetime,
                                                                       AdviseUnityToFrontendModel);
                    }

                    backendUnityHost.BackendUnityModel.Advise(lifetime, backendUnityModel =>
                    {
                        // https://github.com/JetBrains/resharper-unity/pull/2023
                        if (backendUnityModel == null)
                        {
                            frontendBackendHost.Model?.PlayControlsInitialized.SetValue(false);
                        }
                    });
                }
            });
        }
Ejemplo n.º 28
0
        private static void RunTutorial(GlobalSettings globalSettings, int tutorialId, Lifetime lifetime,
                                        ISolution solution,
                                        IPsiFiles psiFiles, ChangeManager changeManager, TextControlManager textControlManager,
                                        IShellLocks shellLocks,
                                        IEditorManager editorManager, DocumentManager documentManager, IUIApplication environment,
                                        IActionManager actionManager,
                                        WindowsHookManager windowsHookManager, IPsiServices psiServices, IActionShortcuts shortcutManager,
                                        IColorThemeManager colorThemeManager, IThreading threading)
        {
            if (globalSettings.TutorialWindowManager == null)
            {
                throw new ApplicationException("Expected globalSettings.TutorialWindowManager");
            }

            globalSettings.TutorialWindowManager.ShowTutorialWindow(tutorialId, lifetime, solution, psiFiles,
                                                                    changeManager,
                                                                    textControlManager, shellLocks, editorManager, documentManager, environment, actionManager,
                                                                    windowsHookManager, psiServices, shortcutManager, colorThemeManager, threading);
        }
Ejemplo n.º 29
0
        public CodeNinjaBuild(ILog logWriter, Project project, IEditorManager editors, SourcePackage mainPackage, List <SourcePackage> referencedPackages, string extraCode = null, AbsoluteFilePath extraSourcePath = null)
        {
            _log = new Log(logWriter.TextWriter);
            _log.MaxErrorCount = 0;

            _logWriter = logWriter;
            _editors   = editors;

            //var newPackages = new List<SourcePackage>();
            //mainPackage = Uno.Build.Packages.PackageResolver.ResolvePackages(_log, project, newPackages);

            AddNotAddedPackages(referencedPackages);
            mainPackage.References.Clear();
            _packages.Each(p => mainPackage.References.Add(p));

            ProjectPackage = mainPackage;

            _extraCode       = extraCode;
            _extraCodeSource = extraSourcePath;

            var configuration = new CodeNinjaBuildTarget();
            var backend       = configuration.CreateBackend();

            var projectDir = project.RootDirectory;
            var rootDir    = AbsoluteDirectoryPath.Parse(Path.Combine(projectDir, ".CodeNinja"));

            _compiler = new Compiler(
                _log,
                backend,
                ProjectPackage,
                new CompilerOptions
            {
                Debug = true,
                CodeCompletionMode = true,
                OutputDirectory    = (rootDir / "Output").ToString(),
                BuildTarget        = new DefaultBuild().Identifier,
                Strip = false
            });

            _projDir   = AbsoluteDirectoryPath.Parse(ProjectPackage.SourceDirectory);
            _filePaths = project.SourceFiles.Select(x => x.UnixPath).Select(RelativeFilePath.Parse).ToList();
        }
Ejemplo n.º 30
0
        public Checker(Lifetime lifetime, TutorialStep step, ISolution solution, IPsiFiles psiFiles,
                       TextControlManager textControlManager, IShellLocks shellLocks,
                       IEditorManager editorManager, DocumentManager documentManager, IActionManager actionManager,
                       IUIApplication environment)
        {
            _lifetime           = lifetime;
            _currentStep        = step;
            _solution           = solution;
            _psiFiles           = psiFiles;
            _textControlManager = textControlManager;
            _shellLocks         = shellLocks;
            _documentManager    = documentManager;
            _environment        = environment;
            _editorManager      = editorManager;
            _actionManager      = actionManager;

            _stepActionChecker = new StepActionChecker(lifetime, shellLocks, psiFiles, actionManager);
            _stepPsiChecker    = new StepPsiChecker(lifetime, solution, psiFiles, textControlManager, shellLocks, editorManager,
                                                    documentManager, environment);
            _stepNavigationChecker = new StepNavigationChecker(lifetime, solution, psiFiles, textControlManager, shellLocks, editorManager, documentManager, environment);
        }