/// <summary>Initializes a new instance of the <see cref="ConnectionStringBuilderForm"/> class.</summary>
 /// <param name="hostWindow">The host window.</param>
 /// <param name="services">The services.</param>
 public ConnectionStringBuilderForm(IHostWindow hostWindow, IApplicationServices services)
 {
     InitializeComponent();
     _hostWindow = hostWindow;
     _services   = services;
     Icon        = ImageResource.database_edit_icon;
 }
 /// <summary>Initializes a new instance of the <see cref="DbConnectionsForm"/> class.</summary>
 /// <param name="services">The services.</param>
 /// <param name="hostWindow">The host window.</param>
 /// <param name="settings">The settings.</param>
 public DbConnectionsForm(IApplicationServices services, IHostWindow hostWindow, IApplicationSettings settings)
     : this()
 {
     _services   = services;
     _hostWindow = hostWindow;
     _settings   = settings;
 }
Example #3
0
        /// <summary>Iinitialize the plug in.</summary>
        public override void InitializePlugIn()
        {
            Services.RegisterSingletonComponent <IDatabaseInspector, DatabaseInspectorForm>("DatabaseInspector");
            Services.RegisterComponent <FindObjectForm>("FindObjectForm");

            IHostWindow hostWindow = Services.HostWindow;

            hostWindow.AddPluginCommand <ShowDatabaseInspectorCommand>();
            CommandManager.GetCommandInstance <ShowDatabaseInspectorCommand>().Execute();

            ToolStripMenuItem editMenu = hostWindow.GetMenuItem("edit");

            editMenu.DropDownItems.Add(CommandControlBuilder.CreateToolStripMenuItem <ShowFindObjectFormCommand>());

            hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <GenerateSelectStatementCommand>());
            hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <GenerateSelectCountStatementCommand>());
            hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <GenerateInsertStatementCommand>());
            hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <GenerateUpdateStatementCommand>());
            hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <GenerateDeleteStatementCommand>());
            hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <CopyTableNameCommand>());
            hostWindow.DatabaseInspector.TableMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <TruncateTableCommand>());

            hostWindow.DatabaseInspector.ColumnMenu.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <LocateFkReferenceColumnCommand>());

            // todo: bug - the opening event is not firing....
            CommandControlBuilder.MonitorMenuItemsOpeningForEnabling(hostWindow.DatabaseInspector.ColumnMenu);
        }
Example #4
0
        public bool EditValue(IHostWindow owner, XmlSchemaType type, string input, out string output)
        {
            output = input;
            FontConverter fc = new FontConverter();
            Font          f  = null;

            try
            {
                f        = (Font)fc.ConvertFromString(input);
                _fd.Font = f;
            }
            catch
            {
            }

            if (_fd.ShowDialog(owner as IWin32Window) == DialogResult.OK)
            {
                output = fc.ConvertToString(_fd.Font);
                return(true);
            }
            else
            {
                return(false);
            }
        }
 /// <summary>Initializes a new instance of the <see cref="ConnectionStringBuilderForm"/> class.</summary>
 /// <param name="hostWindow">The host window.</param>
 /// <param name="services">The services.</param>
 public ConnectionStringBuilderForm(IHostWindow hostWindow, IApplicationServices services)
 {
     InitializeComponent();
     _hostWindow = hostWindow;
     _services = services;
     Icon = ImageResource.database_edit_icon;
 }
