private async Task OnSMStarted(object sender, SMProcessArgs eventArgs) { await Application.Current.Dispatcher.InvokeAsync(() => { TbIcon.ToolTipText = $"SuperMemoAssistant - {SMA.Core.SM.Collection.Name}"; TbIcon.Visibility = Visibility.Visible; }); }
private void OnSMStopped(object sender, SMProcessArgs e) { //CleanupUI(); //if (Window != null) // OnWindowClosed(Window, // UIAuto.EventLibrary.Window.WindowClosedEvent); }
private async Task OnSMStartedEvent(object sender, SMProcessArgs e) { LogTo.Debug($"Initializing {GetType().Name}"); await Task.Run(() => { ElementWdwPtr = SMProcess[SM17Natives.TElWind.InstancePtr]; ElementWdwPtr.RegisterValueChangedEventHandler <int>(OnWindowCreated); }); }
private void OnSMStoppedEvent(object sender, SMProcessArgs e) { ElementIdPtr.Dispose(); ElementWdwPtr = null; ElementIdPtr = null; CurrentConceptIdPtr = null; CurrentRootIdPtr = null; CurrentHookIdPtr = null; }
private async Task OnSMStarted(object sender, SMProcessArgs e) { LogTo.Debug($"Initializing {GetType().Name}"); DirectoryEx.EnsureExists(SMAFileSystem.PluginPackageDir.FullPath); StartIpcServer(); //StartMonitoringPlugins(); await RefreshPlugins(); await StartPlugins(); }
private void OnSMStoppedEvent(object sender, SMProcessArgs e) { try { LogTo.Debug($"Cleaning up {GetType().Name}"); Dispatcher.Invoke(Shutdown); } finally { LogTo.Debug($"Cleaning up {GetType().Name}... Done"); } }
private Task OnSMStoppedEvent(object sender, SMProcessArgs e) { LogTo.Debug($"Cleaning up {GetType().Name}"); ElementIdPtr?.Dispose(); ElementWdwPtr = null; ElementIdPtr = null; CurrentConceptIdPtr = null; CurrentRootIdPtr = null; CurrentHookIdPtr = null; return(TaskConstants.Completed); }
private void OnSMStoppedEvent(object sender, SMProcessArgs e) { LogTo.Debug($"Cleaning up {GetType().Name}"); ElementIdPtr?.Dispose(); SMMainWdwPtr = null; ElementWdwPtr = null; ElementIdPtr = null; CurrentConceptIdPtr = null; CurrentConceptGroupIdPtr = null; CurrentRootIdPtr = null; CurrentHookIdPtr = null; LearningModePtr = null; LogTo.Debug($"Cleaning up {GetType().Name}... Done"); }
private Task Instance_OnSMStoppedEvent(object sender, SMProcessArgs e) { return(Dispatcher.InvokeAsync(Shutdown).Task); }
//public AutomationElementRef AutomationElement => new AutomationElementRef(Window); #endregion #region Methods private void OnSMStarted(object sender, SMProcessArgs e) { SMProcess = e.Process; //SetupUI(); }
private void OnSMStopped(object sender, SMProcessArgs e) { base.Cleanup(); }
private Task OnSMStartedEvent(object sender, SMProcessArgs eventArgs) { SMA.Core.SM.UI.ElementWdw.OnAvailable += ElementWdw_OnAvailable; return(Task.CompletedTask); }
private void OnSMStartedEvent(object sender, SMProcessArgs e) { ElementWdwPtr = SMProcess[SMNatives.TElWind.InstancePtr]; ElementWdwPtr.RegisterValueChangedEventHandler <int>(OnWindowCreated); }
private void OnSMStarted(object sender, SMProcessArgs e) { LoadPlugins(); }
private void OnSMStopped(object sender, SMProcessArgs e) { UnloadPlugins(); }