Stamp

Namespace: Aspose.PDF
We found 10 examples in language CSharp for this search. You will see 53 fragments of code.
public enum StampEnum // TypeDefIndex: 8272
{
	// Fields
	public int value__; // 0x0
	public const StampEnum Shipping = 0;
	public const StampEnum Date = 1;
	public const StampEnum Fishing = 2;
	public const StampEnum FriendMonster = 3;
	public const StampEnum Sick = 4;
	public const StampEnum Order = 5;
	public const StampEnum Bath = 6;
	public const StampEnum BeanSowingEvent = 7;
	public const StampEnum SquidFisingEvent = 8;
	public const StampEnum FishingEvent = 9;
	public const StampEnum SpringVegetablesEvent = 10;
	public const StampEnum SummerVegetablesEvent = 11;
	public const StampEnum AutumnVegetablesEvent = 12;
	public const StampEnum WinterVegetablesEvent = 13;
	public const StampEnum PetEvent = 14;
	public const StampEnum CookingEvent = 15;
	public const StampEnum BlacksmithEvent = 16;
	public const StampEnum HalloweenEvent = 17;
	public const StampEnum Marriage = 18;
	public const StampEnum GameClear = 19;
	public const StampEnum Friendly = 20;
	public const StampEnum RichMan = 21;
	public const StampEnum FiveYearAgo = 22;
	public const StampEnum ShippingComplete = 23;
	public const StampEnum FirstBabyBorn = 24;
	public const StampEnum MonsterHutComplete = 25;
	public const StampEnum HighLevel = 26;
	public const StampEnum Amago = 27;
	public const StampEnum Ika = 28;
	public const StampEnum Ito = 29;
	public const StampEnum Iwashi = 30;
	public const StampEnum Iwana = 31;
	public const StampEnum Ugui = 32;
	public const StampEnum Kagayakitai = 33;
	public const StampEnum Katsuo = 34;
	public const StampEnum Karei = 35;
	public const StampEnum Gimbuna = 36;
	public const StampEnum Sake = 37;
	public const StampEnum Saba = 38;
	public const StampEnum Sayori = 39;
	public const StampEnum Samma = 40;
	public const StampEnum Jamaika = 41;
	public const StampEnum Ebi = 42;
	public const StampEnum Tai = 43;
	public const StampEnum Tokimekitai = 44;
	public const StampEnum Dokunijimasu = 45;
	public const StampEnum Hirame = 46;
	public const StampEnum Fugu = 47;
	public const StampEnum Buri = 48;
	public const StampEnum Herabuna = 49;
	public const StampEnum Maguro = 50;
	public const StampEnum Mejina = 51;
	public const StampEnum Momijihirame = 52;
	public const StampEnum Yamame = 53;
	public const StampEnum Fuinika = 54;
	public const StampEnum Robusuta = 55;
	public const StampEnum Wakasagi = 56;
	public const StampEnum Sunahirame = 57;
	public const StampEnum Gansekigyo = 58;
	public const StampEnum Akikan = 59;
	public const StampEnum Nagagutsu = 60;
	public const StampEnum Reanaakikan = 61;
	public const StampEnum Gorudensamon = 62;
	public const StampEnum Gorudenokutopasu = 63;
	public const StampEnum Mambo = 64;
	public const StampEnum Sawara = 65;
	public const StampEnum Tako = 66;
	public const StampEnum Kajikimaguro = 67;
	public const StampEnum Tachiuo = 68;
	public const StampEnum Awabi = 69;
	public const StampEnum Kimmedai = 70;
	public const StampEnum Tarabagani = 71;
	public const StampEnum GluttonEvent = 72;
	public const StampEnum SnowmanEvent = 73;
	public const StampEnum BaffamoEvent = 74;
	public const StampEnum TwoPersonFishing = 75;
	public const StampEnum TwoPersonBlacksmith = 76;
	public const StampEnum TwoPersonCooking = 77;
	public const StampEnum TwinsBorn = 78;
	public const StampEnum FarmDragonComplete = 79;
	public const StampEnum PoliceRankComplete = 80;
	public const StampEnum MAX = 81;
}


		[Description("6.1. Add rotated Draft stamp from a standard collection by Stamp ID")]
		static public void AddStandardStampByID(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampsManager stampManager = Parent.m_pxcInst.StampsManager;
			IPXC_StampInfo si = stampManager.FindStamp("Draft");
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;
			rc.left = rcPB.left - nWidth / 2.0 + nHeight / 2.0;
			rc.right = rcPB.left + nWidth / 2.0 + nHeight / 2.0;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nWidth;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.Rotation = 90;
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}

		[Description("6.2. Add Expired stamp from a standard collection by index in collection")]
		static public void AddStandardStampByIndexInCollection(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampsManager stampManager = Parent.m_pxcInst.StampsManager;
			uint nColIndex = (uint)stampManager.FindCollection("Standard");
			IPXC_StampsCollection sc = stampManager[nColIndex];
			IPXC_StampInfo si = null;
			for (uint i = 0; i < sc.Count; i++)
			{
				if (sc[i].ID == "Expired")
				{
					si = sc[i];
					break;
				}
			}
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;
			rc.left = 0;
			rc.right = nWidth;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}

		[Description("6.3. Load stamps collection from stamp file and place stamp from it")]
		static public void LoadStampsCollectionFromFile(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);

			//Loading stamp collection from stamp file
			IAFS_Inst afsInst = (IAFS_Inst)Parent.m_pxcInst.GetExtension("AFS");
			string sPath = System.Environment.CurrentDirectory + "\\Documents\\MyStamps.pdf";
			IAFS_Name name = afsInst.DefaultFileSys.StringToName(sPath);
			int openFileFlags = (int)(AFS_OpenFileFlags.AFS_OpenFile_Read | AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
			IAFS_File destFile = afsInst.DefaultFileSys.OpenFile(name, openFileFlags);
			IPXC_StampsCollection sc = Parent.m_pxcInst.StampsManager.LoadCollection(destFile);

			//Placing stamp from the loaded collection
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampInfo si = sc[0]; //getting stamp by index - they are sorted by name
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;//Annotation rectangle
			rc.left = 0;
			rc.right = nWidth;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.set_BBox(rc); //Stamp rectangle boundaries
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}
		[Description("6.4. Load stamp from image file")]
		static public void LoadStampFromTheImageFile(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);

			//Loading image file
			IAFS_Inst afsInst = (IAFS_Inst)Parent.m_pxcInst.GetExtension("AFS");
			string sPath = System.Environment.CurrentDirectory + "\\Images\\run_24.png";
			IAFS_Name name = afsInst.DefaultFileSys.StringToName(sPath);
			int openFileFlags = (int)(AFS_OpenFileFlags.AFS_OpenFile_Read | AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
			IAFS_File destFile = afsInst.DefaultFileSys.OpenFile(name, openFileFlags);
			//Creating new collection
			IPXC_StampsCollection sc = Parent.m_pxcInst.StampsManager.CreateEmptyCollection("My Stamps");

			IPXC_StampInfo si = sc.AddStamp(destFile, "My Stamp");
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			//Increasing width and height by 20
			PXC_Rect rc; //Annotation rectangle
			rc.left = 0;
			rc.right = nWidth * 20;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight * 20;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.set_BBox(rc); //Stamp rectangle boundaries
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}


		public TimeStamp Add(TimeSpan ts)
		{
			return Stamp + ts.TotalSeconds;
		}

		public TimeStamp Subtract(TimeSpan ts)
		{
			return Stamp - ts.TotalSeconds;
		}

		public override int GetHashCode()
		{
			return Stamp.GetHashCode();
		}

		public override bool Equals(object obj)
		{
			if (ReferenceEquals(null, obj))
			{
				return false;
			}

			if (obj is TimeStamp)
			{
				return Equals((TimeStamp)obj);
			}

			return base.Equals(obj);
		}

		public bool Equals(TimeStamp t)
		{
			return Stamp.Equals(t.Stamp);
		}

		public int CompareTo(TimeStamp t)
		{
			return Stamp.CompareTo(t.Stamp);
		}


  // VALUES THAT NEED TO BE SET AND USED THROUGH THE PROCES
  void Start () {
    restPosRedStamp = redStamp.transform.position;
    restPosGreenStamp = greenStamp.transform.position;
    restPosNumberStamp = numberStamp.transform.position;

    redPosHide = new Vector3(redStamp.transform.position.x - 250f, redStamp.transform.position.y, redStamp.transform.position.z);
    greenPosHide = new Vector3(greenStamp.transform.position.x - 250f, greenStamp.transform.position.y, greenStamp.transform.position.z);
    numberPosHide = new Vector3(numberStamp.transform.position.x + 250f, numberStamp.transform.position.y, numberStamp.transform.position.z);
    // ALL REST SCALES HAVE TO BE SAME VALUE
    restScale = redStamp.transform.localScale;
    maxScale = new Vector3(redStamp.transform.localScale.x + maxScaleToAdd, redStamp.transform.localScale.y + maxScaleToAdd, redStamp.transform.localScale.z + maxScaleToAdd);
    GI = GameObject.Find("GameData").GetComponent<GameInfo>();
	}

  // RECEIVES FROM GAME CONTROLLER THE NAME OF THE CURRENT STAMP HOLDING, STAMP CONTROLLER NEEDS THIS TO MOVE THE RIGHT STAMPS 
  public bool CheckStamp(string hit) {
    bool readyChecking = false;
    if (hit == redStamp.name)
    {
      rotationZ = getRotation(redStamp);
      selectedStamp = "red";
      stampToMove = redStamp;
      restPos = restPosRedStamp;
      readyChecking = true;
    }
    else if (hit == greenStamp.name)
    {
      rotationZ = getRotation(greenStamp);
      selectedStamp = "green";
      stampToMove = greenStamp;
      restPos = restPosGreenStamp;
      readyChecking = true;
    }
    else if (hit == numberStamp.name)
    {
      rotationZ = getRotation(numberStamp);
      SelectedStamp = "number";
      stampToMove = numberStamp;
      restPos = restPosNumberStamp;
      readyChecking = true;
    }
    return readyChecking;
  }
  
  // USED WHEN WE ARE HOLDING A STAMP
  public void ScaleStamp(float step)
  {
    stampToMove.transform.localScale = Vector3.Lerp(stampToMove.transform.localScale, maxScale, step);
  }

  // DEACTIVATES STAMPS DEPENDING ON QUESTION TYPE AND SAVES WHICH QUESTION TYPE WAS THE PREVIOUS ONE
  public void DeActivateStamps()
  {
    if (GI.QuestionTypes[GI.CurrentProjectNumber][GI.CurrentQuestionNumber] == 1)
    {
      previousQuestionType = 1;
      numberStamp.tag = "Untagged";
      greenStamp.tag = "Stamp";
      redStamp.tag = "Stamp";
    }
    else
    {
      previousQuestionType = GI.QuestionTypes[GI.CurrentProjectNumber][GI.CurrentQuestionNumber];
      numberStamp.tag = "Stamp";
      greenStamp.tag = "Untagged";
      redStamp.tag = "Untagged";
    }
  }

  // MOVES STAMPS OUT OF IN THE SCREEN TO BE USED
  public void HideUnusedStamps(float step)
  {
    if (GI.QuestionTypes[GI.CurrentProjectNumber][GI.CurrentQuestionNumber] != previousQuestionType)
    {
      if (GI.QuestionTypes[GI.CurrentProjectNumber][GI.CurrentQuestionNumber] == 1 )
      {
        numberStamp.transform.localPosition = Vector3.Lerp(numberStamp.transform.position, numberPosHide, step);
        greenStamp.transform.localPosition = Vector3.Lerp(greenStamp.transform.position, restPosGreenStamp, step);
        redStamp.transform.localPosition = Vector3.Lerp(redStamp.transform.position, restPosRedStamp, step);
      }
      else
      {
        greenStamp.transform.localPosition = Vector3.Lerp(greenStamp.transform.position, greenPosHide, step);
        redStamp.transform.localPosition = Vector3.Lerp(redStamp.transform.position, redPosHide, step);
        numberStamp.transform.localPosition = Vector3.Lerp(numberStamp.transform.position, restPosNumberStamp, step);
      }
    }
  }

  public void hideAllStamps(float step)
  {
    if (previousQuestionType == 2)
    {
      numberStamp.transform.localPosition = Vector3.Lerp(numberStamp.transform.position, numberPosHide, step);
      greenStamp.transform.localPosition = Vector3.Lerp(greenStamp.transform.position, restPosGreenStamp, step);
      redStamp.transform.localPosition = Vector3.Lerp(redStamp.transform.position, restPosRedStamp, step);
    }
    else
    {
      greenStamp.transform.localPosition = Vector3.Lerp(greenStamp.transform.position, greenPosHide, step);
      redStamp.transform.localPosition = Vector3.Lerp(redStamp.transform.position, redPosHide, step);
      numberStamp.transform.localPosition = Vector3.Lerp(numberStamp.transform.position, restPosNumberStamp, step);
    }
  }


    void IStateInterpolator<PosRot>.SetGoals(ref TimeStamped<PosRot> sample)
    {
        base.SetGoals(ref sample);
    }

    public bool Sample(ref double time, out PosRot result)
    {
        int num;
        double timeStamp;
        switch (base.len)
        {
            case 0:
                result = new PosRot();
                return false;

            case 1:
                num = base.tbuffer[0].index;
                timeStamp = base.tbuffer[num].timeStamp;
                result = base.tbuffer[num].value;
                return true;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            num = base.tbuffer[index].index;
            timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (timeStamp == time)
                {
                    result = base.tbuffer[num].value;
                    return true;
                }
                if (timeStamp < time)
                {
                    if (num4 == -1)
                    {
                        if (this.exterpolate && (index < (base.len - 1)))
                        {
                            num4 = num;
                            num = base.tbuffer[index + 1].index;
                            double t = (time - base.tbuffer[num].timeStamp) / (base.tbuffer[num4].timeStamp - base.tbuffer[num].timeStamp);
                            PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, t, out result);
                        }
                        else
                        {
                            result = base.tbuffer[num].value;
                        }
                    }
                    else
                    {
                        double num6 = base.tbuffer[num4].timeStamp;
                        double num7 = this.allowDifference + NetCull.sendInterval;
                        double num8 = num6 - timeStamp;
                        if (num8 > num7)
                        {
                            timeStamp = num6 - (num8 = num7);
                            if (timeStamp >= time)
                            {
                                result = base.tbuffer[num].value;
                                return true;
                            }
                        }
                        double num9 = (time - timeStamp) / num8;
                        PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, num9, out result);
                    }
                    return true;
                }
            }
        }
        while (++index < base.len);
        result = base.tbuffer[base.tbuffer[base.len - 1].index].value;
        return true;
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity);
    }

    public bool SampleWorldVelocity(double time, out Vector3 worldLinearVelocity)
    {
        switch (base.len)
        {
            case 0:
            case 1:
                worldLinearVelocity = new Vector3();
                return false;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            int num = base.tbuffer[index].index;
            double timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (num4 == -1)
                {
                    worldLinearVelocity = new Vector3();
                    return false;
                }
                double num5 = base.tbuffer[num4].timeStamp;
                double num6 = this.allowDifference + NetCull.sendInterval;
                double num7 = num5 - timeStamp;
                if (num7 >= num6)
                {
                    num7 = num6;
                    timeStamp = num5 - num7;
                    if (time <= timeStamp)
                    {
                        worldLinearVelocity = new Vector3();
                        return false;
                    }
                }
                worldLinearVelocity = base.tbuffer[num4].value.position - base.tbuffer[num].value.position;
                worldLinearVelocity.x = (float) (((double) worldLinearVelocity.x) / num7);
                worldLinearVelocity.y = (float) (((double) worldLinearVelocity.y) / num7);
                worldLinearVelocity.z = (float) (((double) worldLinearVelocity.z) / num7);
                return true;
            }
        }
        while (++index < base.len);
        worldLinearVelocity = new Vector3();
        return false;
    }

    public void SetGoals(PosRot frame, double timestamp)
    {
        this.SetGoals(ref frame, ref timestamp);
    }

    public sealed override void SetGoals(Vector3 pos, Quaternion rot, double timestamp)
    {
        PosRot rot2;
        rot2.position = pos;
        rot2.rotation = rot;
        this.SetGoals(ref rot2, ref timestamp);
    }


    void IStateInterpolator<PosRot>.SetGoals(ref TimeStamped<PosRot> sample)
    {
        base.SetGoals(ref sample);
    }

    public bool Sample(ref double time, out PosRot result)
    {
        int num;
        double timeStamp;
        switch (base.len)
        {
            case 0:
                result = new PosRot();
                return false;

            case 1:
                num = base.tbuffer[0].index;
                timeStamp = base.tbuffer[num].timeStamp;
                result = base.tbuffer[num].value;
                return true;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            num = base.tbuffer[index].index;
            timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (timeStamp == time)
                {
                    result = base.tbuffer[num].value;
                    return true;
                }
                if (timeStamp < time)
                {
                    if (num4 == -1)
                    {
                        if (this.exterpolate && (index < (base.len - 1)))
                        {
                            num4 = num;
                            num = base.tbuffer[index + 1].index;
                            double t = (time - base.tbuffer[num].timeStamp) / (base.tbuffer[num4].timeStamp - base.tbuffer[num].timeStamp);
                            PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, t, out result);
                        }
                        else
                        {
                            result = base.tbuffer[num].value;
                        }
                    }
                    else
                    {
                        double num6 = base.tbuffer[num4].timeStamp;
                        double num7 = this.allowDifference + NetCull.sendInterval;
                        double num8 = num6 - timeStamp;
                        if (num8 > num7)
                        {
                            timeStamp = num6 - (num8 = num7);
                            if (timeStamp >= time)
                            {
                                result = base.tbuffer[num].value;
                                return true;
                            }
                        }
                        double num9 = (time - timeStamp) / num8;
                        PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, num9, out result);
                    }
                    return true;
                }
            }
        }
        while (++index < base.len);
        result = base.tbuffer[base.tbuffer[base.len - 1].index].value;
        return true;
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity);
    }

    public bool SampleWorldVelocity(double time, out Vector3 worldLinearVelocity)
    {
        switch (base.len)
        {
            case 0:
            case 1:
                worldLinearVelocity = new Vector3();
                return false;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            int num = base.tbuffer[index].index;
            double timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (num4 == -1)
                {
                    worldLinearVelocity = new Vector3();
                    return false;
                }
                double num5 = base.tbuffer[num4].timeStamp;
                double num6 = this.allowDifference + NetCull.sendInterval;
                double num7 = num5 - timeStamp;
                if (num7 >= num6)
                {
                    num7 = num6;
                    timeStamp = num5 - num7;
                    if (time <= timeStamp)
                    {
                        worldLinearVelocity = new Vector3();
                        return false;
                    }
                }
                worldLinearVelocity = base.tbuffer[num4].value.position - base.tbuffer[num].value.position;
                worldLinearVelocity.x = (float) (((double) worldLinearVelocity.x) / num7);
                worldLinearVelocity.y = (float) (((double) worldLinearVelocity.y) / num7);
                worldLinearVelocity.z = (float) (((double) worldLinearVelocity.z) / num7);
                return true;
            }
        }
        while (++index < base.len);
        worldLinearVelocity = new Vector3();
        return false;
    }

    public void SetGoals(PosRot frame, double timestamp)
    {
        this.SetGoals(ref frame, ref timestamp);
    }

    public sealed override void SetGoals(Vector3 pos, Quaternion rot, double timestamp)
    {
        PosRot rot2;
        rot2.position = pos;
        rot2.rotation = rot;
        this.SetGoals(ref rot2, ref timestamp);
    }


    void IStateInterpolator<PosRot>.SetGoals(ref TimeStamped<PosRot> sample)
    {
        base.SetGoals(ref sample);
    }

    public bool Sample(ref double time, out PosRot result)
    {
        int num;
        double timeStamp;
        switch (base.len)
        {
            case 0:
                result = new PosRot();
                return false;

            case 1:
                num = base.tbuffer[0].index;
                timeStamp = base.tbuffer[num].timeStamp;
                result = base.tbuffer[num].value;
                return true;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            num = base.tbuffer[index].index;
            timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (timeStamp == time)
                {
                    result = base.tbuffer[num].value;
                    return true;
                }
                if (timeStamp < time)
                {
                    if (num4 == -1)
                    {
                        if (this.exterpolate && (index < (base.len - 1)))
                        {
                            num4 = num;
                            num = base.tbuffer[index + 1].index;
                            double t = (time - base.tbuffer[num].timeStamp) / (base.tbuffer[num4].timeStamp - base.tbuffer[num].timeStamp);
                            PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, t, out result);
                        }
                        else
                        {
                            result = base.tbuffer[num].value;
                        }
                    }
                    else
                    {
                        double num6 = base.tbuffer[num4].timeStamp;
                        double num7 = this.allowDifference + NetCull.sendInterval;
                        double num8 = num6 - timeStamp;
                        if (num8 > num7)
                        {
                            timeStamp = num6 - (num8 = num7);
                            if (timeStamp >= time)
                            {
                                result = base.tbuffer[num].value;
                                return true;
                            }
                        }
                        double num9 = (time - timeStamp) / num8;
                        PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, num9, out result);
                    }
                    return true;
                }
            }
        }
        while (++index < base.len);
        result = base.tbuffer[base.tbuffer[base.len - 1].index].value;
        return true;
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity);
    }

    public bool SampleWorldVelocity(double time, out Vector3 worldLinearVelocity)
    {
        switch (base.len)
        {
            case 0:
            case 1:
                worldLinearVelocity = new Vector3();
                return false;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            int num = base.tbuffer[index].index;
            double timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (num4 == -1)
                {
                    worldLinearVelocity = new Vector3();
                    return false;
                }
                double num5 = base.tbuffer[num4].timeStamp;
                double num6 = this.allowDifference + NetCull.sendInterval;
                double num7 = num5 - timeStamp;
                if (num7 >= num6)
                {
                    num7 = num6;
                    timeStamp = num5 - num7;
                    if (time <= timeStamp)
                    {
                        worldLinearVelocity = new Vector3();
                        return false;
                    }
                }
                worldLinearVelocity = base.tbuffer[num4].value.position - base.tbuffer[num].value.position;
                worldLinearVelocity.x = (float) (((double) worldLinearVelocity.x) / num7);
                worldLinearVelocity.y = (float) (((double) worldLinearVelocity.y) / num7);
                worldLinearVelocity.z = (float) (((double) worldLinearVelocity.z) / num7);
                return true;
            }
        }
        while (++index < base.len);
        worldLinearVelocity = new Vector3();
        return false;
    }

    public void SetGoals(PosRot frame, double timestamp)
    {
        this.SetGoals(ref frame, ref timestamp);
    }

    public sealed override void SetGoals(Vector3 pos, Quaternion rot, double timestamp)
    {
        PosRot rot2;
        rot2.position = pos;
        rot2.rotation = rot;
        this.SetGoals(ref rot2, ref timestamp);
    }

        /// <summary>
        /// ����һ������
        /// </summary>
        public int Add(ModStamp model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("insert into N_Stamp(");
            strSql.Append("StampNo,Password,IsUsed,StampMoney,StampOutTime,StampType,AddTime)");
            strSql.Append(" values (");
            strSql.Append("@StampNo,@Password,@IsUsed,@StampMoney,@StampOutTime,@StampType,@AddTime)");
            strSql.Append(";select @@IDENTITY");
            SqlParameter[] parameters = {
					new SqlParameter("@StampNo", SqlDbType.VarChar,50),
					new SqlParameter("@Password", SqlDbType.VarChar,50),
					new SqlParameter("@IsUsed", SqlDbType.Int,4),
					new SqlParameter("@StampMoney", SqlDbType.Int,4),
					new SqlParameter("@StampOutTime", SqlDbType.DateTime),
					new SqlParameter("@StampType", SqlDbType.Int,4),
					new SqlParameter("@AddTime", SqlDbType.DateTime)};
            parameters[0].Value = model.StampNo;
            parameters[1].Value = model.Password;
            parameters[2].Value = model.IsUsed;
            parameters[3].Value = model.StampMoney;
            parameters[4].Value = model.StampOutTime;
            parameters[5].Value = model.StampType;
            parameters[6].Value = model.AddTime;

            return adoHelper.ExecuteSqlNonQuery(strSql.ToString(), parameters);
        }
        /// <summary>
        /// ����һ������
        /// </summary>
        public int Update(ModStamp model)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update N_Stamp set ");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected],");
            strSql.Append("[email protected]");
            strSql.Append(" where [email protected] ");
            SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4),
					new SqlParameter("@StampNo", SqlDbType.VarChar,50),
					new SqlParameter("@Password", SqlDbType.VarChar,50),
					new SqlParameter("@IsUsed", SqlDbType.Int,4),
					new SqlParameter("@StampMoney", SqlDbType.Int,4),
					new SqlParameter("@StampOutTime", SqlDbType.DateTime),
					new SqlParameter("@StampType", SqlDbType.Int,4),
					new SqlParameter("@AddTime", SqlDbType.DateTime)};
            parameters[0].Value = model.ID;
            parameters[1].Value = model.StampNo;
            parameters[2].Value = model.Password;
            parameters[3].Value = model.IsUsed;
            parameters[4].Value = model.StampMoney;
            parameters[5].Value = model.StampOutTime;
            parameters[6].Value = model.StampType;
            parameters[7].Value = model.AddTime;

            return adoHelper.ExecuteSqlNonQuery(strSql.ToString(), parameters);
        }

        /// <summary>
        /// ɾ��һ������
        /// </summary>
        public int Delete(int ID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("delete N_Stamp ");
            strSql.Append(" where [email protected] ");
            SqlParameter[] parameters = {
					new SqlParameter("@ID", SqlDbType.Int,4)};
            parameters[0].Value = ID;

            return adoHelper.ExecuteSqlNonQuery(strSql.ToString(), parameters);
        }

        /// <summary>
        /// �õ�һ������ʵ��
        /// </summary>
        public ModStamp GetModel(string StampNo)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ID,StampNo,Password,IsUsed,StampMoney,StampOutTime,StampType,AddTime from N_Stamp ");
            strSql.Append(" where [email protected] ");
            SqlParameter[] parameters = {
					new SqlParameter("@StampNo", SqlDbType.VarChar,50)
            };
            parameters[0].Value = StampNo;

            ModStamp model = new ModStamp();
            DataSet ds = adoHelper.ExecuteSqlDataset(strSql.ToString(), parameters);
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["ID"].ToString() != "")
                {
                    model.ID = int.Parse(ds.Tables[0].Rows[0]["ID"].ToString());
                }
                model.StampNo = ds.Tables[0].Rows[0]["StampNo"].ToString();
                model.Password = ds.Tables[0].Rows[0]["Password"].ToString();
                if (ds.Tables[0].Rows[0]["IsUsed"].ToString() != "")
                {
                    model.IsUsed = int.Parse(ds.Tables[0].Rows[0]["IsUsed"].ToString());
                }
                if (ds.Tables[0].Rows[0]["StampMoney"].ToString() != "")
                {
                    model.StampMoney = int.Parse(ds.Tables[0].Rows[0]["StampMoney"].ToString());
                }
                if (ds.Tables[0].Rows[0]["StampOutTime"].ToString() != "")
                {
                    model.StampOutTime = DateTime.Parse(ds.Tables[0].Rows[0]["StampOutTime"].ToString());
                }
                if (ds.Tables[0].Rows[0]["StampType"].ToString() != "")
                {
                    model.StampType = int.Parse(ds.Tables[0].Rows[0]["StampType"].ToString());
                }
                if (ds.Tables[0].Rows[0]["AddTime"].ToString() != "")
                {
                    model.AddTime = DateTime.Parse(ds.Tables[0].Rows[0]["AddTime"].ToString());
                }
                return model;
            }
            else
            {
                return null;
            }
        }

        /// <summary>
        /// ��������б�
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("select ID,StampNo,Password,IsUsed,StampMoney,StampOutTime,StampType,AddTime ");
            strSql.Append(" FROM N_Stamp ");
            if (strWhere.Trim() != "")
            {
                strSql.Append(" where " + strWhere);
            }
            return adoHelper.ExecuteSqlDataset(strSql.ToString());
        }


        /// <summary>
        /// ������֤��1��ͨ����֤��-1�����Ŵ���-2���������
        /// </summary>
        public int CheckStamp(string stampNum, string stampPwd)
        {
            DataSet ds = GetList("stampNo='" + stampNum + "'");
            if (ds.Tables[0].Rows.Count > 0)
            {
                if (ds.Tables[0].Rows[0]["password"].ToString() == stampPwd)
                { return 1; }
                else { return -2; }
            }
            else { return -1; }
        }

		
		public static RebornStamp getInstance()
		{
			return RebornStamp.instance;
		}

		
		public static bool ParseYinJiConfig()
		{
			string fileName = Global.GameResPath(RebornStampConsts.RebornStampZhu);
			XElement xml = XElement.Load(fileName);
			if (null == xml)
			{
				LogManager.WriteLog(LogTypes.Fatal, string.Format("加载系统xml配置文件:{0}, 失败。没有找到相关XML配置文件!", fileName), null, true);
			}
			try
			{
				Dictionary<MainAttrType, Dictionary<int, int>> CurrMainYinJiHot = new Dictionary<MainAttrType, Dictionary<int, int>>();
				Dictionary<MainAttrType, List<int>> TypeMapHot = new Dictionary<MainAttrType, List<int>>();
				Dictionary<int, ChongShengYinJiZhu> MainYinJiHot = new Dictionary<int, ChongShengYinJiZhu>();
				Dictionary<MainAttrType, Dictionary<int, int>> MainYinJiLevelUpHot = new Dictionary<MainAttrType, Dictionary<int, int>>();
				IEnumerable<XElement> xmlItems = xml.Elements();
				foreach (XElement xmlItem in xmlItems)
				{
					ChongShengYinJiZhu temp = new ChongShengYinJiZhu();
					List<int> TypeList = new List<int>();
					Dictionary<int, double> AttrList = new Dictionary<int, double>();
					temp.ItemID = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "ID"));
					temp.MainType = (MainAttrType)Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "TypeZhu"));
					temp.NeedLevel = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "NeedLevel"));
					string[] arrType = Global.GetSafeAttributeStr(xmlItem, "TypeFu").Split(new char[]
					{
						','
					});
					for (int i = 0; i < arrType.Length; i++)
					{
						TypeList.Add(Convert.ToInt32(arrType[i]));
					}
					temp.MinorType = TypeList;
					temp.Level = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "Level"));
					string[] arrAttr = Global.GetSafeAttributeStr(xmlItem, "ShuXing").Split(new char[]
					{
						'|'
					});
					for (int i = 0; i < arrAttr.Length; i++)
					{
						AttrList.Add((int)ConfigParser.GetPropIndexByPropName(arrAttr[i].Split(new char[]
						{
							','
						})[0]), Convert.ToDouble(arrAttr[i].Split(new char[]
						{
							','
						})[1]));
					}
					temp.AttrList = AttrList;
					MainYinJiHot.Add(temp.ItemID, temp);
					if (CurrMainYinJiHot.ContainsKey(temp.MainType))
					{
						CurrMainYinJiHot[temp.MainType].Add(temp.Level, temp.ItemID);
					}
					else
					{
						Dictionary<int, int> dict = new Dictionary<int, int>();
						dict.Add(temp.Level, temp.ItemID);
						CurrMainYinJiHot.Add(temp.MainType, dict);
					}
					if (MainYinJiLevelUpHot.ContainsKey(temp.MainType))
					{
						MainYinJiLevelUpHot[temp.MainType].Add(temp.NeedLevel, temp.ItemID);
					}
					else
					{
						Dictionary<int, int> dict = new Dictionary<int, int>();
						dict.Add(temp.NeedLevel, temp.ItemID);
						MainYinJiLevelUpHot.Add(temp.MainType, dict);
					}
					if (!TypeMapHot.ContainsKey(temp.MainType))
					{
						TypeMapHot.Add(temp.MainType, TypeList);
					}
				}
				RebornStamp.CurrMainYinJi = CurrMainYinJiHot;
				RebornStamp.TypeMap = TypeMapHot;
				RebornStamp.MainYinJi = MainYinJiHot;
				RebornStamp.MainYinJiLevelUp = MainYinJiLevelUpHot;
				if (RebornStamp.CurrMainYinJi == null || RebornStamp.TypeMap == null || RebornStamp.MainYinJi == null || RebornStamp.MainYinJiLevelUp == null)
				{
					return false;
				}
			}
			catch (Exception ex)
			{
				LogManager.WriteException(ex.ToString());
			}
			fileName = Global.GameResPath(RebornStampConsts.RebornStampZi);
			xml = XElement.Load(fileName);
			if (null == xml)
			{
				LogManager.WriteLog(LogTypes.Fatal, string.Format("加载系统xml配置文件:{0}, 失败。没有找到相关XML配置文件!", fileName), null, true);
			}
			try
			{
				Dictionary<int, Dictionary<int, int>> MinorYinJiLevelUpHot = new Dictionary<int, Dictionary<int, int>>();
				Dictionary<int, int> MinorLevelLimitHot = new Dictionary<int, int>();
				Dictionary<int, ChongShengYinJiZi> MinorYinJiHot = new Dictionary<int, ChongShengYinJiZi>();
				IEnumerable<XElement> xmlItems = xml.Elements();
				foreach (XElement xmlItem in xmlItems)
				{
					ChongShengYinJiZi temp2 = new ChongShengYinJiZi();
					List<int> TypeList = new List<int>();
					Dictionary<int, double> AttrList = new Dictionary<int, double>();
					temp2.ItemID = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "ID"));
					temp2.MinorType = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "Type"));
					temp2.Level = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "Level"));
					string[] arrAttr = Global.GetSafeAttributeStr(xmlItem, "ShuXing").Split(new char[]
					{
						'|'
					});
					for (int i = 0; i < arrAttr.Length; i++)
					{
						string[] str = arrAttr[i].Split(new char[]
						{
							','
						});
						if (str.Length == 1)
						{
							AttrList.Add(0, 0.0);
						}
						else
						{
							AttrList.Add((int)ConfigParser.GetPropIndexByPropName(str[0]), Convert.ToDouble(str[1]));
						}
					}
					temp2.AttrList = AttrList;
					MinorYinJiHot.Add(temp2.ItemID, temp2);
					if (MinorLevelLimitHot.ContainsKey(temp2.MinorType))
					{
						if (MinorLevelLimitHot[temp2.MinorType] < temp2.Level)
						{
							MinorLevelLimitHot[temp2.MinorType] = temp2.Level;
						}
					}
					else
					{
						MinorLevelLimitHot.Add(temp2.MinorType, temp2.Level);
					}
					if (MinorYinJiLevelUpHot.ContainsKey(temp2.MinorType))
					{
						MinorYinJiLevelUpHot[temp2.MinorType].Add(temp2.Level, temp2.ItemID);
					}
					else
					{
						Dictionary<int, int> dict = new Dictionary<int, int>();
						dict.Add(temp2.Level, temp2.ItemID);
						MinorYinJiLevelUpHot.Add(temp2.MinorType, dict);
					}
				}
				RebornStamp.MinorYinJiLevelUp = MinorYinJiLevelUpHot;
				RebornStamp.MinorLevelLimit = MinorLevelLimitHot;
				RebornStamp.MinorYinJi = MinorYinJiHot;
				if (RebornStamp.MinorYinJiLevelUp == null || RebornStamp.MinorLevelLimit == null || RebornStamp.MinorYinJi == null)
				{
					return false;
				}
			}
			catch (Exception ex)
			{
				LogManager.WriteException(ex.ToString());
			}
			List<int> YinJiResetHot = new List<int>();
			int[] num = GameManager.systemParamsList.GetParamValueIntArrayByName("ChongShengYinJiChongZhi", ',');
			foreach (int it in num)
			{
				YinJiResetHot.Add(it);
			}
			RebornStamp.YinJiReset = YinJiResetHot;
			return RebornStamp.YinJiReset != null;
		}

		
		public static bool CheckTypeMatch(RebornStampData curr, int StampID, int StampType, out int Index, out int MainAttr)
		{
			Index = 0;
			MainAttr = 0;
			bool result;
			if (curr == null || curr.StampInfo == null || curr.StampInfo.Count < 0 || curr.StampInfo.Count > 16)
			{
				result = false;
			}
			else if (!RebornStamp.TypeMap.ContainsKey((MainAttrType)curr.StampInfo[0]) || !RebornStamp.TypeMap.ContainsKey((MainAttrType)curr.StampInfo[8]))
			{
				result = false;
			}
			else if (!RebornStamp.MinorYinJi.ContainsKey(StampID) || RebornStamp.MinorYinJi[StampID].MinorType != StampType)
			{
				result = false;
			}
			else
			{
				bool Exist = false;
				int i = 2;
				int j = 10;
				while (i < 8)
				{
					if (StampType == curr.StampInfo[i])
					{
						Exist = true;
						MainAttr = 1;
						Index = i;
						break;
					}
					if (StampType == curr.StampInfo[j])
					{
						Exist = true;
						MainAttr = 2;
						Index = j;
						break;
					}
					i += 2;
					j += 2;
				}
				if (!Exist)
				{
					result = false;
				}
				else
				{
					int temp = 0;
					bool[] flag = new bool[3];
					if (MainAttr == 1 && RebornStamp.TypeMap.ContainsKey((MainAttrType)curr.StampInfo[0]))
					{
						for (i = 2; i < 8; i += 2)
						{
							foreach (int it in RebornStamp.TypeMap[(MainAttrType)curr.StampInfo[0]])
							{
								if (curr.StampInfo[i] == 0)
								{
									flag[temp] = true;
								}
								else if (curr.StampInfo[i] == it)
								{
									flag[temp] = true;
									break;
								}
							}
							temp++;
						}
					}
					if (MainAttr == 2 && RebornStamp.TypeMap.ContainsKey((MainAttrType)curr.StampInfo[8]))
					{
						for (i = 10; i < 16; i += 2)
						{
							foreach (int it in RebornStamp.TypeMap[(MainAttrType)curr.StampInfo[8]])
							{
								if (curr.StampInfo[i] == 0)
								{
									flag[temp] = true;
								}
								else if (curr.StampInfo[i] == it)
								{
									flag[temp] = true;
									break;
								}
							}
							temp++;
						}
					}
					bool[] array = flag;
					for (int k = 0; k < array.Length; k++)
					{
						if (!array[k])
						{
							Exist = false;
						}
					}
					result = Exist;
				}
			}
			return result;
		}

		
		public static int GetCurrMinorLevelItemID(RebornStampData dbInfo, int Index)
		{
			int result;
			if (dbInfo.StampInfo[Index] == 0)
			{
				result = 0;
			}
			else
			{
				result = RebornStamp.MinorYinJiLevelUp[dbInfo.StampInfo[Index]][dbInfo.StampInfo[Index + 1]];
			}
			return result;
		}

		
		public static int GetCurrMainLevelItemID(RebornStampData dbInfo, int Index)
		{
			int result;
			if (dbInfo.StampInfo[Index] == 0)
			{
				result = 0;
			}
			else
			{
				result = RebornStamp.CurrMainYinJi[(MainAttrType)dbInfo.StampInfo[Index]][dbInfo.StampInfo[Index + 1]];
			}
			return result;
		}

		
		public static int GetMainYinJiLevelUpNum(RebornStampData dbInfo, int Index)
		{
			int MainUpNum = 0;
			int result;
			if (Index != 0 && Index != 8)
			{
				result = MainUpNum;
			}
			else
			{
				int CurrID = RebornStamp.GetCurrMainLevelItemID(dbInfo, Index);
				if (Index == 0)
				{
					foreach (KeyValuePair<int, int> it in RebornStamp.MainYinJiLevelUp[(MainAttrType)dbInfo.StampInfo[Index]])
					{
						if (it.Value > CurrID)
						{
							if (dbInfo.StampInfo[3] >= it.Key && dbInfo.StampInfo[5] >= it.Key && dbInfo.StampInfo[7] >= it.Key)
							{
								MainUpNum++;
							}
							if (MainUpNum > 0 && (dbInfo.StampInfo[3] < it.Key || dbInfo.StampInfo[5] < it.Key || dbInfo.StampInfo[7] < it.Key))
							{
								break;
							}
						}
					}
				}
				else if (Index == 8)
				{
					foreach (KeyValuePair<int, int> it in RebornStamp.MainYinJiLevelUp[(MainAttrType)dbInfo.StampInfo[Index]])
					{
						if (it.Value > CurrID)
						{
							if (dbInfo.StampInfo[11] >= it.Key && dbInfo.StampInfo[13] >= it.Key && dbInfo.StampInfo[15] >= it.Key)
							{
								MainUpNum++;
							}
							if (MainUpNum > 0 && (dbInfo.StampInfo[11] < it.Key || dbInfo.StampInfo[13] < it.Key || dbInfo.StampInfo[15] < it.Key))
							{
								break;
							}
						}
					}
				}
				result = MainUpNum;
			}
			return result;
		}


    void IStateInterpolator<CharacterTransformInterpolatorData>.SetGoals(ref TimeStamped<CharacterTransformInterpolatorData> sample)
    {
        base.SetGoals(ref sample);
    }

    void IStateInterpolator<CharacterTransformInterpolatorData>.SetGoals(ref CharacterTransformInterpolatorData sample, ref double timeStamp)
    {
        base.SetGoals(ref sample, ref timeStamp);
    }

    public bool Sample(ref double time, out CharacterTransformInterpolatorData result)
    {
        int index;
        double timeStamp;
        int num3;
        int num4;
        switch (base.len)
        {
            case 0:
                result = new CharacterTransformInterpolatorData();
                return false;

            case 1:
                index = base.tbuffer[0].index;
                timeStamp = base.tbuffer[index].timeStamp;
                result = base.tbuffer[index].value;
                return true;

            default:
                num3 = 0;
                num4 = -1;
                break;
        }
    Label_006F:
        index = base.tbuffer[num3].index;
        timeStamp = base.tbuffer[index].timeStamp;
        if (timeStamp > time)
        {
            num4 = index;
            goto Label_0613;
        }
        if (timeStamp == time)
        {
            result = base.tbuffer[index].value;
            return true;
        }
        if (timeStamp >= time)
        {
            goto Label_0613;
        }
        if (num4 == -1)
        {
            if (base.extrapolate && (num3 < (base.len - 1)))
            {
                num4 = index;
                index = base.tbuffer[num3 + 1].index;
                double num5 = (timeStamp - base.tbuffer[index].timeStamp) / (timeStamp - base.tbuffer[index].timeStamp);
                switch (num5)
                {
                    case 0.0:
                        result = base.tbuffer[index].value;
                        goto Label_0611;

                    case 1.0:
                        result = base.tbuffer[num4].value;
                        goto Label_0611;
                }
                double num6 = 1.0 - num5;
                result.origin.x = (float) ((base.tbuffer[index].value.origin.x * num6) + (base.tbuffer[num4].value.origin.x * num5));
                result.origin.y = (float) ((base.tbuffer[index].value.origin.y * num6) + (base.tbuffer[num4].value.origin.y * num5));
                result.origin.z = (float) ((base.tbuffer[index].value.origin.z * num6) + (base.tbuffer[num4].value.origin.z * num5));
                result.eyesAngles = new Angle2();
                result.eyesAngles.yaw = base.tbuffer[index].value.eyesAngles.yaw + ((float) (Mathf.DeltaAngle(base.tbuffer[index].value.eyesAngles.yaw, base.tbuffer[num4].value.eyesAngles.yaw) * num5));
                result.eyesAngles.pitch = Mathf.DeltaAngle(0f, base.tbuffer[index].value.eyesAngles.pitch + ((float) (Mathf.DeltaAngle(base.tbuffer[index].value.eyesAngles.pitch, base.tbuffer[num4].value.eyesAngles.pitch) * num5)));
            }
            else
            {
                result = base.tbuffer[index].value;
            }
        }
        else
        {
            double num7 = base.tbuffer[num4].timeStamp;
            double num8 = base.allowableTimeSpan + NetCull.sendInterval;
            double num9 = num7 - timeStamp;
            if (num9 > num8)
            {
                timeStamp = num7 - (num9 = num8);
                if (timeStamp >= time)
                {
                    result = base.tbuffer[index].value;
                    return true;
                }
            }
            double num10 = (time - timeStamp) / num9;
            switch (num10)
            {
                case 0.0:
                    result = base.tbuffer[index].value;
                    goto Label_0611;

                case 1.0:
                    result = base.tbuffer[num4].value;
                    goto Label_0611;
            }
            double num11 = 1.0 - num10;
            result.origin.x = (float) ((base.tbuffer[index].value.origin.x * num11) + (base.tbuffer[num4].value.origin.x * num10));
            result.origin.y = (float) ((base.tbuffer[index].value.origin.y * num11) + (base.tbuffer[num4].value.origin.y * num10));
            result.origin.z = (float) ((base.tbuffer[index].value.origin.z * num11) + (base.tbuffer[num4].value.origin.z * num10));
            result.eyesAngles = new Angle2();
            result.eyesAngles.yaw = base.tbuffer[index].value.eyesAngles.yaw + ((float) (Mathf.DeltaAngle(base.tbuffer[index].value.eyesAngles.yaw, base.tbuffer[num4].value.eyesAngles.yaw) * num10));
            result.eyesAngles.pitch = Mathf.DeltaAngle(0f, base.tbuffer[index].value.eyesAngles.pitch + ((float) (Mathf.DeltaAngle(base.tbuffer[index].value.eyesAngles.pitch, base.tbuffer[num4].value.eyesAngles.pitch) * num10)));
        }
    Label_0611:
        return true;
    Label_0613:
        if (++num3 < base.len)
        {
            goto Label_006F;
        }
        result = base.tbuffer[base.tbuffer[base.len - 1].index].value;
        return true;
    }

    public bool SampleWorldVelocity(out Angle2 worldAngularVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldAngularVelocity);
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity);
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity, out Angle2 worldAngularVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity, out worldAngularVelocity);
    }

Aspose.Pdf.Facades.Stamp : Object

Constructors :

public Stamp()

Methods :

public Int32 get_StampId()
public Void set_StampId(Int32 value = )
public Int32 get_Quality()
public Void set_Quality(Int32 value = )
public Single get_Opacity()
public Void set_Opacity(Single value = )
public Int32 get_PageNumber()
public Void set_PageNumber(Int32 value = )
public Int32[] get_Pages()
public Void set_Pages(Int32[] value = )
public Single get_Rotation()
public Void set_Rotation(Single value = )
public Boolean get_IsBackground()
public Void set_IsBackground(Boolean value = )
public BlendingColorSpace get_BlendingSpace()
public Void set_BlendingSpace(BlendingColorSpace value = )
public Void BindPdf(String pdfFile = , Int32 pageNumber = )
public Void BindPdf(Stream pdfStream = , Int32 pageNumber = )
public Void BindImage(String imageFile = )
public Void BindLogo(FormattedText formattedText = )
public Void BindTextState(TextState textState = )
public Void SetOrigin(Single originX = , Single originY = )
public Void SetImageSize(Single width = , Single height = )
public Void BindImage(Stream image = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()

Stamp

Namespace: Aspose.PDF
We found 10 examples in language CSharp for this search. You will see 56 fragments of code.

		public TimeStamp Add(TimeSpan ts)
		{
			return Stamp + ts.TotalSeconds;
		}

		public TimeStamp Subtract(TimeSpan ts)
		{
			return Stamp - ts.TotalSeconds;
		}

		public override int GetHashCode()
		{
			return Stamp.GetHashCode();
		}

		public bool Equals(TimeStamp t)
		{
			return Stamp.Equals(t.Stamp);
		}

		public int CompareTo(TimeStamp t)
		{
			return Stamp.CompareTo(t.Stamp);
		}

		public override string ToString()
		{
			return String.Format("{0:F2}", Stamp);
		}

		
		public static RebornStamp getInstance()
		{
			return RebornStamp.instance;
		}

		
		public static bool ParseYinJiConfig()
		{
			string fileName = Global.GameResPath(RebornStampConsts.RebornStampZhu);
			XElement xml = XElement.Load(fileName);
			if (null == xml)
			{
				LogManager.WriteLog(LogTypes.Fatal, string.Format("加载系统xml配置文件:{0}, 失败。没有找到相关XML配置文件!", fileName), null, true);
			}
			try
			{
				Dictionary<MainAttrType, Dictionary<int, int>> CurrMainYinJiHot = new Dictionary<MainAttrType, Dictionary<int, int>>();
				Dictionary<MainAttrType, List<int>> TypeMapHot = new Dictionary<MainAttrType, List<int>>();
				Dictionary<int, ChongShengYinJiZhu> MainYinJiHot = new Dictionary<int, ChongShengYinJiZhu>();
				Dictionary<MainAttrType, Dictionary<int, int>> MainYinJiLevelUpHot = new Dictionary<MainAttrType, Dictionary<int, int>>();
				IEnumerable<XElement> xmlItems = xml.Elements();
				foreach (XElement xmlItem in xmlItems)
				{
					ChongShengYinJiZhu temp = new ChongShengYinJiZhu();
					List<int> TypeList = new List<int>();
					Dictionary<int, double> AttrList = new Dictionary<int, double>();
					temp.ItemID = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "ID"));
					temp.MainType = (MainAttrType)Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "TypeZhu"));
					temp.NeedLevel = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "NeedLevel"));
					string[] arrType = Global.GetSafeAttributeStr(xmlItem, "TypeFu").Split(new char[]
					{
						','
					});
					for (int i = 0; i < arrType.Length; i++)
					{
						TypeList.Add(Convert.ToInt32(arrType[i]));
					}
					temp.MinorType = TypeList;
					temp.Level = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "Level"));
					string[] arrAttr = Global.GetSafeAttributeStr(xmlItem, "ShuXing").Split(new char[]
					{
						'|'
					});
					for (int i = 0; i < arrAttr.Length; i++)
					{
						AttrList.Add((int)ConfigParser.GetPropIndexByPropName(arrAttr[i].Split(new char[]
						{
							','
						})[0]), Convert.ToDouble(arrAttr[i].Split(new char[]
						{
							','
						})[1]));
					}
					temp.AttrList = AttrList;
					MainYinJiHot.Add(temp.ItemID, temp);
					if (CurrMainYinJiHot.ContainsKey(temp.MainType))
					{
						CurrMainYinJiHot[temp.MainType].Add(temp.Level, temp.ItemID);
					}
					else
					{
						Dictionary<int, int> dict = new Dictionary<int, int>();
						dict.Add(temp.Level, temp.ItemID);
						CurrMainYinJiHot.Add(temp.MainType, dict);
					}
					if (MainYinJiLevelUpHot.ContainsKey(temp.MainType))
					{
						MainYinJiLevelUpHot[temp.MainType].Add(temp.NeedLevel, temp.ItemID);
					}
					else
					{
						Dictionary<int, int> dict = new Dictionary<int, int>();
						dict.Add(temp.NeedLevel, temp.ItemID);
						MainYinJiLevelUpHot.Add(temp.MainType, dict);
					}
					if (!TypeMapHot.ContainsKey(temp.MainType))
					{
						TypeMapHot.Add(temp.MainType, TypeList);
					}
				}
				RebornStamp.CurrMainYinJi = CurrMainYinJiHot;
				RebornStamp.TypeMap = TypeMapHot;
				RebornStamp.MainYinJi = MainYinJiHot;
				RebornStamp.MainYinJiLevelUp = MainYinJiLevelUpHot;
				if (RebornStamp.CurrMainYinJi == null || RebornStamp.TypeMap == null || RebornStamp.MainYinJi == null || RebornStamp.MainYinJiLevelUp == null)
				{
					return false;
				}
			}
			catch (Exception ex)
			{
				LogManager.WriteException(ex.ToString());
			}
			fileName = Global.GameResPath(RebornStampConsts.RebornStampZi);
			xml = XElement.Load(fileName);
			if (null == xml)
			{
				LogManager.WriteLog(LogTypes.Fatal, string.Format("加载系统xml配置文件:{0}, 失败。没有找到相关XML配置文件!", fileName), null, true);
			}
			try
			{
				Dictionary<int, Dictionary<int, int>> MinorYinJiLevelUpHot = new Dictionary<int, Dictionary<int, int>>();
				Dictionary<int, int> MinorLevelLimitHot = new Dictionary<int, int>();
				Dictionary<int, ChongShengYinJiZi> MinorYinJiHot = new Dictionary<int, ChongShengYinJiZi>();
				IEnumerable<XElement> xmlItems = xml.Elements();
				foreach (XElement xmlItem in xmlItems)
				{
					ChongShengYinJiZi temp2 = new ChongShengYinJiZi();
					List<int> TypeList = new List<int>();
					Dictionary<int, double> AttrList = new Dictionary<int, double>();
					temp2.ItemID = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "ID"));
					temp2.MinorType = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "Type"));
					temp2.Level = Convert.ToInt32(Global.GetSafeAttributeStr(xmlItem, "Level"));
					string[] arrAttr = Global.GetSafeAttributeStr(xmlItem, "ShuXing").Split(new char[]
					{
						'|'
					});
					for (int i = 0; i < arrAttr.Length; i++)
					{
						string[] str = arrAttr[i].Split(new char[]
						{
							','
						});
						if (str.Length == 1)
						{
							AttrList.Add(0, 0.0);
						}
						else
						{
							AttrList.Add((int)ConfigParser.GetPropIndexByPropName(str[0]), Convert.ToDouble(str[1]));
						}
					}
					temp2.AttrList = AttrList;
					MinorYinJiHot.Add(temp2.ItemID, temp2);
					if (MinorLevelLimitHot.ContainsKey(temp2.MinorType))
					{
						if (MinorLevelLimitHot[temp2.MinorType] < temp2.Level)
						{
							MinorLevelLimitHot[temp2.MinorType] = temp2.Level;
						}
					}
					else
					{
						MinorLevelLimitHot.Add(temp2.MinorType, temp2.Level);
					}
					if (MinorYinJiLevelUpHot.ContainsKey(temp2.MinorType))
					{
						MinorYinJiLevelUpHot[temp2.MinorType].Add(temp2.Level, temp2.ItemID);
					}
					else
					{
						Dictionary<int, int> dict = new Dictionary<int, int>();
						dict.Add(temp2.Level, temp2.ItemID);
						MinorYinJiLevelUpHot.Add(temp2.MinorType, dict);
					}
				}
				RebornStamp.MinorYinJiLevelUp = MinorYinJiLevelUpHot;
				RebornStamp.MinorLevelLimit = MinorLevelLimitHot;
				RebornStamp.MinorYinJi = MinorYinJiHot;
				if (RebornStamp.MinorYinJiLevelUp == null || RebornStamp.MinorLevelLimit == null || RebornStamp.MinorYinJi == null)
				{
					return false;
				}
			}
			catch (Exception ex)
			{
				LogManager.WriteException(ex.ToString());
			}
			List<int> YinJiResetHot = new List<int>();
			int[] num = GameManager.systemParamsList.GetParamValueIntArrayByName("ChongShengYinJiChongZhi", ',');
			foreach (int it in num)
			{
				YinJiResetHot.Add(it);
			}
			RebornStamp.YinJiReset = YinJiResetHot;
			return RebornStamp.YinJiReset != null;
		}

		
		public static bool CheckTypeMatch(RebornStampData curr, int StampID, int StampType, out int Index, out int MainAttr)
		{
			Index = 0;
			MainAttr = 0;
			bool result;
			if (curr == null || curr.StampInfo == null || curr.StampInfo.Count < 0 || curr.StampInfo.Count > 16)
			{
				result = false;
			}
			else if (!RebornStamp.TypeMap.ContainsKey((MainAttrType)curr.StampInfo[0]) || !RebornStamp.TypeMap.ContainsKey((MainAttrType)curr.StampInfo[8]))
			{
				result = false;
			}
			else if (!RebornStamp.MinorYinJi.ContainsKey(StampID) || RebornStamp.MinorYinJi[StampID].MinorType != StampType)
			{
				result = false;
			}
			else
			{
				bool Exist = false;
				int i = 2;
				int j = 10;
				while (i < 8)
				{
					if (StampType == curr.StampInfo[i])
					{
						Exist = true;
						MainAttr = 1;
						Index = i;
						break;
					}
					if (StampType == curr.StampInfo[j])
					{
						Exist = true;
						MainAttr = 2;
						Index = j;
						break;
					}
					i += 2;
					j += 2;
				}
				if (!Exist)
				{
					result = false;
				}
				else
				{
					int temp = 0;
					bool[] flag = new bool[3];
					if (MainAttr == 1 && RebornStamp.TypeMap.ContainsKey((MainAttrType)curr.StampInfo[0]))
					{
						for (i = 2; i < 8; i += 2)
						{
							foreach (int it in RebornStamp.TypeMap[(MainAttrType)curr.StampInfo[0]])
							{
								if (curr.StampInfo[i] == 0)
								{
									flag[temp] = true;
								}
								else if (curr.StampInfo[i] == it)
								{
									flag[temp] = true;
									break;
								}
							}
							temp++;
						}
					}
					if (MainAttr == 2 && RebornStamp.TypeMap.ContainsKey((MainAttrType)curr.StampInfo[8]))
					{
						for (i = 10; i < 16; i += 2)
						{
							foreach (int it in RebornStamp.TypeMap[(MainAttrType)curr.StampInfo[8]])
							{
								if (curr.StampInfo[i] == 0)
								{
									flag[temp] = true;
								}
								else if (curr.StampInfo[i] == it)
								{
									flag[temp] = true;
									break;
								}
							}
							temp++;
						}
					}
					bool[] array = flag;
					for (int k = 0; k < array.Length; k++)
					{
						if (!array[k])
						{
							Exist = false;
						}
					}
					result = Exist;
				}
			}
			return result;
		}

		
		public static int GetCurrMinorLevelItemID(RebornStampData dbInfo, int Index)
		{
			int result;
			if (dbInfo.StampInfo[Index] == 0)
			{
				result = 0;
			}
			else
			{
				result = RebornStamp.MinorYinJiLevelUp[dbInfo.StampInfo[Index]][dbInfo.StampInfo[Index + 1]];
			}
			return result;
		}

		
		public static int GetCurrMainLevelItemID(RebornStampData dbInfo, int Index)
		{
			int result;
			if (dbInfo.StampInfo[Index] == 0)
			{
				result = 0;
			}
			else
			{
				result = RebornStamp.CurrMainYinJi[(MainAttrType)dbInfo.StampInfo[Index]][dbInfo.StampInfo[Index + 1]];
			}
			return result;
		}

		
		public static int GetMainYinJiLevelUpNum(RebornStampData dbInfo, int Index)
		{
			int MainUpNum = 0;
			int result;
			if (Index != 0 && Index != 8)
			{
				result = MainUpNum;
			}
			else
			{
				int CurrID = RebornStamp.GetCurrMainLevelItemID(dbInfo, Index);
				if (Index == 0)
				{
					foreach (KeyValuePair<int, int> it in RebornStamp.MainYinJiLevelUp[(MainAttrType)dbInfo.StampInfo[Index]])
					{
						if (it.Value > CurrID)
						{
							if (dbInfo.StampInfo[3] >= it.Key && dbInfo.StampInfo[5] >= it.Key && dbInfo.StampInfo[7] >= it.Key)
							{
								MainUpNum++;
							}
							if (MainUpNum > 0 && (dbInfo.StampInfo[3] < it.Key || dbInfo.StampInfo[5] < it.Key || dbInfo.StampInfo[7] < it.Key))
							{
								break;
							}
						}
					}
				}
				else if (Index == 8)
				{
					foreach (KeyValuePair<int, int> it in RebornStamp.MainYinJiLevelUp[(MainAttrType)dbInfo.StampInfo[Index]])
					{
						if (it.Value > CurrID)
						{
							if (dbInfo.StampInfo[11] >= it.Key && dbInfo.StampInfo[13] >= it.Key && dbInfo.StampInfo[15] >= it.Key)
							{
								MainUpNum++;
							}
							if (MainUpNum > 0 && (dbInfo.StampInfo[11] < it.Key || dbInfo.StampInfo[13] < it.Key || dbInfo.StampInfo[15] < it.Key))
							{
								break;
							}
						}
					}
				}
				result = MainUpNum;
			}
			return result;
		}


    void IStateInterpolator<PosRot>.SetGoals(ref TimeStamped<PosRot> sample)
    {
        base.SetGoals(ref sample);
    }

    public bool Sample(ref double time, out PosRot result)
    {
        int num;
        double timeStamp;
        switch (base.len)
        {
            case 0:
                result = new PosRot();
                return false;

            case 1:
                num = base.tbuffer[0].index;
                timeStamp = base.tbuffer[num].timeStamp;
                result = base.tbuffer[num].value;
                return true;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            num = base.tbuffer[index].index;
            timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (timeStamp == time)
                {
                    result = base.tbuffer[num].value;
                    return true;
                }
                if (timeStamp < time)
                {
                    if (num4 == -1)
                    {
                        if (this.exterpolate && (index < (base.len - 1)))
                        {
                            num4 = num;
                            num = base.tbuffer[index + 1].index;
                            double t = (time - base.tbuffer[num].timeStamp) / (base.tbuffer[num4].timeStamp - base.tbuffer[num].timeStamp);
                            PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, t, out result);
                        }
                        else
                        {
                            result = base.tbuffer[num].value;
                        }
                    }
                    else
                    {
                        double num6 = base.tbuffer[num4].timeStamp;
                        double num7 = this.allowDifference + NetCull.sendInterval;
                        double num8 = num6 - timeStamp;
                        if (num8 > num7)
                        {
                            timeStamp = num6 - (num8 = num7);
                            if (timeStamp >= time)
                            {
                                result = base.tbuffer[num].value;
                                return true;
                            }
                        }
                        double num9 = (time - timeStamp) / num8;
                        PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, num9, out result);
                    }
                    return true;
                }
            }
        }
        while (++index < base.len);
        result = base.tbuffer[base.tbuffer[base.len - 1].index].value;
        return true;
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity);
    }

    public bool SampleWorldVelocity(double time, out Vector3 worldLinearVelocity)
    {
        switch (base.len)
        {
            case 0:
            case 1:
                worldLinearVelocity = new Vector3();
                return false;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            int num = base.tbuffer[index].index;
            double timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (num4 == -1)
                {
                    worldLinearVelocity = new Vector3();
                    return false;
                }
                double num5 = base.tbuffer[num4].timeStamp;
                double num6 = this.allowDifference + NetCull.sendInterval;
                double num7 = num5 - timeStamp;
                if (num7 >= num6)
                {
                    num7 = num6;
                    timeStamp = num5 - num7;
                    if (time <= timeStamp)
                    {
                        worldLinearVelocity = new Vector3();
                        return false;
                    }
                }
                worldLinearVelocity = base.tbuffer[num4].value.position - base.tbuffer[num].value.position;
                worldLinearVelocity.x = (float) (((double) worldLinearVelocity.x) / num7);
                worldLinearVelocity.y = (float) (((double) worldLinearVelocity.y) / num7);
                worldLinearVelocity.z = (float) (((double) worldLinearVelocity.z) / num7);
                return true;
            }
        }
        while (++index < base.len);
        worldLinearVelocity = new Vector3();
        return false;
    }

    public void SetGoals(PosRot frame, double timestamp)
    {
        this.SetGoals(ref frame, ref timestamp);
    }

    public sealed override void SetGoals(Vector3 pos, Quaternion rot, double timestamp)
    {
        PosRot rot2;
        rot2.position = pos;
        rot2.rotation = rot;
        this.SetGoals(ref rot2, ref timestamp);
    }


    void IStateInterpolator<PosRot>.SetGoals(ref TimeStamped<PosRot> sample)
    {
        base.SetGoals(ref sample);
    }

    public bool Sample(ref double time, out PosRot result)
    {
        int num;
        double timeStamp;
        switch (base.len)
        {
            case 0:
                result = new PosRot();
                return false;

            case 1:
                num = base.tbuffer[0].index;
                timeStamp = base.tbuffer[num].timeStamp;
                result = base.tbuffer[num].value;
                return true;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            num = base.tbuffer[index].index;
            timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (timeStamp == time)
                {
                    result = base.tbuffer[num].value;
                    return true;
                }
                if (timeStamp < time)
                {
                    if (num4 == -1)
                    {
                        if (this.exterpolate && (index < (base.len - 1)))
                        {
                            num4 = num;
                            num = base.tbuffer[index + 1].index;
                            double t = (time - base.tbuffer[num].timeStamp) / (base.tbuffer[num4].timeStamp - base.tbuffer[num].timeStamp);
                            PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, t, out result);
                        }
                        else
                        {
                            result = base.tbuffer[num].value;
                        }
                    }
                    else
                    {
                        double num6 = base.tbuffer[num4].timeStamp;
                        double num7 = this.allowDifference + NetCull.sendInterval;
                        double num8 = num6 - timeStamp;
                        if (num8 > num7)
                        {
                            timeStamp = num6 - (num8 = num7);
                            if (timeStamp >= time)
                            {
                                result = base.tbuffer[num].value;
                                return true;
                            }
                        }
                        double num9 = (time - timeStamp) / num8;
                        PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, num9, out result);
                    }
                    return true;
                }
            }
        }
        while (++index < base.len);
        result = base.tbuffer[base.tbuffer[base.len - 1].index].value;
        return true;
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity);
    }

    public bool SampleWorldVelocity(double time, out Vector3 worldLinearVelocity)
    {
        switch (base.len)
        {
            case 0:
            case 1:
                worldLinearVelocity = new Vector3();
                return false;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            int num = base.tbuffer[index].index;
            double timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (num4 == -1)
                {
                    worldLinearVelocity = new Vector3();
                    return false;
                }
                double num5 = base.tbuffer[num4].timeStamp;
                double num6 = this.allowDifference + NetCull.sendInterval;
                double num7 = num5 - timeStamp;
                if (num7 >= num6)
                {
                    num7 = num6;
                    timeStamp = num5 - num7;
                    if (time <= timeStamp)
                    {
                        worldLinearVelocity = new Vector3();
                        return false;
                    }
                }
                worldLinearVelocity = base.tbuffer[num4].value.position - base.tbuffer[num].value.position;
                worldLinearVelocity.x = (float) (((double) worldLinearVelocity.x) / num7);
                worldLinearVelocity.y = (float) (((double) worldLinearVelocity.y) / num7);
                worldLinearVelocity.z = (float) (((double) worldLinearVelocity.z) / num7);
                return true;
            }
        }
        while (++index < base.len);
        worldLinearVelocity = new Vector3();
        return false;
    }

    public void SetGoals(PosRot frame, double timestamp)
    {
        this.SetGoals(ref frame, ref timestamp);
    }

    public sealed override void SetGoals(Vector3 pos, Quaternion rot, double timestamp)
    {
        PosRot rot2;
        rot2.position = pos;
        rot2.rotation = rot;
        this.SetGoals(ref rot2, ref timestamp);
    }


    void IStateInterpolator<PosRot>.SetGoals(ref TimeStamped<PosRot> sample)
    {
        base.SetGoals(ref sample);
    }

    public bool Sample(ref double time, out PosRot result)
    {
        int num;
        double timeStamp;
        switch (base.len)
        {
            case 0:
                result = new PosRot();
                return false;

            case 1:
                num = base.tbuffer[0].index;
                timeStamp = base.tbuffer[num].timeStamp;
                result = base.tbuffer[num].value;
                return true;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            num = base.tbuffer[index].index;
            timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (timeStamp == time)
                {
                    result = base.tbuffer[num].value;
                    return true;
                }
                if (timeStamp < time)
                {
                    if (num4 == -1)
                    {
                        if (this.exterpolate && (index < (base.len - 1)))
                        {
                            num4 = num;
                            num = base.tbuffer[index + 1].index;
                            double t = (time - base.tbuffer[num].timeStamp) / (base.tbuffer[num4].timeStamp - base.tbuffer[num].timeStamp);
                            PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, t, out result);
                        }
                        else
                        {
                            result = base.tbuffer[num].value;
                        }
                    }
                    else
                    {
                        double num6 = base.tbuffer[num4].timeStamp;
                        double num7 = this.allowDifference + NetCull.sendInterval;
                        double num8 = num6 - timeStamp;
                        if (num8 > num7)
                        {
                            timeStamp = num6 - (num8 = num7);
                            if (timeStamp >= time)
                            {
                                result = base.tbuffer[num].value;
                                return true;
                            }
                        }
                        double num9 = (time - timeStamp) / num8;
                        PosRot.Lerp(ref base.tbuffer[num].value, ref base.tbuffer[num4].value, num9, out result);
                    }
                    return true;
                }
            }
        }
        while (++index < base.len);
        result = base.tbuffer[base.tbuffer[base.len - 1].index].value;
        return true;
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity);
    }

    public bool SampleWorldVelocity(double time, out Vector3 worldLinearVelocity)
    {
        switch (base.len)
        {
            case 0:
            case 1:
                worldLinearVelocity = new Vector3();
                return false;
        }
        int index = 0;
        int num4 = -1;
        do
        {
            int num = base.tbuffer[index].index;
            double timeStamp = base.tbuffer[num].timeStamp;
            if (timeStamp > time)
            {
                num4 = num;
            }
            else
            {
                if (num4 == -1)
                {
                    worldLinearVelocity = new Vector3();
                    return false;
                }
                double num5 = base.tbuffer[num4].timeStamp;
                double num6 = this.allowDifference + NetCull.sendInterval;
                double num7 = num5 - timeStamp;
                if (num7 >= num6)
                {
                    num7 = num6;
                    timeStamp = num5 - num7;
                    if (time <= timeStamp)
                    {
                        worldLinearVelocity = new Vector3();
                        return false;
                    }
                }
                worldLinearVelocity = base.tbuffer[num4].value.position - base.tbuffer[num].value.position;
                worldLinearVelocity.x = (float) (((double) worldLinearVelocity.x) / num7);
                worldLinearVelocity.y = (float) (((double) worldLinearVelocity.y) / num7);
                worldLinearVelocity.z = (float) (((double) worldLinearVelocity.z) / num7);
                return true;
            }
        }
        while (++index < base.len);
        worldLinearVelocity = new Vector3();
        return false;
    }

    public void SetGoals(PosRot frame, double timestamp)
    {
        this.SetGoals(ref frame, ref timestamp);
    }

    public sealed override void SetGoals(Vector3 pos, Quaternion rot, double timestamp)
    {
        PosRot rot2;
        rot2.position = pos;
        rot2.rotation = rot;
        this.SetGoals(ref rot2, ref timestamp);
    }

		[Description("6.1. Add rotated Draft stamp from a standard collection by Stamp ID")]
		static public void AddStandardStampByID(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampsManager stampManager = Parent.m_pxcInst.StampsManager;
			IPXC_StampInfo si = stampManager.FindStamp("Draft");
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;
			rc.left = rcPB.left - nWidth / 2.0 + nHeight / 2.0;
			rc.right = rcPB.left + nWidth / 2.0 + nHeight / 2.0;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nWidth;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.Rotation = 90;
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}

		[Description("6.2. Add Expired stamp from a standard collection by index in collection")]
		static public void AddStandardStampByIndexInCollection(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampsManager stampManager = Parent.m_pxcInst.StampsManager;
			uint nColIndex = (uint)stampManager.FindCollection("Standard");
			IPXC_StampsCollection sc = stampManager[nColIndex];
			IPXC_StampInfo si = null;
			for (uint i = 0; i < sc.Count; i++)
			{
				if (sc[i].ID == "Expired")
				{
					si = sc[i];
					break;
				}
			}
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;
			rc.left = 0;
			rc.right = nWidth;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}

		[Description("6.3. Load stamps collection from stamp file and place stamp from it")]
		static public void LoadStampsCollectionFromFile(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);

			//Loading stamp collection from stamp file
			IAFS_Inst afsInst = (IAFS_Inst)Parent.m_pxcInst.GetExtension("AFS");
			string sPath = System.Environment.CurrentDirectory + "\\Documents\\MyStamps.pdf";
			IAFS_Name name = afsInst.DefaultFileSys.StringToName(sPath);
			int openFileFlags = (int)(AFS_OpenFileFlags.AFS_OpenFile_Read | AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
			IAFS_File destFile = afsInst.DefaultFileSys.OpenFile(name, openFileFlags);
			IPXC_StampsCollection sc = Parent.m_pxcInst.StampsManager.LoadCollection(destFile);

			//Placing stamp from the loaded collection
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampInfo si = sc[0]; //getting stamp by index - they are sorted by name
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;//Annotation rectangle
			rc.left = 0;
			rc.right = nWidth;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.set_BBox(rc); //Stamp rectangle boundaries
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}
		[Description("6.4. Load stamp from image file")]
		static public void LoadStampFromTheImageFile(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);

			//Loading image file
			IAFS_Inst afsInst = (IAFS_Inst)Parent.m_pxcInst.GetExtension("AFS");
			string sPath = System.Environment.CurrentDirectory + "\\Images\\run_24.png";
			IAFS_Name name = afsInst.DefaultFileSys.StringToName(sPath);
			int openFileFlags = (int)(AFS_OpenFileFlags.AFS_OpenFile_Read | AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
			IAFS_File destFile = afsInst.DefaultFileSys.OpenFile(name, openFileFlags);
			//Creating new collection
			IPXC_StampsCollection sc = Parent.m_pxcInst.StampsManager.CreateEmptyCollection("My Stamps");

			IPXC_StampInfo si = sc.AddStamp(destFile, "My Stamp");
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			//Increasing width and height by 20
			PXC_Rect rc; //Annotation rectangle
			rc.left = 0;
			rc.right = nWidth * 20;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight * 20;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.set_BBox(rc); //Stamp rectangle boundaries
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}

		[Description("6.1. Add rotated Draft stamp from a standard collection by Stamp ID")]
		static public void AddStandardStampByID(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampsManager stampManager = Parent.m_pxcInst.StampsManager;
			IPXC_StampInfo si = stampManager.FindStamp("Draft");
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;
			rc.left = rcPB.left - nWidth / 2.0 + nHeight / 2.0;
			rc.right = rcPB.left + nWidth / 2.0 + nHeight / 2.0;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nWidth;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.Rotation = 90;
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}

		[Description("6.2. Add Expired stamp from a standard collection by index in collection")]
		static public void AddStandardStampByIndexInCollection(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampsManager stampManager = Parent.m_pxcInst.StampsManager;
			uint nColIndex = (uint)stampManager.FindCollection("Standard");
			IPXC_StampsCollection sc = stampManager[nColIndex];
			IPXC_StampInfo si = null;
			for (uint i = 0; i < sc.Count; i++)
			{
				if (sc[i].ID == "Expired")
				{
					si = sc[i];
					break;
				}
			}
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;
			rc.left = 0;
			rc.right = nWidth;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}

		[Description("6.3. Load stamps collection from stamp file and place stamp from it")]
		static public void LoadStampsCollectionFromFile(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);

			//Loading stamp collection from stamp file
			IAFS_Inst afsInst = (IAFS_Inst)Parent.m_pxcInst.GetExtension("AFS");
			string sPath = System.Environment.CurrentDirectory + "\\Documents\\MyStamps.pdf";
			IAFS_Name name = afsInst.DefaultFileSys.StringToName(sPath);
			int openFileFlags = (int)(AFS_OpenFileFlags.AFS_OpenFile_Read | AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
			IAFS_File destFile = afsInst.DefaultFileSys.OpenFile(name, openFileFlags);
			IPXC_StampsCollection sc = Parent.m_pxcInst.StampsManager.LoadCollection(destFile);

			//Placing stamp from the loaded collection
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			IPXC_StampInfo si = sc[0]; //getting stamp by index - they are sorted by name
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			PXC_Rect rc;//Annotation rectangle
			rc.left = 0;
			rc.right = nWidth;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.set_BBox(rc); //Stamp rectangle boundaries
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}
		[Description("6.4. Load stamp from image file")]
		static public void LoadStampFromTheImageFile(Form1 Parent)
		{
			if (Parent.m_CurDoc == null)
				Document.CreateNewDoc(Parent);

			//Loading image file
			IAFS_Inst afsInst = (IAFS_Inst)Parent.m_pxcInst.GetExtension("AFS");
			string sPath = System.Environment.CurrentDirectory + "\\Images\\run_24.png";
			IAFS_Name name = afsInst.DefaultFileSys.StringToName(sPath);
			int openFileFlags = (int)(AFS_OpenFileFlags.AFS_OpenFile_Read | AFS_OpenFileFlags.AFS_OpenFile_ShareRead);
			IAFS_File destFile = afsInst.DefaultFileSys.OpenFile(name, openFileFlags);
			//Creating new collection
			IPXC_StampsCollection sc = Parent.m_pxcInst.StampsManager.CreateEmptyCollection("My Stamps");

			IPXC_StampInfo si = sc.AddStamp(destFile, "My Stamp");
			IPXC_Pages pages = Parent.m_CurDoc.Pages;
			IPXC_Page firstPage = pages[0];
			PXC_Rect rcPB = firstPage.get_Box(PXC_BoxType.PBox_PageBox);
			//Creating stamp annotation
			IPXS_Inst pSInt = (IPXS_Inst)Parent.m_pxcInst.GetExtension("PXS");
			uint nStamp = pSInt.StrToAtom("Stamp");
			double nHeight = 0;
			double nWidth = 0;
			si.GetSize(out nWidth, out nHeight);
			//Increasing width and height by 20
			PXC_Rect rc; //Annotation rectangle
			rc.left = 0;
			rc.right = nWidth * 20;
			rc.top = rcPB.top;
			rc.bottom = rc.top - nHeight * 20;
			IPXC_Annotation annot = firstPage.InsertNewAnnot(nStamp, ref rc, 0);
			IPXC_AnnotData_Stamp stampData = (IPXC_AnnotData_Stamp)annot.Data;
			stampData.set_BBox(rc); //Stamp rectangle boundaries
			stampData.SetStampName(si.ID);
			annot.Data = stampData;
			Marshal.ReleaseComObject(firstPage);
			Marshal.ReleaseComObject(pages);
		}

        #endregion // Constructors

        #region Methods
        public bool Equals(DateTime dateTime)
        {
            return (this.GetTimeStamp().Equals(dateTime.GetTimeStamp()) && (this.GetFractionalTimeStamp().Equals(dateTime.GetFractionalTimeStamp())));
        }

        public uint GetTimeStamp()
        {
            return timeStamp;
        }

        public double GetFractionalTimeStamp()
        {
            return fractionalTimeStamp;
        }

        public void ConvertSystemTimeToUTC(uint systemTimeOffset)
        {
            if (timeStamp < min)
            {
                timeStamp += systemTimeOffset;
            }
        }

        public System.DateTime GetDateTime()
        {
            return System.DateTime.SpecifyKind(new System.DateTime(timeStamp * 10000000L + offset.Ticks + (long)(fractionalTimeStamp * 10000000L)), DateTimeKind.Utc);
        }

        new public string ToString()
        {
            return GetDateTime().ToString();
        }


    void IStateInterpolator<CharacterTransformInterpolatorData>.SetGoals(ref TimeStamped<CharacterTransformInterpolatorData> sample)
    {
        base.SetGoals(ref sample);
    }

    void IStateInterpolator<CharacterTransformInterpolatorData>.SetGoals(ref CharacterTransformInterpolatorData sample, ref double timeStamp)
    {
        base.SetGoals(ref sample, ref timeStamp);
    }

    public bool Sample(ref double time, out CharacterTransformInterpolatorData result)
    {
        int index;
        double timeStamp;
        int num3;
        int num4;
        switch (base.len)
        {
            case 0:
                result = new CharacterTransformInterpolatorData();
                return false;

            case 1:
                index = base.tbuffer[0].index;
                timeStamp = base.tbuffer[index].timeStamp;
                result = base.tbuffer[index].value;
                return true;

            default:
                num3 = 0;
                num4 = -1;
                break;
        }
    Label_006F:
        index = base.tbuffer[num3].index;
        timeStamp = base.tbuffer[index].timeStamp;
        if (timeStamp > time)
        {
            num4 = index;
            goto Label_0613;
        }
        if (timeStamp == time)
        {
            result = base.tbuffer[index].value;
            return true;
        }
        if (timeStamp >= time)
        {
            goto Label_0613;
        }
        if (num4 == -1)
        {
            if (base.extrapolate && (num3 < (base.len - 1)))
            {
                num4 = index;
                index = base.tbuffer[num3 + 1].index;
                double num5 = (timeStamp - base.tbuffer[index].timeStamp) / (timeStamp - base.tbuffer[index].timeStamp);
                switch (num5)
                {
                    case 0.0:
                        result = base.tbuffer[index].value;
                        goto Label_0611;

                    case 1.0:
                        result = base.tbuffer[num4].value;
                        goto Label_0611;
                }
                double num6 = 1.0 - num5;
                result.origin.x = (float) ((base.tbuffer[index].value.origin.x * num6) + (base.tbuffer[num4].value.origin.x * num5));
                result.origin.y = (float) ((base.tbuffer[index].value.origin.y * num6) + (base.tbuffer[num4].value.origin.y * num5));
                result.origin.z = (float) ((base.tbuffer[index].value.origin.z * num6) + (base.tbuffer[num4].value.origin.z * num5));
                result.eyesAngles = new Angle2();
                result.eyesAngles.yaw = base.tbuffer[index].value.eyesAngles.yaw + ((float) (Mathf.DeltaAngle(base.tbuffer[index].value.eyesAngles.yaw, base.tbuffer[num4].value.eyesAngles.yaw) * num5));
                result.eyesAngles.pitch = Mathf.DeltaAngle(0f, base.tbuffer[index].value.eyesAngles.pitch + ((float) (Mathf.DeltaAngle(base.tbuffer[index].value.eyesAngles.pitch, base.tbuffer[num4].value.eyesAngles.pitch) * num5)));
            }
            else
            {
                result = base.tbuffer[index].value;
            }
        }
        else
        {
            double num7 = base.tbuffer[num4].timeStamp;
            double num8 = base.allowableTimeSpan + NetCull.sendInterval;
            double num9 = num7 - timeStamp;
            if (num9 > num8)
            {
                timeStamp = num7 - (num9 = num8);
                if (timeStamp >= time)
                {
                    result = base.tbuffer[index].value;
                    return true;
                }
            }
            double num10 = (time - timeStamp) / num9;
            switch (num10)
            {
                case 0.0:
                    result = base.tbuffer[index].value;
                    goto Label_0611;

                case 1.0:
                    result = base.tbuffer[num4].value;
                    goto Label_0611;
            }
            double num11 = 1.0 - num10;
            result.origin.x = (float) ((base.tbuffer[index].value.origin.x * num11) + (base.tbuffer[num4].value.origin.x * num10));
            result.origin.y = (float) ((base.tbuffer[index].value.origin.y * num11) + (base.tbuffer[num4].value.origin.y * num10));
            result.origin.z = (float) ((base.tbuffer[index].value.origin.z * num11) + (base.tbuffer[num4].value.origin.z * num10));
            result.eyesAngles = new Angle2();
            result.eyesAngles.yaw = base.tbuffer[index].value.eyesAngles.yaw + ((float) (Mathf.DeltaAngle(base.tbuffer[index].value.eyesAngles.yaw, base.tbuffer[num4].value.eyesAngles.yaw) * num10));
            result.eyesAngles.pitch = Mathf.DeltaAngle(0f, base.tbuffer[index].value.eyesAngles.pitch + ((float) (Mathf.DeltaAngle(base.tbuffer[index].value.eyesAngles.pitch, base.tbuffer[num4].value.eyesAngles.pitch) * num10)));
        }
    Label_0611:
        return true;
    Label_0613:
        if (++num3 < base.len)
        {
            goto Label_006F;
        }
        result = base.tbuffer[base.tbuffer[base.len - 1].index].value;
        return true;
    }

    public bool SampleWorldVelocity(out Angle2 worldAngularVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldAngularVelocity);
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity);
    }

    public bool SampleWorldVelocity(out Vector3 worldLinearVelocity, out Angle2 worldAngularVelocity)
    {
        return this.SampleWorldVelocity(Interpolation.time, out worldLinearVelocity, out worldAngularVelocity);
    }


        public static TimeSpan Elapsed(DateTime dateTimeStart, DateTime dateTimeEnd)
        {
            return dateTimeEnd.ToUniversalTime().Subtract(dateTimeStart.ToUniversalTime());
        }

        public static TimeSpan Elapsed(int timeStampStart, int timeStampEnd)
        {
            return TimeSpan.FromSeconds((double) (timeStampEnd - timeStampStart));
        }

        public static TimeSpan Elapsed(TimeSpan sinceEpochStart, TimeSpan sinceEpochEnd)
        {
            return sinceEpochEnd.Subtract(sinceEpochStart);
        }

        public static double ElapsedSeconds(DateTime dateTimeStart, DateTime dateTimeEnd)
        {
            return dateTimeEnd.ToUniversalTime().Subtract(dateTimeStart.ToUniversalTime()).TotalSeconds;
        }

        public static double ElapsedSeconds(int timeStampStart, int timeStampEnd)
        {
            return TimeSpan.FromSeconds((double) (timeStampEnd - timeStampStart)).TotalSeconds;
        }

        public static double ElapsedSeconds(TimeSpan sinceEpochStart, TimeSpan sinceEpochEnd)
        {
            return sinceEpochEnd.Subtract(sinceEpochStart).TotalSeconds;
        }

Aspose.Pdf.Stamp : Object

Methods :

public Boolean get_Background()
public Void set_Background(Boolean value = )
public Double get_Opacity()
public Void set_Opacity(Double value = )
public Double get_OutlineOpacity()
public Void set_OutlineOpacity(Double value = )
public Double get_OutlineWidth()
public Void set_OutlineWidth(Double value = )
public Rotation get_Rotate()
public Void set_Rotate(Rotation value = )
public Double get_XIndent()
public Void set_XIndent(Double value = )
public Double get_YIndent()
public Void set_YIndent(Double value = )
public HorizontalAlignment get_HorizontalAlignment()
public Void set_HorizontalAlignment(HorizontalAlignment value = )
public VerticalAlignment get_VerticalAlignment()
public Void set_VerticalAlignment(VerticalAlignment value = )
public Double get_LeftMargin()
public Void set_LeftMargin(Double value = )
public Double get_RightMargin()
public Void set_RightMargin(Double value = )
public Double get_BottomMargin()
public Void set_BottomMargin(Double value = )
public Double get_TopMargin()
public Void set_TopMargin(Double value = )
public Double get_ZoomX()
public Void set_ZoomX(Double value = )
public Double get_Width()
public Void set_Width(Double value = )
public Double get_Height()
public Void set_Height(Double value = )
public Double get_ZoomY()
public Void set_ZoomY(Double value = )
public Double get_Zoom()
public Void set_Zoom(Double value = )
public Double get_RotateAngle()
public Void set_RotateAngle(Double value = )
public abstract Void Put(Page page = )
public Void setStampId(Int32 value = )
public Int32 getStampId()
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()