예제 #1
0
 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();
     });
 }
예제 #5
0
 public void SaveSelectedShapes()
 {
     UIThreadExecutor.Execute(() =>
     {
         Globals.ThisAddIn.Ribbon.AddShapeButtonClick(
             new RibbonControl("AddShapeToShapesLab"));
     });
 }
예제 #6
0
 public void SaveSelectedShapes()
 {
     UIThreadExecutor.Execute(() =>
     {
         FunctionalTestExtensions.GetRibbonUi().OnAction(
             new RibbonControl("AddShape"));
     });
 }
예제 #7
0
 public void SaveSelectedShapes()
 {
     UIThreadExecutor.Execute(() =>
     {
         FunctionalTestExtensions.GetRibbonUi().AddShapeButtonClick(
             new RibbonControl("AddShapeToShapesLab"));
     });
 }
예제 #8
0
 public void OpenPane()
 {
     UIThreadExecutor.Execute(() =>
     {
         Globals.ThisAddIn.Ribbon.ColorPickerButtonClick(
             new RibbonControl("ColorsLab"));
         _pane = Globals.ThisAddIn.GetActivePane(
             typeof(ColorPane)).Control as ColorPane;
     });
 }
예제 #9
0
 public void OpenPane()
 {
     UIThreadExecutor.Execute(() =>
     {
         Globals.ThisAddIn.Ribbon.CustomShapeButtonClick(
             new RibbonControl("ShapesLab"));
         _pane = Globals.ThisAddIn.GetActivePane(
             typeof(CustomShapePane)).Control as CustomShapePane;
     });
 }
예제 #10
0
 public void Sync()
 {
     if (_pane != null)
     {
         UIThreadExecutor.Execute((Action)(() =>
         {
             _pane.ELearningLabMainPanel.syncButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
         }));
     }
 }
예제 #11
0
 public void OpenPane()
 {
     UIThreadExecutor.Execute(() =>
     {
         FunctionalTestExtensions.GetRibbonUi().CustomShapeButtonClick(
             new RibbonControl("ShapesLab"));
         _pane = FunctionalTestExtensions.GetTaskPane(
             typeof(CustomShapePane)).Control as CustomShapePane;
     });
 }
예제 #12
0
 public void Copy()
 {
     if (_pane != null)
     {
         UIThreadExecutor.Execute(() =>
         {
             _pane.SyncPaneWPF1.copyButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
         });
     }
 }
예제 #13
0
 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);
        }
예제 #19
0
 public void OpenPane()
 {
     UIThreadExecutor.Execute(() =>
     {
         FunctionalTestExtensions.GetRibbonUi().OnAction(
             new RibbonControl("ColorsLabButton"));
         _pane = FunctionalTestExtensions.GetTaskPane(
             typeof(ColorPane)).Control as ColorPane;
     });
 }
예제 #20
0
 public void ClickCreateButton()
 {
     if (_pane != null)
     {
         UIThreadExecutor.Execute(() =>
         {
             _pane.TimerPaneWPF.createButton.RaiseEvent(new RoutedEventArgs(ButtonBase.ClickEvent));
         });
     }
 }
예제 #21
0
 public void SetWidthSliderValue(int value)
 {
     if (_pane != null)
     {
         UIThreadExecutor.Execute(() =>
         {
             _pane.TimerPaneWPF.WidthSlider.Value = value;
         });
     }
 }
예제 #22
0
 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);
         }));
     }
 }
예제 #25
0
 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();
 }
예제 #27
0
 public void SetProgressBarCheckBoxState(bool isChecked)
 {
     if (_pane != null)
     {
         UIThreadExecutor.Execute(() =>
         {
             _pane.TimerPaneWPF.ProgressBarCheckBox.IsChecked = isChecked;
             _pane.TimerPaneWPF.ProgressBarCheckBox.Focus();
         });
     }
 }
예제 #28
0
 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;
         });
     }
 }
예제 #29
0
 public static void Init()
 {
     if (_instance == null)
     {
         _instance = new UIThreadExecutor {Visible = false};
         if (!_instance.IsHandleCreated)
         {
             _instance.CreateHandle();
         }
     }
 }
예제 #30
0
 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));
     });
 }