public void AddSelfExplanationItem() { if (_pane != null) { UIThreadExecutor.Execute((Action)(() => { _pane.ELearningLabMainPanel.createButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); ExplanationItem item1 = _pane.ELearningLabMainPanel.listView.Items .OfType <ClickItem>().Last() as ExplanationItem; item1.CaptionText = "Test self explanation item 1"; item1.IsCaption = true; _pane.ELearningLabMainPanel.createButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); ExplanationItem item2 = _pane.ELearningLabMainPanel.listView.Items .OfType <ClickItem>().Last() as ExplanationItem; item2.CaptionText = "Test self explanation item 2"; item2.CalloutText = "This is a shorter callout for self explanation item 2"; item2.IsCaption = true; item2.IsCallout = true; _pane.ELearningLabMainPanel.createButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); ExplanationItem item3 = _pane.ELearningLabMainPanel.listView.Items .OfType <ClickItem>().Last() as ExplanationItem; item3.CaptionText = "Test self explanation item 3"; item3.IsCaption = true; item3.IsCallout = true; })); } }
public void ClickTetradicRect(int index) { System.Windows.Shapes.Rectangle rect; switch (index) { case 1: rect = _pane.ColorsLabPaneWPF1.tetradicOneRectangle; break; case 2: rect = _pane.ColorsLabPaneWPF1.tetradicTwoRectangle; break; case 3: rect = _pane.ColorsLabPaneWPF1.tetradicThreeRectangle; break; case 4: rect = _pane.ColorsLabPaneWPF1.tetradicFourRectangle; break; default: rect = null; break; } if (_pane != null && rect != null) { UIThreadExecutor.Execute((Action)(() => { LeftClickOnRectangle(rect); })); } }
public void ClickTriadicRect(int index) { System.Windows.Shapes.Rectangle rect; switch (index) { case 1: rect = _pane.ColorsLabPaneWPF1.triadicLowerRectangle; break; case 2: rect = _pane.ColorsLabPaneWPF1.triadicMiddleRectangle; break; case 3: rect = _pane.ColorsLabPaneWPF1.triadicHigherRectangle; break; default: rect = null; break; } if (_pane != null && rect != null) { UIThreadExecutor.Execute((Action)(() => { LeftClickOnRectangle(rect); })); } }
public void SaveSelectedShapes() { UIThreadExecutor.Execute(() => { _pane?.SaveSelectedShapes(); }); }
public void SaveSelectedShapes() { UIThreadExecutor.Execute(() => { Globals.ThisAddIn.Ribbon.AddShapeButtonClick( new RibbonControl("AddShapeToShapesLab")); }); }
public void SaveSelectedShapes() { UIThreadExecutor.Execute(() => { FunctionalTestExtensions.GetRibbonUi().OnAction( new RibbonControl("AddShape")); }); }
public void SaveSelectedShapes() { UIThreadExecutor.Execute(() => { FunctionalTestExtensions.GetRibbonUi().AddShapeButtonClick( new RibbonControl("AddShapeToShapesLab")); }); }
public void OpenPane() { UIThreadExecutor.Execute(() => { Globals.ThisAddIn.Ribbon.ColorPickerButtonClick( new RibbonControl("ColorsLab")); _pane = Globals.ThisAddIn.GetActivePane( typeof(ColorPane)).Control as ColorPane; }); }
public void OpenPane() { UIThreadExecutor.Execute(() => { Globals.ThisAddIn.Ribbon.CustomShapeButtonClick( new RibbonControl("ShapesLab")); _pane = Globals.ThisAddIn.GetActivePane( typeof(CustomShapePane)).Control as CustomShapePane; }); }
public void Sync() { if (_pane != null) { UIThreadExecutor.Execute((Action)(() => { _pane.ELearningLabMainPanel.syncButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); })); } }
public void OpenPane() { UIThreadExecutor.Execute(() => { FunctionalTestExtensions.GetRibbonUi().CustomShapeButtonClick( new RibbonControl("ShapesLab")); _pane = FunctionalTestExtensions.GetTaskPane( typeof(CustomShapePane)).Control as CustomShapePane; }); }
public void Copy() { if (_pane != null) { UIThreadExecutor.Execute(() => { _pane.SyncPaneWPF1.copyButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); }); } }
public void DialogClickOk() { if (_pane != null && _pane.SyncPaneWPF1.Dialog != null) { UIThreadExecutor.Execute(() => { _pane.SyncPaneWPF1.Dialog.okButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); }); } }
public void SlideBrightnessSlider(int value) { if (_pane != null) { UIThreadExecutor.Execute((Action)(() => { _pane.ColorsLabPaneWPF1.brightnessSlider.Value = value; })); } }
public void SlideSaturationSlider(int value) { if (_pane != null) { UIThreadExecutor.Execute((Action)(() => { _pane.ColorsLabPaneWPF1.saturationSlider.Value = value; })); } }
public void ToggleDuplicateAndRotateButton() { if (_pane != null) { UIThreadExecutor.Execute(() => { _pane.positionsPaneWPF.duplicateRotationButton.IsChecked = !_pane.positionsPaneWPF.duplicateRotationButton.IsChecked; }); } }
public void ClearRecentColors() { if (_pane != null) { UIThreadExecutor.Execute((Action)(() => { _pane.ColorsLabPaneWPF1.EmptyRecentColorsPanel(); })); } }
public bool GetCopyButtonEnabledStatus() { bool result = false; UIThreadExecutor.Execute(() => { result = _pane.SyncPaneWPF1.GetCopyButtonEnabledStatus(); }); return(result); }
public void OpenPane() { UIThreadExecutor.Execute(() => { FunctionalTestExtensions.GetRibbonUi().OnAction( new RibbonControl("ColorsLabButton")); _pane = FunctionalTestExtensions.GetTaskPane( typeof(ColorPane)).Control as ColorPane; }); }
public void ClickCreateButton() { if (_pane != null) { UIThreadExecutor.Execute(() => { _pane.TimerPaneWPF.createButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); }); } }
public void SetWidthSliderValue(int value) { if (_pane != null) { UIThreadExecutor.Execute(() => { _pane.TimerPaneWPF.WidthSlider.Value = value; }); } }
public void OpenPane() { UIThreadExecutor.Execute((Action)(() => { FunctionalTestExtensions.GetRibbonUi().OnAction( new RibbonControl(TimerLabText.PaneTag)); _pane = FunctionalTestExtensions.GetTaskPane( typeof(TimerPane)).Control as TimerPane; })); }
public void ClearFavoriteColors() { if (_pane != null) { UIThreadExecutor.Execute((Action)(() => { _pane.ColorsLabPaneWPF1.clearColorButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); })); } }
public void LoadFavoriteColors(string filePath) { if (_pane != null) { UIThreadExecutor.Execute((Action)(() => { _pane.ColorsLabPaneWPF1.LoadFavoriteColorsFromPath(filePath); })); } }
public void Sync(int index) { if (_pane != null) { UIThreadExecutor.Execute(() => { ((SyncFormatPaneItem)_pane.SyncPaneWPF1.formatListBox.Items[index]) .pasteButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); }); } }
public void OpenPane() { UIThreadExecutor.Execute(() => { FunctionalTestExtensions.GetRibbonUi().OnAction( new RibbonControl(ShapesLabText.PaneTag)); _pane = FunctionalTestExtensions.GetTaskPane( typeof(CustomShapePane)).Control as CustomShapePane; }); _pane?.InitCustomShapePaneStorage(); }
public void SetProgressBarCheckBoxState(bool isChecked) { if (_pane != null) { UIThreadExecutor.Execute(() => { _pane.TimerPaneWPF.ProgressBarCheckBox.IsChecked = isChecked; _pane.TimerPaneWPF.ProgressBarCheckBox.Focus(); }); } }
public void DialogSelectItem(int categoryIndex, int itemIndex) { if (_pane != null && _pane.SyncPaneWPF1.Dialog != null) { UIThreadExecutor.Execute(() => { ((_pane.SyncPaneWPF1.Dialog.treeView.Items[categoryIndex] as TreeViewItem) .Items[itemIndex] as SyncFormatDialogItem).IsChecked = true; }); } }
public static void Init() { if (_instance == null) { _instance = new UIThreadExecutor {Visible = false}; if (!_instance.IsHandleCreated) { _instance.CreateHandle(); } } }
public void ClickAddShapeButton() { if (_pane != null && _pane.GetAddShapeButton() != null) { // Perform clicking of button on its own UI thread UIThreadExecutor.Execute(() => { _pane.GetAddShapeButton().PerformClick(); }); } }
public void ClickAddShapeButton() { if (_pane == null || _pane.GetAddShapeButton() == null) { return; } // Perform clicking of button on its own UI thread UIThreadExecutor.Execute(() => { _pane.GetAddShapeButton().RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent)); }); }