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


C# SerializationInfo.GetSingle方法代码示例

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


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

示例1: Cursor3DProperties

 protected Cursor3DProperties(SerializationInfo info, StreamingContext context)
 {
     _enabled = info.GetBoolean("_enabled");
       _radius = info.GetSingle("_radius");
       _intensity = info.GetSingle("_intensity");
       _rotationAngle = info.GetSingle("_rotationAngle");
 }
开发者ID:hxzpily,项目名称:projectanarchy,代码行数:7,代码来源:Cursor3DProperties.cs

示例2: FloatRectangle

 /// <summary>
 /// Constructor for deserialization.
 /// </summary>
 /// <param name="info">info is the serialization info to deserialize with</param>
 /// <param name="context">context is the context in which to deserialize...?</param>
 public FloatRectangle(SerializationInfo info, StreamingContext context)
 {
     mU = info.GetSingle("U");
     mV = info.GetSingle("V");
     mWidth = info.GetSingle("Width");
     mHeight = info.GetSingle("Height");
 }
开发者ID:dogmahtagram,项目名称:Finale,代码行数:12,代码来源:FloatRectangle.cs

示例3: Color4f

 private Color4f(SerializationInfo info, StreamingContext context)
 {
   m_r = info.GetSingle("R");
   m_g = info.GetSingle("G");
   m_b = info.GetSingle("B");
   m_a = info.GetSingle("A");
 }
开发者ID:gwinsky,项目名称:rhinocommon,代码行数:7,代码来源:rdk_color.cs

示例4: DepthFogConfig

 /// <summary>
 /// Called when deserializing
 /// </summary>
 /// <param name="info"></param>
 /// <param name="context"></param>
 protected DepthFogConfig(SerializationInfo info, StreamingContext context)
 {
     _bEnabled = info.GetBoolean("_bEnabled");
       _fStartDist = info.GetSingle("_fStartDist");
       _fStartEnd = info.GetSingle("_fStartEnd");
       _color = (Color)info.GetValue("_color", typeof(Color));
 }
开发者ID:elemen,项目名称:projectanarchy,代码行数:12,代码来源:DepthFogConfig.cs

示例5: PlanningGrid

        protected PlanningGrid(SerializationInfo info, StreamingContext context)
        {
            sizeX = info.GetInt32("sizeX");
            sizeY = info.GetInt32("sizeY");

            spacing = info.GetSingle("spacing");
            offsetX = info.GetSingle("offsetX");
            offsetY = info.GetSingle("offsetY");

            byte[] compData = (byte[])info.GetValue("data", typeof(byte[]));
            MemoryStream ms = new MemoryStream(compData, false);
            DeflateStream compStream = new DeflateStream(ms, CompressionMode.Decompress);
            BinaryReader reader = new BinaryReader(compStream);

            min = float.MaxValue;
            max = float.MinValue;

            data = new float[sizeX][];
            for (int x = 0; x < sizeX; x++) {
                data[x] = new float[sizeY];
                for (int y = 0; y < sizeY; y++) {
                    float value = reader.ReadSingle();
                    data[x][y] = value;

                    if (value < min) min = value;
                    if (value > max) max = value;
                }
            }
        }
开发者ID:anand-ajmera,项目名称:cornell-urban-challenge,代码行数:29,代码来源:PlanningGrid.cs

示例6: SetObjectData

        public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
        {
            Keyframe[] keyframes;

            AnimationCurve curve=new AnimationCurve();

            //	curve.preWrapMode=(WrapMode)info.GetValue("preWrapMode",typeof(WrapMode));
            //	curve.postWrapMode=(WrapMode)info.GetValue("postWrapMode",typeof(WrapMode));

            int numKeys=info.GetInt32("keysn");

            keyframes=new Keyframe[numKeys];

            Keyframe keyframeCurrent;
            for (int i=0; i<numKeys; i++) {
                keyframeCurrent=keyframes[i]=new Keyframe(info.GetSingle("keyt"+i),
                info.GetSingle("keyv"+i));
                keyframeCurrent.tangentMode=info.GetInt32("keymod"+i);
                keyframeCurrent.inTangent=info.GetSingle("keyin"+i);
                keyframeCurrent.outTangent=info.GetSingle("keyout"+i);
            }

            curve.keys = keyframes;

            // don't know how to make connection between AnimaitonCurver and Keyframes surrogate
            // AnimationCurve surrogate keys are constructed before thoose in Keyframe surrogate resulting in 0,0 Keyframes
            //return new AnimationCurve((Keyframe[])info.GetValue ("keys", typeof(Keyframe[])));

            return curve;
        }
开发者ID:osmanzeki,项目名称:bmachine,代码行数:30,代码来源:AnimationCurveSurrogate.cs

