public void PluginSetStatus(Object pPluginObj, Simsang.Plugin.Config.Status pStatus) { if (InvokeRequired) { BeginInvoke(new PluginSetStatusDelegate(PluginSetStatus), new object[] { pPluginObj, pStatus }); return; } // if (InvokeRequired) IPlugin lPlugin = null; TabPage lTabPage = null; try { if (pPluginObj != null) { lPlugin = (IPlugin) pPluginObj; lTabPage = this.FindTabPageInCatalog(lPlugin.Config.PluginName); if (lTabPage != null) { int lNewStatus = (int) pStatus; int lOldStatus = lTabPage.ImageIndex; lNewStatus = (pStatus >= 0) ? (int) pStatus : (int) Simsang.Plugin.Config.Status.NotRunning; lTabPage.ImageIndex = lNewStatus; LogConsole.Main.LogConsole.LogInstance.LogMessage(String.Format(@"{0} : CurrentState:{1}, NewState:{2}", "lPlugin.Config.PluginName", "lOldStatus", "lNewStatus")); } } // if (pPlugin... } catch (Exception lEx) { LogConsole.Main.LogConsole.LogInstance.LogMessage(String.Format("PluginSetStatus() : {0}", lEx.ToString())); } }
/// <summary> /// /// </summary> /// <param name="pPluginObj"></param> /// <param name="pStatus"></param> public void PluginSetStatus(Object pPluginObj, Simsang.Plugin.Config.Status pStatus) { try { if (pPluginObj != null) { IPlugin lPlugin = (IPlugin) pPluginObj; TabPage lTabPage = mSimsangMain.TabPageHandler.FindTabPage(lPlugin.Config.PluginName); if (lTabPage != null) { lTabPage.ImageIndex = (int) pStatus; } } // if (pPlugin... } catch (Exception lEx) { LogConsole.Main.LogConsole.pushMsg(String.Format("PluginSetStatus() : {0}", lEx.ToString())); } }