Example #6
0
        public void LogInfo(IHostWindow host, string source, string message)
        {
            ListViewItem lviMain = new ListViewItem();

            lviMain.Text       = "Info";
            lviMain.ImageIndex = 0;

            ListViewItem.ListViewSubItem lviHostWindow = new ListViewItem.ListViewSubItem();
            lviHostWindow.Text = host.Title;

            ListViewItem.ListViewSubItem lviMessage = new ListViewItem.ListViewSubItem();
            lviMessage.Text = message;

            ListViewItem.ListViewSubItem lviSource = new ListViewItem.ListViewSubItem();
            lviSource.Text = source;

            lviMain.SubItems.Add(lviHostWindow);
            lviMain.SubItems.Add(lviMessage);
            lviMain.SubItems.Add(lviSource);

            itemDictionary[host.Title].Add(lviMain);
            if (selectedWindowTitle == "All" || selectedWindowTitle == host.Title)
            {
                listViewLog.Items.Add(lviMain);
            }

            if (WindowState == FormWindowState.Minimized && host.Settings.NotifyOnLoggedInfo)
            {
                host.ShowNotification(1000, "Console Info", message, ToolTipIcon.Info);
            }
        }
 /// <summary>Initializes a new instance of the <see cref="DbConnectionsForm"/> class.</summary>
 /// <param name="services">The services.</param>
 /// <param name="hostWindow">The host window.</param>
 /// <param name="settings">The settings.</param>
 public DbConnectionsForm(IApplicationServices services, IHostWindow hostWindow, IApplicationSettings settings)
     : this()
 {
     _services = services;
     _hostWindow = hostWindow;
     _settings = settings;
 }
Example #8
0
 public SPU(IHostWindow window)
 {
     this.window = window;
     for (int i = 0; i < voices.Length; i++)
     {
         voices[i] = new Voice();
     }
 }
Example #9
0
        public ControlDoctorService(IHostWindow hostWindow)
        {
            InitializeComponent();

            _hostWindow = hostWindow;

            UpdateDoctorsList();
        }
Example #10
0
        public ControlPatientService(IHostWindow hostWindow)
        {
            InitializeComponent();

            _hostWindow = hostWindow;

            UpdatePatientList();
        }
Example #11
0
        public ProjectPSX(IHostWindow window, string diskFilename)
        {
            controller = new DigitalController();
            cdrom      = new CDROM(window, diskFilename);
            bus        = new BUS(window, controller, cdrom);
            cpu        = new CPU(bus);

            bus.loadBios();
        }
Example #12
0
 public Application(IHostWindow hostWindow, ILogService log, IConfigService config,
                    IResourceService resources, ILayoutInflater layoutInflater)
 {
     this.hostWindow     = hostWindow;
     this.log            = log;
     this.config         = config;
     this.resources      = resources;
     this.layoutInflater = layoutInflater;
 }
 /// <summary>Initializes a new instance of the <see cref="ConnectionStringBuilderForm"/> class.</summary>
 /// <param name="hostWindow">The host window.</param>
 /// <param name="definition">The definition.</param>
 /// <param name="services">The services.</param>
 public ConnectionStringBuilderForm(IHostWindow hostWindow, DbConnectionDefinition definition, IApplicationServices services)
     : this(hostWindow, services)
 {
     ConnectionDefinition = definition;
     ConnectionName = ConnectionDefinition.Name;
     Comments = ConnectionDefinition.Comment;
     _initProvider = ConnectionDefinition.ProviderName;
     _connStr = ConnectionDefinition.ConnectionString;
 }
 /// <summary>Initializes a new instance of the <see cref="ConnectionStringBuilderForm"/> class.</summary>
 /// <param name="hostWindow">The host window.</param>
 /// <param name="definition">The definition.</param>
 /// <param name="services">The services.</param>
 public ConnectionStringBuilderForm(IHostWindow hostWindow, DbConnectionDefinition definition, IApplicationServices services)
     : this(hostWindow, services)
 {
     ConnectionDefinition = definition;
     ConnectionName       = ConnectionDefinition.Name;
     Comments             = ConnectionDefinition.Comment;
     _initProvider        = ConnectionDefinition.ProviderName;
     _connStr             = ConnectionDefinition.ConnectionString;
 }
Example #15
0
        public SPU(IHostWindow window, InterruptController interruptController)
        {
            this.window = window;
            this.interruptController = interruptController;

            for (int i = 0; i < voices.Length; i++)
            {
                voices[i] = new Voice();
            }
        }
        public ControlPatientBonuses(IHostWindow hostWindow, PatientViewModel patientViewModel)
        {
            InitializeComponent();
            
            _hostWindow = hostWindow;
            _patientViewModel = patientViewModel;

            TextBoxBonusQuantity.Text = _patientViewModel.Bonus.ToString();
            TextBoxBonusPercent.Text = _patientViewModel.BonusPercent.ToString();
        }