示例7: Margin

		//Creates a new element from the supplied XML.
		protected Margin(SerializationInfo info, StreamingContext context)
		{
			Left = info.GetSingle("Left");
			Top =  info.GetSingle("Top");
			Right =  info.GetSingle("Right");
			Bottom =  info.GetSingle("Bottom");
		}
开发者ID:savagemat,项目名称:arcgis-diagrammer,代码行数:8,代码来源:Margin.cs

示例8: SetObjectData

		public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
		{
			float single = info.GetSingle("r");
			float single2 = info.GetSingle("g");
			float single3 = info.GetSingle("b");
			float single4 = info.GetSingle("a");
			return new Color(single, single2, single3, single4);
		}
开发者ID:fuboss,项目名称:aiProject,代码行数:8,代码来源:ColorSurrogate.cs

示例9: SetObjectData

        public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) {
            float r = info.GetSingle("r");
            float g = info.GetSingle("g");
            float b = info.GetSingle("b");
            float a = info.GetSingle("a");

            return new Color(r, g, b, a);
        }
开发者ID:Boxxxx,项目名称:clicker,代码行数:8,代码来源:ColorSurrogate.cs

示例10: N_Particle

 public N_Particle(SerializationInfo sinfo, StreamingContext scon)
 {
     particleindex = sinfo.GetInt32("particleindex");
     ismovingboundary = sinfo.GetBoolean("ismovingboundary");
     isstationaryboundary = sinfo.GetBoolean("isstationaryboundary");
     distance = sinfo.GetSingle("distance");
     smoothingkernel = sinfo.GetSingle("smoothingkernel");
     smoothingkernelsquared = sinfo.GetSingle("smoothingkernelsquared");
 }
开发者ID:jpneill,项目名称:SPHSim,代码行数:9,代码来源:N_Particle.cs

示例11: SetObjectData

        public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) {
            var alpha = info.GetSingle("alpha");
            var time = info.GetSingle("time");

            return new GradientAlphaKey {
                alpha = alpha,
                time = time
            };
        }
开发者ID:Boxxxx,项目名称:clicker,代码行数:9,代码来源:GradientSurrogate.cs

示例12: BackgroundColourImageDrawer

 public BackgroundColourImageDrawer(SerializationInfo info, StreamingContext context)
 {
     _moveVelocity = (PointF)info.GetValue("MoveVelocity", typeof(PointF));
     _backgroundFrameKeys = (String[])info.GetValue("Backgroundframekeys", typeof(String[]));
     _rotateSpeed = info.GetSingle("rotatespeed");
     _currentRotation = info.GetSingle("currentrotation");
     _currentOffset = (PointF)info.GetValue("CurrentOffset",typeof(PointF));
     _rotateOrigin = (PointF)info.GetValue("RotateOrigin", typeof(PointF));
 }
开发者ID:BCProgramming,项目名称:BASeBlock,代码行数:9,代码来源:BackgroundDrawer.cs

示例13: SetObjectData

        public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
        {
            NUIVector v = (NUIVector)obj;
            v.X = info.GetSingle("X");
            v.Y = info.GetSingle("Y");
            v.Z = info.GetSingle("Z");

            return v;
        }
开发者ID:pi11e,项目名称:KinectHTML5,代码行数:9,代码来源:Extensions.cs

示例14: WaypointComponent_cl

        /// <summary>
        /// Constructor for deserialization.
        /// </summary>
        /// <param name="info">info is the serialization info to deserialize with</param>
        /// <param name="context">context is the context in which to deserialize...?</param>
        protected WaypointComponent_cl(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
            //mPosition = new Vector3(info.GetSingle("X"), info.GetSingle("Y"), info.GetSingle("Z"));
            mOffsetVector = new Vector3(info.GetSingle("OffsetX"), info.GetSingle("OffsetY"), info.GetSingle("OffsetZ"));
            mRotation = info.GetSingle("Rotation");

            WaypointManager_cl.AddWaypoint(this);
        }
开发者ID:IDGASoft,项目名称:Molydeux,代码行数:14,代码来源:WaypointComponent.cs

示例15: SetObjectData

 public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
 {
     float single = info.GetSingle("time");
     float single2 = info.GetSingle("value");
     int @int = info.GetInt32("tangentMode");
     float single3 = info.GetSingle("inTangent");
     float single4 = info.GetSingle("outTangent");
     Keyframe keyframe = new Keyframe(single, single2, single3, single4);
     keyframe.tangentMode = @int;
     return keyframe;
 }
开发者ID:fuboss,项目名称:aiProject,代码行数:11,代码来源:KeyframeSurrogate.cs


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