本文整理汇总了C#中IO.Add方法的典型用法代码示例。如果您正苦于以下问题:C# IO.Add方法的具体用法?C# IO.Add怎么用?C# IO.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IO
的用法示例。
在下文中一共展示了IO.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SaveAll
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("W", W.ID);
Compound.Add("Min", (Logics as Logics.VoltageGraphLogics).min);
Compound.Add("Max", (Logics as Logics.VoltageGraphLogics).max);
Compound.Add("Frequency", (Logics as Logics.VoltageGraphLogics).frequency);
}
示例2: SaveAll
//=============================================================ID==============================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
String s = "";
for (int i = 0; i < ConnectedWires.Count; i++)
{
s += ConnectedWires[i].ID + ";";
}
if (s.Length > 0)
s = s.Substring(0, s.Length - 1);
Compound.Add("ConnectedWires", s);
Compound.Add("CanGround", CanBeGround);
Compound.Add("CanPower", CanProvidePower);
Compound.Add("IsGround", isGround);
Compound.Add("IsPower", isProvidingPower);
Compound.Add("SendingVoltage", SendingVoltage);
Compound.Add("SendingCurrent", SendingCurrent);
/*
s = "";
for (int i = 0; i < ContainingComponents.Count; i++)
{
s += ContainingComponents[i].ID.ToString() + ";";
}
if (s.Length > 0)
s = s.Substring(0, s.Length - 1);
Compound.Add("ContainingComponents", s);//*/
}
示例3: SaveAll
/// <summary>
/// Called when a scheme is being saved
/// </summary>
/// <param name="Compound">Use this to save data</param>
public virtual void SaveAll(IO.ComponentData Compound)
{
Compound.SetType(GetType());
Compound.Add("ID", ID);
Compound.Add("Position", Graphics.Position);
Compound.Add("Size", Graphics.Size);
Compound.Add("Visible", Graphics.Visible);
Compound.Add("Rotation", rotation.GetHashCode());
Compound.Add("Removable", isRemovable);
}
示例4: SaveAll
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
for (int i = 0; i < Joints.Length; i++)
{
Compound.Add("J" + i.ToString(), Joints[i].ID);
}
for (int i = 0; i < Wires.Length; i++)
{
Compound.Add("W" + i.ToString(), Wires[i].ID);
}
Compound.Add("Left", connectedLeft);
Compound.Add("Up", connectedUp);
Compound.Add("Right", connectedRight);
Compound.Add("Down", connectedDown);
Compound.Add("LeftUp", leftUp);
Compound.Add("LeftRight", leftRight);
Compound.Add("LeftDown", leftDown);
Compound.Add("UpRight", upRight);
Compound.Add("UpDown", upDown);
Compound.Add("RightDown", RightDown);
Compound.Add("PortLeft", left.GetHashCode());
Compound.Add("PortUp", up.GetHashCode());
Compound.Add("PortRight", right.GetHashCode());
Compound.Add("PortDown", down.GetHashCode());
}
示例5: SaveAll
//============================================================LOGICS========================================================
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("W", W.ID);
Compound.Add("Resistance", Resistance);
if (connectedComponent == null)
{
Compound.Add("ConComp", -1);
Compound.Add("Connector", -1);
}
else
{
Compound.Add("ConComp", connectedComponent.ID);
Compound.Add("Connector", connector.ID);
}
}
示例6: SaveAll
//============================================================LOGICS========================================================
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("J2", Joints[2].ID);
Compound.Add("J3", Joints[3].ID);
Compound.Add("W1", W1.ID);
Compound.Add("W2", W2.ID);
Compound.Add("W3", W3.ID);
Compound.Add("Capacitance", (Logics as Logics.CapacitorLogics).Capacitance);
Compound.Add("MaxVoltage", (Logics as Logics.CapacitorLogics).MaxOutputVoltage);
}
示例7: SaveAll
//============================================================LOGICS========================================================
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("J2", Joints[2].ID);
Compound.Add("J3", Joints[3].ID);
Compound.Add("J4", Joints[4].ID);
Compound.Add("J5", Joints[5].ID);
Compound.Add("W1", W1.ID);
Compound.Add("W2", W2.ID);
Compound.Add("W3", W3.ID);
}
示例8: SaveAll
//============================================================LOGICS========================================================
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("J2", Joints[2].ID);
Compound.Add("J3", Joints[3].ID);
Compound.Add("J4", Joints[4].ID);
Compound.Add("J5", Joints[5].ID);
Compound.Add("W1", W1.ID);
Compound.Add("W2", W2.ID);
Compound.Add("Period", (Logics as Logics.SignalSplitterLogics).Period);
}
示例9: SaveAll
//============================================================LOGICS========================================================
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
for (int i = 0; i < Joints.Length; i++)
{
Compound.Add("J" + i.ToString(), Joints[i].ID);
}
for (int i = 0; i < Wires.Length; i++)
{
Compound.Add("W" + i.ToString(), Wires[i].ID);
}
Compound.Add("Left", left.GetHashCode());
Compound.Add("Up", up.GetHashCode());
Compound.Add("Right", right.GetHashCode());
Compound.Add("Down", down.GetHashCode());
Compound.Add("Range", Range);
}
示例10: SaveAll
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("W", W.ID);
Compound.Add("RequiredLength", (Logics as Logics.PulseCoreLogics).RequiredActivity);
}
示例11: SaveAll
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("W", W.ID);
Compound.Add("Cycle", (Logics as Logics.PulseFormerLogics).cycle);
String s = "";
float[] t = (Logics as Logics.PulseFormerLogics).pulses;
for (int i = 0; i < t.Length; i++)
{
s += t[i].ToString() + ";";
}
s = s.Substring(0, s.Length - 1);
Compound.Add("Pulses", s);
Compound.Add("MaxRes", MaxResistance);
}
示例12: SaveAll
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
for (int i = 0; i < Joints.Length; i++)
{
Compound.Add("J" + i.ToString(), Joints[i].ID);
}
for (int i = 0; i < W.Length; i++)
{
Compound.Add("W" + i.ToString(), W[i].ID);
}
}
示例13: SaveAll
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
W.IsConnected = false;
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("W", W.ID);
}
示例14: SaveAll
//============================================================LOGICS========================================================
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("J2", Joints[2].ID);
Compound.Add("W1", W1.ID);
}
示例15: SaveAll
//==============================================================IO==========================================================
public override void SaveAll(IO.ComponentData Compound)
{
base.SaveAll(Compound);
Compound.Add("J0", Joints[0].ID);
Compound.Add("J1", Joints[1].ID);
Compound.Add("J2", Joints[2].ID);
Compound.Add("W1", W1.ID);
Compound.Add("W2", W2.ID);
Compound.Add("Connection", connection.GetHashCode());
}