Esempio n. 1
0
 public void Invoke(object sender, IQuickWindow quickWindow)
 {
     try
     {
         m_method.Invoke(sender, quickWindow);
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin method", m_method.GetName(), "invoking: Invoke() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
     }
 }
Esempio n. 2
0
 public void PageDown(IQuickWindow quickWindow)
 {
     try
     {
         m_method.PageDown(quickWindow);
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin method", m_method.GetName(), "invoking: PageDown() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
     }
 }
Esempio n. 3
0
 public void TextChanged(IQuickWindow quickWindow, System.Windows.Controls.TextChangedEventArgs e)
 {
     try
     {
         m_method.TextChanged(quickWindow, e);
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin method", m_method.GetName(), "invoking: TextChanged() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
     }
 }
Esempio n. 4
0
 public void KeyDown(IQuickWindow quickWindow, System.Windows.Input.KeyEventArgs e)
 {
     try
     {
         m_method.KeyDown(quickWindow, e);
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin method", m_method.GetName(), "invoking: KeyDown() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
     }
 }
Esempio n. 5
0
 public bool AcceptArgs()
 {
     try
     {
         return(m_method.AcceptArgs());
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin method", m_method.GetName(), "invoking: AcceptArgs() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
         return(false);
     }
 }
Esempio n. 6
0
 public string AvailableApplicationName()
 {
     try
     {
         return(m_method.AvailableApplicationName());
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin method", m_method.GetName(), "invoking: AvailableApplicationName() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
         return(null);
     }
 }
Esempio n. 7
0
 public string GetDescription(IQuickWindow quickWindow)
 {
     try
     {
         return(m_method.GetDescription(quickWindow));
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin method", m_method.GetName(), "invoking: GetName() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
         return(null);
     }
 }
Esempio n. 8
0
 public IQuickPluginMethod[] GetMethods()
 {
     try
     {
         return(m_plugin.GetMethods());
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin", "plugin load error", "invoking: GetMethods() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
         return(null);
     }
 }
Esempio n. 9
0
 public bool GetIcon(IQuickWindow quickWindow, out System.Windows.Media.ImageSource icon)
 {
     try
     {
         return(m_method.GetIcon(quickWindow, out icon));
     }
     catch (Exception ex)
     {
         QuickVitality.UpdateVitality("error in plugin method", m_method.GetName(), "invoking: GetIcon() and caused " + ex.Message + Environment.NewLine + ex.StackTrace);
         icon = null;
         return(false);
     }
 }
Esempio n. 10
0
 private void ContextHotkey_OnHotkey(int HotKeyID)
 {
     try
     {
         object obj = GetActiveObject(false);
         if (QuickConfig.ThisConfig.ContextMenuToogle)
         {
             var textObject = QuickReflection.Invoke(m_currentModel.Search, obj);
             if (textObject != null)
             {
                 m_quickContextWindow.Show(textObject.ToString());
                 QuickVitality.UpdateVitality("context", m_currentModel.ProgramName, textObject.ToString());
             }
         }
     }
     catch { }
 }
Esempio n. 11
0
 private void TriggerQuickMainWindow(bool isGlobal)
 {
     if (m_quickMainWindow != null && m_quickMainWindow.IsVisible)
     {
         m_quickMainWindow.Close(); //如果窗体已存在并在显示状态,则触发FormClosing,Hide()
         if (!isGlobal)
         {
             // 非公共窗口,再次触发快捷键会打开Global的window
             Trigger(true);
         }
         return;
     }
     else
     {
         if (m_currentModel.MethodList.Count > 0)
         {
             QuickVitality.UpdateVitality("showlist", m_currentModel.ProgramName, "");
             m_quickMainWindow.Show();
             m_quickMainWindow.Activate();
         }
     }
 }