本文整理汇总了C#中IO.Contains方法的典型用法代码示例。如果您正苦于以下问题:C# IO.Contains方法的具体用法?C# IO.Contains怎么用?C# IO.Contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IO
的用法示例。
在下文中一共展示了IO.Contains方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadAll
public override void LoadAll(IO.ComponentData Compound)
{
base.LoadAll(Compound);
var o = Compound.GetVector2("OrigPos");
if (o.X == -1 && o.Y == -1)
origPos = null;
else
origPos = o;
PushedPositions.Clear();
int i = 0;
while (true)
{
if (Compound.Contains("Component" + i.ToString()))
{
if (Compound.GetString("Component" + i.ToString()) == "list")
{
int j = 0;
List<Vector2> p = new List<Vector2>();
while (true)
{
if (Compound.Contains("Component" + i.ToString() + j.ToString()))
{
p.Add(Compound.GetVector2("Component" + i.ToString() + j.ToString()));
}
else
{
break;
}
j++;
}
PushedPositions.Add(p);
}
else
{
PushedPositions.Add(Compound.GetVector2("Component" + i.ToString()));
}
}
else
{
break;
}
i++;
}
i = 0;
contains.Clear();
while (true)
{
if (Compound.Contains("Contains" + i.ToString()))
{
contains.Add(Compound.GetInt("Contains" + i.ToString()));
}
else
{
break;
}
i++;
}
if (origPos != null)
ignoreNextPosSave = true;
}
示例2: LoadAll
public override void LoadAll(IO.ComponentData Compound)
{
base.LoadAll(Compound);
j0 = Compound.GetInt("J0");
j1 = Compound.GetInt("J1");
j2 = Compound.GetInt("J2");
j3 = Compound.GetInt("J3");
w1 = Compound.GetInt("W1");
w2 = Compound.GetInt("W2");
w3 = Compound.GetInt("W3");
if (Compound.Contains("Capacitance"))
{
(Logics as Logics.CapacitorLogics).Capacitance = Compound.GetDouble("Capacitance");
(Logics as Logics.CapacitorLogics).MaxOutputVoltage = Compound.GetDouble("MaxVoltage");
}
}
示例3: LoadAll
public override void LoadAll(IO.ComponentData Compound)
{
base.LoadAll(Compound);
if (ID == 45)
{
}
j1 = Compound.GetInt("J1");
j2 = Compound.GetInt("J2");
Resistance = Compound.GetDouble("Resistance");
IsConnected = Compound.GetBool("IsConnected");
direction = (WireDirection)Compound.GetInt("Direction");
if (Compound.Contains("SendingVoltage"))
{
sendingVoltage = Compound.GetDouble("SendingVoltage");
sendingCurrent = Compound.GetDouble("SendingCurrent");
CanSendVoltageOrCurrent = Compound.GetBool("CanSendVoltage");
}
dp = Compound.GetString("DrawPath");
}