本文整理汇总了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());
}
示例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);
}
示例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);
}
}
示例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();
}
示例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);
}
}
示例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);
}
示例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());
}
示例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;
}