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


C# Device.ToString方法代码示例

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


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

示例1: ToStringContainsTypeAndName

		public void ToStringContainsTypeAndName()
		{
			var defaultDevice = new Device(EmulatorTestExtensions.CreateDefaultDeviceData());
			var win8Device = new Device(EmulatorTestExtensions.CreateWindows8DeviceData());
			Assert.AreEqual("Default", defaultDevice.ToString());
			Assert.AreEqual("Windows - Windows 8 1080p", win8Device.ToString());
		}
开发者ID:whztt07,项目名称:DeltaEngine,代码行数:7,代码来源:DeviceTests.cs

示例2: account_update_delivery_device

        public static async Task<Response<Settings>> account_update_delivery_device(this Api api, Device device, bool include_entities = false)
        {
            var uri = "https://api.twitter.com/1.1/account/update_delivery_device.json";
            var parameters = new Dictionary<string, object>();

            parameters.Add("device", device.ToString().ToLower());
            if (include_entities) parameters.Add("include_entities", include_entities);

            // TODO: find out is there is a json response for "account_update_delivery_device"
            return await api.SendAsync<Settings>(HttpMethod.Post, uri, parameters);
        }
开发者ID:dotnetnoobie,项目名称:DnxTweet,代码行数:11,代码来源:Account.cs

示例3: 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

示例4: RobotController

        public RobotController(LeapListener leapListener, Device device)
        {
            Console.WriteLine(device.ToString());
            _leapListener = leapListener;

            switch (device)
            {
                case Device.Platform:
                    deviceController = new PlatformController();
                    break;
                case Device.ArmBigger:
                    deviceController = new ArmBiggerController();
                    break;
                case Device.ArmSmaller:
                    deviceController = new ArmSmallerController();
                    break;
            }
            _controlThread = new Thread(controlRobot);
            _controlThread.Start();
        }
开发者ID:tbarczyk,项目名称:Lipmon,代码行数:20,代码来源:RobotController.cs

示例5: addEquipedDevice

	public void addEquipedDevice(Device device) {
		Logger.Log("addEquipedDevice("+device.ToString()+")", Logger.Level.TRACE);
    if(device == null)
    {
      Logger.Log ("DevicesDisplayer::addEquipedDevice device == null", Logger.Level.WARN);
    }
		bool newEquiped = (!_equipedDevices.Exists(equiped => equiped._device == device)); 
		if(newEquiped) { 
			Vector3 localPosition = getNewPosition(DeviceType.Equiped);
			UnityEngine.Transform parent = equipPanel.transform;

			DisplayedDevice newDevice = 
				EquipedDisplayedDevice.Create(
          parent,
          localPosition,
          null,
          device,
          this,
          DevicesDisplayer.DeviceType.Equiped
        );
			_equipedDevices.Add(newDevice);

      graphMoleculeList.addDeviceAndMoleculesComponent(newDevice);

		} else {
			Logger.Log("addDevice failed: alreadyEquiped="+newEquiped, Logger.Level.TRACE);
		}
	}
开发者ID:CyberCRI,项目名称:Hero.Coli,代码行数:28,代码来源:DevicesDisplayer.cs

示例6: RegisterDevice

 public void RegisterDevice(Device dev)
 {
     devicesList.Add(dev);
     dev.evDeviceStateHasChanged += dev_evDeviceStateHasChanged;
     Logger.Log(this, String.Format("Device has been registred: {0}", dev.ToString()), 1);
 }
开发者ID:Spawek,项目名称:valeo,代码行数:6,代码来源:DeviceManager.cs

示例7: DisplayObjectToString

 public void DisplayObjectToString(Device obj)
 {
     if (obj is Lamp)
         Console.WriteLine(obj.ToString());
     if (obj is Conditioner)
         Console.WriteLine(obj.ToString());
     if (obj is HeatingBoiler)
         Console.WriteLine(obj.ToString());
     if (obj is Stove)
         Console.WriteLine(((Stove)obj).ToString());
     if (obj is KitchenVentilation)
         Console.WriteLine(obj.ToString());
 }
开发者ID:mbanulis,项目名称:OracleAcademy,代码行数:13,代码来源:Menu.cs

示例8: GetDeviceString

        private string GetDeviceString(Device device, int iAddress)
        {
            string sDevice;

            if (device == Device.B || device == Device.W || device == Device.X || device == Device.Y)
                sDevice = "[" + device.ToString() + " " + iAddress.ToString("X6") + "]";
            else
                sDevice = "[" + device.ToString() + " " + iAddress.ToString("d6") + "]";

            return sDevice;
        }
开发者ID:kentwen,项目名称:L8B,代码行数:11,代码来源:CPLCLog.cs


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