Exemplo n.º 1
0
 private void openQuandlSettings_Click(object sender, RibbonControlEventArgs e)
 {
     if (_settingsPane == null)
     {
         _settingsPane = new TaskPaneControl(new Settings(), "Settings");
     }
     _settingsPane.Show(400, 600);
 }
Exemplo n.º 2
0
        public RuleListController(TaskPaneControl taskPaneControl, Range selection)
        {
            this.taskPaneControl = taskPaneControl;
            this.taskPaneControl.RulesStack.AddClicked   += OnStackAddClicked;
            this.taskPaneControl.RulesStack.ChildRemoved += OnStackChildRemoved;
            this.selection = selection;

            updateTaskPaneControlFromFormula();
        }
Exemplo n.º 3
0
 private void udfBuilder_Click(object sender, RibbonControlEventArgs e)
 {
     if (_builderPane == null)
     {
         _builderPane = new TaskPaneControl(_guideChild, "Quandl Formula Builder");
     }
     _guideChild.Reset();
     _guideChild.Background = Brushes.White;
     _guideChild.Margin     = new Thickness(0);
     _guideChild.Padding    = new Thickness(0);
     _builderPane.Show();
 }
Exemplo n.º 4
0
        public void ButtonTaskPane_OnClick(IRibbonControl control, bool pressed)
        {
            if (_taskPaneControl == null)
            {
                _taskPaneControl = CreateCustomTaskPane();
            }

            if (_taskPaneControl != null)
            {
                _taskPaneControl.Visible = pressed;
            }
        }
Exemplo n.º 5
0
        /**
         * The structure of the task pane will be as folows:
         *    CustomTaskPane taskPane (created and added in ThisAddIn.createTaskPane())
         *      UserControl winFormsProxyUserControl (created and added in ThisAddIn.createTaskPane() on taskPane creation)
         *        ElementHost wpfControlHost (created and added here to winFormsProxyUserControl.Controls)
         *          TaskPaneControl taskPaneControl (created and added here as wpfControlHost.Child)
         */
        private void initTaskPane(CustomTaskPane taskPane)
        {
            // create taskPaneControl
            this.taskPaneControl = new TaskPaneControl();
            // create wpfControlHost and add taskPaneControl
            ElementHost wpfControlHost = new ElementHost();

            wpfControlHost.Dock  = System.Windows.Forms.DockStyle.Fill;
            wpfControlHost.Child = taskPaneControl;
            // add wpfControlHost to winFormsProxyUserControl
            taskPane.Control.Controls.Add(wpfControlHost);
            // set taskPane visibility handler
            taskPane.VisibleChanged += onTaskPaneVisibilityChanged;
        }
Exemplo n.º 6
0
        //---
        public override void OnConnect()
        {
            //--- CommandGroup
            this.CommandManager.AddCommandGroup <Commands_e>().CommandClick += OnButtonClick;
            //---
            //--- DocHandler
            Application.Documents.RegisterHandler <MyDocumentHandler>();
            //---
            //--- TaskPane
            var taskPane = this.CreateTaskPane <TaskPaneControl, TaskPaneCommands_e>();

            taskPane.ButtonClick += OnTaskPaneCommandClick;
            TaskPaneControl ctrl = taskPane.Control;

            //---
            //--- 3rdParty
            Application.Documents.Active.StreamWriteAvailable += OnWriteToStream;
            //---
        }