Example #17
0
        public void logText(IHostWindow host, string message)
        {
            // Append to StringBuilder in dictionary
            consoleDictionary[host.Title].Append(message + Environment.NewLine);

            // If the window being logged to is selected in the dropdown filter, add to ui textbox
            if (selectedWindowTitle == "All" || selectedWindowTitle == host.Title)
            {
                txtConsole.AppendText(message + Environment.NewLine);
            }
        }
Example #18
0
 public BUS(IHostWindow window, Controller controller, CDROM cdrom)
 {
     interruptController = new InterruptController();
     dma        = new DMA(this);
     gpu        = new GPU(window);
     this.cdrom = cdrom;
     timers     = new TIMERS();
     joypad     = new JOYPAD(controller);
     mdec       = new MDEC();
     spu        = new SPU();
 }
        public ControlDoctorInfos(IHostWindow hostWindow, DoctorViewModel doctorViewModel)
        {
            InitializeComponent();

            _hostWindow      = hostWindow;
            _doctorViewModel = doctorViewModel;

            TextBlockDoctorFio.Text         = doctorViewModel.FirstName + " " + doctorViewModel.LastName;
            TextBlockDoctorDescription.Text = doctorViewModel.Description;
            TextBlockDoctorPrice.Text       = doctorViewModel.Price.ToString();
        }
        public PSParameterEditorViewModel(IHostWindow hostWindow, IDataProvider dataProvider)
        {
            _hostWindow   = hostWindow;
            _dataProvider = dataProvider;

            _options.Options.ForEach(x => x.PropertyChanged += OnOptionChanged);

            ViewDetailsCommand = new ViewModelCommand(this, ViewDetails);
            CopyCommand        = new ViewModelCommand(this, Copy);
            CancelCommand      = new ViewModelCommand(this, Cancel);
        }
Example #21
0
        /// <summary>Initializes a new instance of the <see cref="OptionsForm"/> class.</summary>
        /// <param name="applicationServices">The application services.</param>
        /// <param name="hostWindow">The host window.</param>
        public OptionsForm(IApplicationServices applicationServices, IHostWindow hostWindow)
        {
            InitializeComponent();

            // add a grid to the panel
            _propertyGrid = new PropertyGrid();
            _propertyGrid.Dock = DockStyle.Fill;
            groupBox1.Controls.Add(_propertyGrid);

            _services = applicationServices;
            _host = hostWindow;
        }
Example #22
0
        /// <summary>Initializes a new instance of the <see cref="OptionsForm"/> class.</summary>
        /// <param name="applicationServices">The application services.</param>
        /// <param name="hostWindow">The host window.</param>
        public OptionsForm(IApplicationServices applicationServices, IHostWindow hostWindow)
        {
            InitializeComponent();

            // add a grid to the panel
            _propertyGrid      = new PropertyGrid();
            _propertyGrid.Dock = DockStyle.Fill;
            groupBox1.Controls.Add(_propertyGrid);

            _services = applicationServices;
            _host     = hostWindow;
        }
Example #23
0
        public void AttachHost(IHostWindow host, string title, Icon icon = null)
        {
            hostDictionary[title]    = host;
            itemDictionary[title]    = new List <ListViewItem>();
            consoleDictionary[title] = new StringBuilder();

            HostWindowCombo.Items.Add(title);

            if (icon != null)
            {
                this.Icon = icon;
            }
        }
        public PSCommandExplorerViewModel(IHostWindow hostWindow, IDataProvider dataProvider)
        {
            _hostWindow   = hostWindow;
            _dataProvider = dataProvider;

            CopyCommand           = new ViewModelCommand <object>(this, Copy, CanCopy);
            ViewDetailsCommand    = new ViewModelCommand <object>(this, ViewDetails, CanViewDetails);
            ShowHelpCommand       = new ViewModelCommand <object>(this, ShowHelp, CanShowHelp);
            EditParametersCommand = new ViewModelCommand(this, EditParameters);

            UseCommandCommand = new ViewModelCommand(this, UseCommand);
            Load();
        }
        public ControlDoctorUpdate(IHostWindow hostWindow, DoctorViewModel doctorViewModel)
        {
            InitializeComponent();

            _hostWindow = hostWindow;

            _doctorViewModel = doctorViewModel;

            TextBoxFirstName.Text   = doctorViewModel.FirstName;
            TextBoxSecondName.Text  = doctorViewModel.LastName;
            TextBoxDescription.Text = doctorViewModel.Description;
            TextBoxPrice.Text       = doctorViewModel.Price.ToString();
        }
