当前位置: 首页>>代码示例>>C#>>正文


C# Ferda.getMyFactory方法代码示例

本文整理汇总了C#中Ferda.getMyFactory方法的典型用法代码示例。如果您正苦于以下问题:C# Ferda.getMyFactory方法的具体用法?C# Ferda.getMyFactory怎么用?C# Ferda.getMyFactory使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ferda的用法示例。


在下文中一共展示了Ferda.getMyFactory方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: run

        /// <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);
        }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:36,代码来源:WaitDialogIce.cs

示例2: run

        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);
            }
        }
开发者ID:BackupTheBerlios,项目名称:ferdadataminer-svn,代码行数:64,代码来源:ResultBrowserIce.cs


注:本文中的Ferda.getMyFactory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。