Exemple #1
0
        private void tabbedView1_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
        {
            MyBrowser wb = new MyBrowser();

            wb.Dock          = DockStyle.Fill;
            wb.TitleChanged += wb_TitleChanged;
            docs.Add(e.Document);
            e.Control = wb;
        }
Exemple #2
0
        private void ViewScripts_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
        {
            var editor = new ScriptEditorControl();

            if (!string.IsNullOrWhiteSpace(_SyntaxName))
            {
                editor.LoadSyntax(_SyntaxName);
            }

            e.Control = editor;
        }
Exemple #3
0
 private void TabbedView_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
 {
     if (e.Document.ControlName == typeof(CustomersListForm).Name)
     {
         e.Control = new CustomersListForm();
     }
     else if (e.Document.ControlName == typeof(OrdersListForm).Name)
     {
         e.Control = new OrdersListForm();
     }
     else
     {
         throw new ArgumentException($"Unknown control name {e.Document.ControlName}");
     }
 }
Exemple #4
0
        private void TabbedView_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
        {
            switch (e.Document.ControlName)
            {
            case nameof(CustomersListForm):
                e.Control = new CustomersListForm();
                break;

            case nameof(OrdersListForm):
                e.Control = new OrdersListForm();
                break;

            default:
                throw new ArgumentException($"Unknown control name {e.Document.ControlName}");
            }
        }
Exemple #5
0
        private void windowsUIView1_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
        {
            Panel panel = new Panel(); panel.BackColor = Color.Aqua; if (e.Document == document1)

            {
                e.Control = docMngMembers;
            }

            if (e.Document == document2)
            {
                e.Control = docMngGoods;
            }
            if (e.Document == document3)
            {
                e.Control = docMngRent;
            }
            if (e.Document == document4)
            {
                e.Control = docMngSales;
            }
        }
        private void ViewEditors_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
        {
            switch (e.Document.ControlName)
            {
            case "docScript":
                if (_ScriptEditor == null)
                {
                    _ScriptEditor = new ScriptEditorControl();

                    var model = mvvmContext.GetViewModel <ConsoleDocumentViewModel>();
                    _ScriptEditor.LoadSyntax(model.Engine.SyntaxFile);
                    _ScriptEditor.DefaultExt             = model.Engine.DefaultExt;
                    _ScriptEditor.FileFilter             = model.Engine.FileFilter;
                    _ScriptEditor.ModifiedChanged       += ScriptEditor_ModifiedChanged;
                    _ScriptEditor.ListIntellisenseItems += ScriptEditor_ListIntellisenseItems;
                    _ScriptEditor.ScriptChanged         += ScriptEditor_ScriptChanged;

                    if (!string.IsNullOrWhiteSpace(model.FileName))
                    {
                        var scriptFileName = model.GetScriptFileName(model.FileName);
                        if (scriptFileName != null && File.Exists(scriptFileName))
                        {
                            _ScriptEditor.LoadFromFile(scriptFileName);
                        }
                    }
                }
                e.Control = _ScriptEditor;
                break;

            case "docConsole":
                if (_ConsoleOutputControl == null)
                {
                    var model = mvvmContext.GetViewModel <ConsoleDocumentViewModel>();
                    _ConsoleOutputControl   = new ConsoleOutputControl(model);
                    model.SynchronizeInvoke = _ConsoleOutputControl;

                    _ConsoleOutputControl.RibbonUpdateRequest += ConsoleOutputControl_RibbonUpdateRequest;
                    _ConsoleOutputControl.ConsoleLoaded       += ConsoleOutputControl_ConsoleLoaded;
                }
                e.Control = _ConsoleOutputControl;
                break;

            case "docCommandLine":
                if (_ConsoleInputControl == null)
                {
                    _ConsoleInputControl = new ConsoleInputControl()
                    {
                        MessagesVisible = false
                    };

                    var model = mvvmContext.GetViewModel <ConsoleDocumentViewModel>();

                    _ConsoleInputControl.LoadSyntax(model.Engine?.SyntaxFile);
                    _ConsoleInputControl.ExecuteCommand        += ExecuteCommandHandler;
                    _ConsoleInputControl.ListIntellisenseItems += ScriptEditor_ListIntellisenseItems;
                    _ConsoleInputControl.ShowParseError        += ScriptEditor_ShowParseError;
                }
                e.Control = _ConsoleInputControl;
                break;
            }
        }
 void OnQueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
 {
     e.Control = GetUserControl(e.Document.Caption);
 }
 // Assigning a required content for each auto generated Document
 void widgetView1_QueryControl(object sender, DevExpress.XtraBars.Docking2010.Views.QueryControlEventArgs e)
 {
 }