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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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); } }
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 { } }
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(); } } }