Example #26
0
        /// <summary>Initializes a new instance of the <see cref="QueryForm"/> class.</summary>
        /// <param name="services">The services.</param>
        /// <param name="settings">The settings.</param>
        /// <param name="hostWindow">The host window.</param>
        public QueryForm(IApplicationServices services, IApplicationSettings settings, IHostWindow hostWindow)
            : this()
        {
            _services   = services;
            _settings   = settings;
            _hostWindow = hostWindow;

            var completionProvider = _services.Resolve <ICompletionProvider>();

            if (completionProvider.Enabled)
            {
                _textArea.KeyEventHandler += completionProvider.KeyEventHandlerFired;
            }
        }
        /// <summary>Initializes a new instance of the <see cref="DatabaseInspectorForm"/> class.</summary>
        /// <param name="services">The services.</param>
        /// <param name="hostWindow">The host window.</param>
        public DatabaseInspectorForm(IApplicationServices services, IHostWindow hostWindow)
        {
            InitializeComponent();
            BuildImageList();

            DatabaseTreeView.Nodes.Clear();
            TreeNode root = CreateRootNodes();
            root.Nodes.Add("Loading problem - check connection details and reset...");
            DatabaseTreeView.Nodes.Add(root);

            _services = services;
            _hostWindow = hostWindow;

            _services.Settings.DatabaseConnectionReset += Settings_DatabaseConnectionReset;
        }
        /// <summary>Initializes a new instance of the <see cref="TemplateEditorForm"/> class.</summary>
        /// <param name="services">The services.</param>
        /// <param name="hostWindow">The host window.</param>
        public TemplateEditorForm(IApplicationServices services, IHostWindow hostWindow)
        {
            InitializeComponent();
            txtEdit.Document.DocumentChanged += DocumentDocumentChanged;
            _services = services;
            _hostWindow = hostWindow;

            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<SaveFileCommand>());
            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseActiveWindowCommand>());
            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CloseAllWindowsCommand>());
            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem<CopyQueryEditorFileNameCommand>());

            CommandControlBuilder.MonitorMenuItemsOpeningForEnabling(formContextMenuStrip);
        }
Example #29
0
        /// <summary>Initializes a new instance of the <see cref="TemplateEditorForm"/> class.</summary>
        /// <param name="services">The services.</param>
        /// <param name="hostWindow">The host window.</param>
        public TemplateEditorForm(IApplicationServices services, IHostWindow hostWindow)
        {
            InitializeComponent();
            txtEdit.Document.DocumentChanged += DocumentDocumentChanged;
            _services   = services;
            _hostWindow = hostWindow;

            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <SaveFileCommand>());
            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItemSeparator());
            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <CloseActiveWindowCommand>());
            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <CloseAllWindowsCommand>());
            formContextMenuStrip.Items.Add(CommandControlBuilder.CreateToolStripMenuItem <CopyQueryEditorFileNameCommand>());

            CommandControlBuilder.MonitorMenuItemsOpeningForEnabling(formContextMenuStrip);
        }
Example #30
0
        /// <summary>Initializes a new instance of the <see cref="DatabaseInspectorForm"/> class.</summary>
        /// <param name="services">The services.</param>
        /// <param name="hostWindow">The host window.</param>
        public DatabaseInspectorForm(IApplicationServices services, IHostWindow hostWindow)
        {
            InitializeComponent();
            BuildImageList();

            DatabaseTreeView.Nodes.Clear();
            TreeNode root = CreateRootNodes();

            root.Nodes.Add("Loading problem - check connection details and reset...");
            DatabaseTreeView.Nodes.Add(root);

            _services   = services;
            _hostWindow = hostWindow;

            _services.Settings.DatabaseConnectionReset += Settings_DatabaseConnectionReset;
        }
