/// <summary> /// Ice run /// </summary> /// <param name="boxModuleParam">BoxModuleParams</param> /// <param name="localePrefs">localeprefs</param> /// <param name="manager">Manager proxy</param> /// <param name="__current">Ice context</param> public override void run(Ferda.Modules.BoxModulePrx boxModuleParam, string[] localePrefs, ManagersEnginePrx manager, Ice.Current __current) { string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.ExplainTable.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { } Ferda.Modules.Boxes.DataMiningCommon.DataMatrix.DataMatrixFunctionsPrx prx = Ferda.Modules.Boxes.DataMiningCommon.DataMatrix.DataMatrixFunctionsPrxHelper.checkedCast(boxModuleParam.getFunctions()); try { string label = manager.getProjectInformation().getUserLabel(Ice.Util.identityToString(boxModuleParam.ice_getIdentity())); Ferda.FrontEnd.AddIns.ExplainTable.ExplainTable control = new ExplainTable(localePrefs, prx.explain(), prx.getDataMatrixInfo(), ownerOfAddIn); this.ownerOfAddIn.ShowDockableControl(control, resManager.GetString("Explain") + " " + label); } catch (Ferda.Modules.NoConnectionInSocketError) { MessageBox.Show(resManager.GetString("BoxNotConnected"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } catch (Ferda.Modules.BadParamsError ex) { if (ex.restrictionType == Ferda.Modules.restrictionTypeEnum.DbConnectionString) { MessageBox.Show(resManager.GetString("BadConnectionString"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if (ex.restrictionType == Ferda.Modules.restrictionTypeEnum.DbTable) { MessageBox.Show(resManager.GetString("NoDataMatrix"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } }
/// <summary> /// Ice run /// </summary> /// <param name="boxModuleParam"></param> /// <param name="localePrefs"></param> /// <param name="manager"></param> /// <param name="current__"></param> public override void run(Ferda.Modules.BoxModulePrx boxModuleParam, string[] localePrefs, Ferda.ModulesManager.ManagersEnginePrx manager, Ice.Current current__) { string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.ResultBrowser.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { } //getting proxy for task identifier Ice.ObjectPrx prx2 = boxModuleParam.getMyFactory(); Modules.BoxModuleFactoryPrx tprx2 = Modules.BoxModuleFactoryPrxHelper.checkedCast(prx2); //getting proxy for hypotheses and quantifiers Ice.ObjectPrx prx = boxModuleParam.getFunctions(); //manager.getProjectInformation().getUserLabel AbstractLMTaskFunctionsPrx tprx = AbstractLMTaskFunctionsPrxHelper.checkedCast(prx); Ferda.FrontEnd.AddIns.WaitDialog.WaitDialog control = new Ferda.FrontEnd.AddIns.WaitDialog.WaitDialog(localePrefs, tprx, this.ownerOfAddIn); this.ownerOfAddIn.ShowForm(control); }
/// <summary> /// Run method /// </summary> /// <param name="boxModuleParam"></param> /// <param name="localePrefs">Locale prefs</param> /// <param name="manager">Manager proxy</param> /// <param name="__current">Ice context</param> public override void run(Ferda.Modules.BoxModulePrx boxModuleParam, string[] localePrefs, ManagersEnginePrx manager, Ice.Current __current) { string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.ColumnFr.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { } Ferda.Modules.Boxes.DataMiningCommon.Column.ColumnFunctionsPrx prx = Ferda.Modules.Boxes.DataMiningCommon.Column.ColumnFunctionsPrxHelper.checkedCast(boxModuleParam.getFunctions()); Ferda.Modules.Boxes.DataMiningCommon.Attributes.Attribute.AttributeFunctionsPrx prx1 = Ferda.Modules.Boxes.DataMiningCommon.Attributes.Attribute.AttributeFunctionsPrxHelper.checkedCast(boxModuleParam.getFunctions()); try { ColumnInfo columnInfo = prx.getColumnInfo(); string label = manager.getProjectInformation().getUserLabel(Ice.Util.identityToString(boxModuleParam.ice_getIdentity())); Ferda.FrontEnd.AddIns.ColumnFrequency.ColumnFrequency control = new ColumnFrequency(localePrefs, columnInfo, ownerOfAddIn); this.ownerOfAddIn.ShowDockableControl(control, label + " " + resManager.GetString("ColumnFrequency")); } catch (Ferda.Modules.BadParamsError ex) { if (ex.restrictionType == Ferda.Modules.restrictionTypeEnum.DbConnectionString) { MessageBox.Show(resManager.GetString("BadConnectionString"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if (ex.restrictionType == Ferda.Modules.restrictionTypeEnum.DbTable) { MessageBox.Show(resManager.GetString("NoDataMatrix"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if (ex.restrictionType == Ferda.Modules.restrictionTypeEnum.DbColumn) { MessageBox.Show(resManager.GetString("BadColumnSelectExpression"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } //else { MessageBox.Show(resManager.GetString("InvalidParameters"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } catch (Ferda.Modules.NoConnectionInSocketError) { MessageBox.Show(resManager.GetString("BoxNotConnected"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }
public override void run(Ferda.Modules.BoxModulePrx boxModuleParam, string[] localePrefs, Ferda.ModulesManager.ManagersEnginePrx manager, Ice.Current __current) { string locale; try { locale = localePrefs[0]; localizationString = locale; locale = "Ferda.FrontEnd.AddIns.ResultBrowser.Localization_" + locale; resManager = new ResourceManager(locale, Assembly.GetExecutingAssembly()); } catch { } //getting proxy for task identifier Ice.ObjectPrx prx2 = boxModuleParam.getMyFactory(); Modules.BoxModuleFactoryPrx tprx2 = Modules.BoxModuleFactoryPrxHelper.checkedCast(prx2); string taskType = tprx2.getMyFactoryCreator().getIdentifier(); //getting proxy for hypotheses and quantifiers Ice.ObjectPrx prx = boxModuleParam.getFunctions(); Modules.Boxes.LISpMinerTasks.AbstractLMTask.AbstractLMTaskFunctionsPrx tprx = Modules.Boxes.LISpMinerTasks.AbstractLMTask.AbstractLMTaskFunctionsPrxHelper.checkedCast(prx); Modules.HypothesisStruct[] hypotheses = tprx.getResult(); Modules.Boxes.LISpMinerTasks.AbstractLMTask.QuantifierProvider[] used_quantifiers = tprx.getQuantifierProviders(); Ice.ObjectPrx[] prxs = manager.getManagersLocator().findAllObjectsWithType("::Ferda::Statistics::StatisticsProvider"); //get from task box // string taskType = "LISpMinerTasks.FFTask"; string temp = ""; List<Ferda.Statistics.StatisticsProviderPrx> proxies = new List<Ferda.Statistics.StatisticsProviderPrx>(); foreach (Ice.ObjectPrx proxy in prxs) { Ferda.Statistics.StatisticsProviderPrx checkedProxy = Ferda.Statistics.StatisticsProviderPrxHelper.checkedCast(proxy); temp = checkedProxy.getTaskType(); if (temp.CompareTo(taskType) == 0) { proxies.Add(checkedProxy); } } try { FrontEnd.AddIns.ResultBrowser.FerdaResultBrowserControl control = new FrontEnd.AddIns.ResultBrowser.FerdaResultBrowserControl(localePrefs, hypotheses, used_quantifiers, this.Displayer, proxies, taskType, ownerOfAddIn); this.ownerOfAddIn.ShowDockableControl(control, resManager.GetString("ResultBrowserControl")); } catch (Ferda.Modules.NoConnectionInSocketError) { MessageBox.Show(resManager.GetString("BoxNotConnected"), resManager.GetString("Error"), MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }