Пример #1
0
 public SyncPoint(float value)
 {
     Type = SyncPointType.Absolute;
     AbsoluteValue = value;
     Offset = 0;
     ReferenceValue="";
 }
Пример #2
0
        public SyncPoint(string value)
        {
			if (value==null) {
				Type=SyncPointType.Unspecified;
				AbsoluteValue=0;
				Offset=0;
				ReferenceValue="";
			}else{
	            Type = SyncPointType.Reference;
	            AbsoluteValue = 0;
	            Offset = 0;
	            ReferenceValue = value;
	            string[] s = ReferenceValue.Split('+');
				float f;
	            if (s.Length > 1)
	            {
	                if (float.TryParse(s[1], out f))
	                {
	                    Offset = f;
	                }
	                ReferenceValue = s[0];
	            }else{
					if (float.TryParse(s[0], out f))
	                {
	                    AbsoluteValue = f;
						Type = SyncPointType.Absolute;
	                }
				}
			}
        }
Пример #3
0
 public SyncPoint(SyncPointType type)
 {
     Type = type;
     AbsoluteValue = 0;
     Offset = 0;
     ReferenceValue = "";
 }