示例#1
0
 private async Task OnSMStartedAsync(object sender,
                                     SMProcessEventArgs eventArgs)
 {
     await Application.Current.Dispatcher.InvokeAsync(() =>
     {
         TbIcon.SetCurrentValue(TaskbarIcon.ToolTipTextProperty, $"SuperMemoAssistant - {SMA.Core.SM.Collection.Name}");
         TbIcon.SetCurrentValue(UIElement.VisibilityProperty, Visibility.Visible);
     });
 }
示例#2
0
        private void OnSMStoppedEvent(object sender, SMProcessEventArgs e)
        {
            try
            {
                LogTo.Debug("Cleaning up {Name}", GetType().Name);

                Dispatcher.Invoke(Shutdown);
            }
            finally
            {
                LogTo.Debug("Cleaning up {Name}... Done", GetType().Name);
            }
        }
示例#3
0
 private void OnSMStopped(object sender, SMProcessEventArgs e)
 {
     base.Cleanup();
 }
示例#4
0
 private void OnSMStoppedEvent(object sender,
                               SMProcessEventArgs e)
 {
     Dispose();
 }