Example #31
0
        public ControlPatientInfos(IHostWindow hostWindow, PatientViewModel model)
        {
            InitializeComponent();

            _hostWindow = hostWindow;
            _model      = model;

            UpdatePatientInfos();

            var response = ApiClient.GetRequest <ResponseModel>("/api/Patient/GetAllInvoices/" + _model.Id);
            var invoices = ResponseModelHelper.GetResultAsList <PatientInvoicesViewModel>(response);

            ListViewPatients.ItemsSource = new ObservableCollection <PatientInvoicesViewModel>(invoices);

            SetButtonBlockContent();
        }
Example #32
0
        public ProjectPSX(IHostWindow window, string diskFilename)
        {
            controller = new DigitalController();
            memoryCard = new MemoryCard();
            cd         = new CD(diskFilename);
            spu        = new SPU(window);
            gpu        = new GPU(window);
            cdrom      = new CDROM(cd, spu);
            joypad     = new JOYPAD(controller, memoryCard);
            timers     = new TIMERS();
            mdec       = new MDEC();
            bus        = new BUS(gpu, cdrom, spu, joypad, timers, mdec);
            cpu        = new CPU(bus);

            bus.loadBios();
        }
Example #33
0
        public bool EditValue(IHostWindow owner, XmlSchemaType type, string input, out string output)
        {
            output = input;

            if (!string.IsNullOrEmpty(input))
            {
                _fd.FileName = GetAbsolute(input);
            }
            if (_fd.ShowDialog(owner as IWin32Window) == DialogResult.OK)
            {
                output = GetRelative(_fd.FileName);
                return(true);
            }
            else
            {
                return(false);
            }
        }
