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


C# Device.getInternalName方法代码示例

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


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

示例1: addToReactionEngine

  private void addToReactionEngine(Device device) {
    Logger.Log("Equipment::addToReactionEngine reactions from device "+device.getInternalName()+" ("+device.ToString ()+")", Logger.Level.TRACE);

    LinkedList<IReaction> reactions = device.getReactions();
    Logger.Log("Equipment::addToReactionEngine reactions="+Logger.ToString<IReaction>(reactions)+" from "+device, Logger.Level.INFO);

    foreach (IReaction reaction in reactions) {
      Logger.Log("Equipment::addToReactionEngine adding reaction="+reaction, Logger.Level.TRACE);
      _reactionEngine.addReactionToMedium(_celliaMediumID, reaction);
    }
  }
开发者ID:CyberCRI,项目名称:Hero.Coli,代码行数:11,代码来源:Equipment.cs

示例2: askAddDevice

    public override AddingResult askAddDevice(Device device, bool reportToRedMetrics = false)
    {
        Logger.Log("Inventory::askAddDevice", Logger.Level.TRACE);
        AddingResult addingResult = canAddDevice(device);
        if (addingResult == AddingResult.SUCCESS)
        {
            Logger.Log("Inventory::askAddDevice: AddingResult.SUCCESS, will add device=" + device, Logger.Level.INFO);
            addDevice(device);

            if (reportToRedMetrics)
            {
                RedMetricsManager.get().sendEvent(TrackingEvent.CRAFT, new CustomData(CustomDataTag.DEVICE, device.getInternalName()));
            }

            //uncomment to save user-created devices
            //TODO FIXME uncommenting this entails bugs on loading devices from _saveFilePath
            //DeviceSaver dSaver = new DeviceSaver();
            //dSaver.saveDevicesToFile(_devices, _saveFilePathWrite);
        }
        else
        {
            Logger.Log("Inventory::askAddDevice: " + addingResult + ", didn't add device=" + device, Logger.Level.INFO);
        }
        return addingResult;
    }
开发者ID:CyberCRI,项目名称:Hero.Coli,代码行数:25,代码来源:Inventory.cs

示例3: buildDevice

   //copy factory
 public static Device buildDevice(Device device)
 {
   if (device == null)
   {
     Logger.Log("Device::buildDevice device == null", Logger.Level.WARN);
     return null;
   }
   return buildDevice(device.getInternalName(), device._modules);
 }
开发者ID:CyberCRI,项目名称:Hero.Coli,代码行数:10,代码来源:Device.cs

示例4: displayTooltip

 public static bool displayTooltip(bool isOver, Device device, Vector3 pos)
 {
   string code = (null == device)?null:_devicePrefix+device.getInternalName();
   return displayTooltip(isOver, code, pos);
 }
开发者ID:CyberCRI,项目名称:Hero.Coli,代码行数:5,代码来源:TooltipManager.cs


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