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


C# IO.GetInt方法代码示例

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


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

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

示例2: LoadAll

 /// <summary>
 /// Called when a scheme is being loaded
 /// </summary>
 /// <param name="Compound">Use this to read data</param>
 public virtual void LoadAll(IO.ComponentData Compound)
 {
     ID = Compound.GetInt("ID");
     Graphics.Position = Compound.GetVector2("Position");
     Graphics.Size = Compound.GetVector2("Size");
     Graphics.Visible = Compound.GetBool("Visible");
     rotation = (Rotation)Compound.GetInt("Rotation");
     isRemovable = Compound.GetBool("Removable");
 }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:13,代码来源:Component.cs

示例3: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            j0 = Compound.GetInt("J0");
            j1 = Compound.GetInt("J1");
            w = Compound.GetInt("W");

            (Logics as Logics.PowerACLogics).voltage = Compound.GetDouble("Voltage");
            (Logics as Logics.PowerACLogics).period = (float)Compound.GetDouble("Period");
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:11,代码来源:PowerAC.cs

示例4: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            j0 = Compound.GetInt("J0");
            j1 = Compound.GetInt("J1");
            w = Compound.GetInt("W");
            var a = Compound.GetDouble("Field");
            if (!Double.IsNaN(a))
                fieldRadius = (float)a;
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:11,代码来源:Coil.cs

示例5: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            j0 = Compound.GetInt("J0");
            j1 = Compound.GetInt("J1");
            w = Compound.GetInt("W");
            var a = Compound.GetDouble("Luminosity");
            if (!Double.IsNaN(a))
                Luminosity = (float)a;
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:11,代码来源:LED.cs

示例6: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            j0 = Compound.GetInt("J0");
            j1 = Compound.GetInt("J1");
            w = Compound.GetInt("W");
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:8,代码来源:Diode.cs

示例7: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            for (int i = 0; i < Joints.Length; i++)
            {
                j[i] = Compound.GetInt("J" + i.ToString());
            }
            var d = Compound.GetDouble("Current");
            if (!Double.IsNaN(d))
            {
                MaxCurrent = d;
                MaxVoltage = Compound.GetDouble("Potential");
                MaxMagnetForce = (float)Compound.GetDouble("Force");
            }
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:16,代码来源:HES.cs

示例8: 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");

            (Logics as Logics.DelayerLogics).Delay = Compound.GetInt("Delay");
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:13,代码来源:Delayer.cs

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

示例10: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            j0 = Compound.GetInt("J0");
            j1 = Compound.GetInt("J1");
            w = Compound.GetInt("W");
            (Logics as Logics.PulseFormerLogics).cycle = Compound.GetBool("Cycle");
            double td = Compound.GetDouble("MaxRes");
            if (Double.IsNaN(td)) td = MaxResistance;
            MaxResistance = (float)td;

            String s = Compound.GetString("Pulses");
            var a = s.Split(';');
            float[] t = new float[a.Length];
            for (int i = 0; i < a.Length; i++)
            {
                try
                {
                    t[i] = (float)Convert.ToDouble(a[i]);
                }
                catch
                {
                    t[i] = 0;
                }
            }
            (Logics as Logics.PulseFormerLogics).pulses = t;
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:28,代码来源:PulseFormer.cs

示例11: 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");
            j4 = Compound.GetInt("J4");
            j5 = Compound.GetInt("J5");
            w1 = Compound.GetInt("W1");
            w2 = Compound.GetInt("W2");

            (Logics as Logics.SignalSplitterLogics).Period = Compound.GetInt("Period");
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:15,代码来源:PulseFormer.cs

示例12: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            j0 = Compound.GetInt("J0");
            j1 = Compound.GetInt("J1");
            w = Compound.GetInt("W");
            (Logics as Logics.PulseCoreLogics).RequiredActivity = Compound.GetInt("RequiredLength");
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:9,代码来源:PulseCore.cs

示例13: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            j0 = Compound.GetInt("J0");
            j1 = Compound.GetInt("J1");
            w = Compound.GetInt("W");
            MaxResistance = Compound.GetDouble("MaxRes");
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:9,代码来源:Photoresistor.cs

示例14: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            for (int i = 0; i < Joints.Length; i++)
            {
                j[i] = Compound.GetInt("J" + i.ToString());
            }

            for (int i = 0; i < W.Length; i++)
            {
                w[i] = Compound.GetInt("W" + i.ToString());
            }
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:14,代码来源:SegmentDisplay4.cs

示例15: LoadAll

        public override void LoadAll(IO.ComponentData Compound)
        {
            base.LoadAll(Compound);

            c1 = Compound.GetInt("C1");
            c2 = Compound.GetInt("C2");
        }
开发者ID:XZelnar,项目名称:MicroWorld,代码行数:7,代码来源:RotatableConnector.cs


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