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


C# IO.Add方法代码示例

本文整理汇总了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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:12,代码来源:VoltageGraph.cs

示例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);//*/
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:32,代码来源:Joint.cs

示例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);
 }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:14,代码来源:Component.cs

示例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());
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:32,代码来源:Hub.cs

示例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);
            }
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:23,代码来源:Mover.cs

示例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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:17,代码来源:Capacitor.cs

示例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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:16,代码来源:XORGate.cs

示例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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:16,代码来源:PulseFormer.cs

示例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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:23,代码来源:MovementDetector.cs

示例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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:10,代码来源:PulseCore.cs

示例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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:19,代码来源:PulseFormer.cs

示例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);
            }
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:15,代码来源:SegmentDisplay4.cs

示例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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:11,代码来源:Button.cs

示例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);
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:11,代码来源:NOTGate.cs

示例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());
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:12,代码来源:DoubleSwitch.cs


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