public void OpenPane() { UIThreadExecutor.Execute((Action)(() => { FunctionalTestExtensions.GetRibbonUi().OnAction( new RibbonControl(ELearningLabText.ELearningTaskPaneTag)); _pane = FunctionalTestExtensions.GetTaskPane( typeof(ELearningLabTaskpane)).Control as ELearningLabTaskpane; })); }
private void ELearningTaskPaneVisibleValueChangedEventHandler(object sender, EventArgs e) { CustomTaskPane eLearningTaskpane = this.GetTaskPane(typeof(ELearningLabTaskpane)); if (eLearningTaskpane == null) { return; } ELearningLabTaskpane taskpane = eLearningTaskpane.Control as ELearningLabTaskpane; if (eLearningTaskpane.Visible) { taskpane.ELearningLabMainPanel.ReloadELearningLabOnSlideSelectionChanged(); } else { taskpane.ELearningLabMainPanel.SyncElearningLabOnSlideSelectionChanged(); } }
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { bool isDummyItem, isTriggerTypeEnabled; int triggerType, clickNum; try { isDummyItem = (bool)values[0]; isTriggerTypeEnabled = (bool)values[1]; triggerType = (int)values[2]; clickNum = (int)values[3]; } catch (Exception e) { Logger.Log("Invalid Cast Exception" + e.Message); return(null); } CustomTaskPane eLearningTaskpane = Globals.ThisAddIn.GetActivePane(typeof(ELearningLabTaskpane)); if (eLearningTaskpane == null) { return(null); } ELearningLabTaskpane taskpane = eLearningTaskpane.Control as ELearningLabTaskpane; if (isDummyItem) { return(new SolidColorBrush(Colors.Gray)); } else if (isTriggerTypeEnabled && triggerType == (int)TriggerType.WithPrevious && !taskpane.ELearningLabMainPanel.IsFirstItemSelfExplanation && clickNum == 0) { return(new SolidColorBrush(Colors.Transparent)); } else if (isTriggerTypeEnabled && triggerType == (int)TriggerType.WithPrevious && clickNum > 0) { return(new SolidColorBrush(Colors.Transparent)); } else { return(new SolidColorBrush(Colors.Black)); } }
public static void ShowSettingsDialog() { CustomTaskPane eLearningTaskpane = ActionFrameworkExtensions.GetTaskPane(typeof(ELearningLabTaskpane)); AudioSettingsDialogWindow dialog = new AudioSettingsDialogWindow(AudioSettingsPage.MainSettingsPage); AudioMainSettingsPage page = dialog.MainPage as AudioMainSettingsPage; page.SetAudioMainSettings( selectedVoiceType, selectedVoice, IsPreviewEnabled); page.DialogConfirmedHandler += OnSettingsDialogConfirmed; if (eLearningTaskpane == null) { dialog.ShowDialog(); return; } ELearningLabTaskpane taskpane = eLearningTaskpane.Control as ELearningLabTaskpane; page.DefaultVoiceChangedHandler += taskpane.ELearningLabMainPanel.RefreshVoiceLabelOnAudioSettingChanged; page.IsDefaultVoiceChangedHandlerAssigned = true; dialog.ShowDialog(); }