Example #34
0
        /// <summary>Execute the command.</summary>
        public override void Execute()
        {
            IHostWindow hostWindow = Services.HostWindow;
            string      tableName  = hostWindow.DatabaseInspector.RightClickedTableName;

            string caption = string.Format("Truncate '{0}' Table Confirmation", tableName);
            string msg     = string.Format("Delete all '{0}' data, are you sure?", tableName);

            if (tableName != null && MessageBox.Show(msg, caption, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                DbConnection dbConnection;
                DbCommand    cmd = null;

                try
                {
                    hostWindow.SetPointerState(Cursors.WaitCursor);
                    dbConnection    = Settings.GetOpenConnection();
                    cmd             = dbConnection.CreateCommand();
                    cmd.CommandText = "DELETE FROM " + tableName;
                    cmd.CommandType = CommandType.Text;
                    cmd.ExecuteNonQuery();
                    Services.PostMessage(SystemMessage.TableTruncated, tableName);
                }
                catch (DbException dbExp)
                {
                    hostWindow.DisplaySimpleMessageBox(null, dbExp.Message, "Error");
                }
                catch (InvalidOperationException invalidExp)
                {
                    hostWindow.DisplaySimpleMessageBox(null, invalidExp.Message, "Error");
                }
                finally
                {
                    if (cmd != null)
                    {
                        cmd.Dispose();
                    }

                    hostWindow.SetPointerState(Cursors.Default);
                }
            }
        }
Example #35
0
        public void logError(IHostWindow host, string msg, string url, string line, string col, string error)
        {
            ListViewItem lviMain = new ListViewItem();

            lviMain.Text       = "Error";
            lviMain.ImageIndex = 2;

            ListViewItem.ListViewSubItem lviHostWindow = new ListViewItem.ListViewSubItem();
            lviHostWindow.Text = host.Title;

            ListViewItem.ListViewSubItem lviSource = new ListViewItem.ListViewSubItem();
            lviSource.Text = url;

            ListViewItem.ListViewSubItem lviLine = new ListViewItem.ListViewSubItem();
            lviLine.Text = line;

            ListViewItem.ListViewSubItem lviCol = new ListViewItem.ListViewSubItem();
            lviCol.Text = col;

            ListViewItem.ListViewSubItem lviMessage = new ListViewItem.ListViewSubItem();
            lviMessage.Text = msg;

            lviMain.SubItems.Add(lviHostWindow);
            lviMain.SubItems.Add(lviMessage);
            lviMain.SubItems.Add(lviSource);
            lviMain.SubItems.Add(lviLine);
            lviMain.SubItems.Add(lviCol);

            itemDictionary[host.Title].Add(lviMain);
            if (selectedWindowTitle == "All" || selectedWindowTitle == host.Title)
            {
                listViewLog.Items.Add(lviMain);
            }

            if (WindowState == FormWindowState.Minimized && host.Settings.NotifyOnLoggedErrors)
            {
                host.ShowNotification(1000, "Console Error", msg, ToolTipIcon.Error);
            }
        }
Example #36
0
        /// <summary>
        /// Constructor which determines (via settings) which api classes to expose via COM.
        /// </summary>
        /// <param name="host">Instance of the IHostWindow acting as our container.</param>
        /// <param name="exosettings">User defined settings to use.</param>
        /// <param name="logger">Reference to our logger (if enabled)</param>
        public ScriptInterface(IHostWindow host, ILogWindow logger)
        {
            this.host = host;
            Settings exosettings = host.Settings;

            this.Main      = exosettings.ScriptingEnabled ? new ScriptMain(host) : null;
            this.Media     = exosettings.ScriptingMediaEnabled ? new ScriptMedia(host) : null;
            this.File      = exosettings.ScriptingFilesEnabled ? new ScriptFile(host) : null;
            this.Proc      = exosettings.ScriptingProcessEnabled ? new ScriptProcess() : null;
            this.Session   = new ScriptSession();
            this.System    = exosettings.ScriptingSystemEnabled ? new ScriptSystem(exosettings) : null;
            this.Logger    = exosettings.ScriptingLoggerEnabled ? new ScriptLogger(host) : null;
            this.Com       = exosettings.ScriptingComObjectsEnabled ? new ScriptComObjects() : null;
            this.Net       = exosettings.ScriptingNetEnabled ? new ScriptNet() : null;
            this.Enc       = exosettings.ScriptingEncryptionEnabled ? new ScriptEncryption() : null;
            this.Menu      = exosettings.ScriptingMenuEnabled ? new ScriptMenu(host) : null;
            this.Toolbar   = exosettings.ScriptingToolStripEnabled ? new ScriptToolstrip(host) : null;
            this.Statusbar = exosettings.ScriptingStatusStripEnabled ? new ScriptStatusstrip(host) : null;
            this.Util      = new ScriptUtility();
            this.Dialog    = exosettings.ScriptingDialogEnabled ? new ScriptDialog(host) : null;
            this.Form      = exosettings.ScriptingFormEnabled ? new ScriptForm(host) : null;
        }
 /// <summary>
 /// Sets up a basic <see cref="IHostWindow"/> mock assigning it to <see cref="ApplicationServices"/>.
 /// </summary>
 /// <remarks>
 /// The SetStaus method just takes any parameters.
 /// </remarks>
 public virtual void SetUpHostWindowMock()
 {
     StubHostWindow = MockRepository.GenerateStub<IHostWindow>();
     StubAppServices.Expect(services => services.HostWindow).Return(StubHostWindow).Repeat.Any();
 }
Example #38
0
 public Program(IHostWindow hostWindow)
 {
     this.hostWindow = hostWindow;
 }
Example #39
0
        /// <summary>Initializes a new instance of the <see cref="QueryForm"/> class.</summary>
        /// <param name="services">The services.</param>
        /// <param name="settings">The settings.</param>
        /// <param name="hostWindow">The host window.</param>
        public QueryForm(IApplicationServices services, IApplicationSettings settings, IHostWindow hostWindow)
            : this()
        {
            _services = services;
            _settings = settings;
            _hostWindow = hostWindow;

            var completionProvider = _services.Resolve<ICompletionProvider>();
            if (completionProvider.Enabled)
            {
                _textArea.KeyEventHandler += completionProvider.KeyEventHandlerFired;
            }
        }
 /// <summary>Initializes a new instance of the <see cref="QueryForm"/> class.</summary>
 /// <param name="services">The services.</param>
 /// <param name="settings">The settings.</param>
 /// <param name="hostWindow">The host window.</param>
 public QueryForm(IApplicationServices services, IApplicationSettings settings, IHostWindow hostWindow)
     : this()
 {
     _services = services;
     _settings = settings;
     _hostWindow = hostWindow;
 }