예제 #1
0
 private bool CompleteLoading()
 {
     try
     {
         this.targetFile = this.destFolder.searchForFile(this.targetFilename);
         if (this.targetFile == null)
         {
             this.status       = DecypherTrackExe.DecHeadStatus.Error;
             this.errorMessage = "File not found";
             return(false);
         }
         if (FileEncrypter.FileIsEncrypted(this.targetFile.data, "") != 0)
         {
             return(true);
         }
         this.status       = DecypherTrackExe.DecHeadStatus.Error;
         this.errorMessage = "File is not\nDEC encrypted";
         return(false);
     }
     catch (Exception ex)
     {
         this.status       = DecypherTrackExe.DecHeadStatus.Error;
         this.errorMessage = "Fatal error in loading";
         return(false);
     }
 }
예제 #2
0
 public DecypherTrackExe(Rectangle location, OS operatingSystem, string[] p)
     : base(location, operatingSystem)
 {
     this.IdentifierName = "DEC File Tracer";
     this.ramCost        = 240;
     if (p.Length < 2)
     {
         this.status       = DecypherTrackExe.DecHeadStatus.Error;
         this.errorMessage = "No File Provided";
     }
     else
     {
         this.InitializeFiles(p[1]);
     }
 }
예제 #3
0
        public override void Update(float t)
        {
            base.Update(t);
            this.timeOnThisPhase += t;
            float num;

            switch (this.status)
            {
            case DecypherTrackExe.DecHeadStatus.Error:
                num = 6f;
                if ((double)this.timeOnThisPhase >= 6.0)
                {
                    this.isExiting = true;
                    break;
                }
                break;

            case DecypherTrackExe.DecHeadStatus.Complete:
                num = 10f;
                if ((double)this.timeOnThisPhase >= 10.0)
                {
                    this.isExiting = true;
                    break;
                }
                break;

            default:
                num = 3.5f;
                if ((double)this.timeOnThisPhase >= 3.5)
                {
                    if (this.CompleteLoading())
                    {
                        this.status = DecypherTrackExe.DecHeadStatus.Complete;
                        this.GetHeaders();
                    }
                    this.timeOnThisPhase = 0.0f;
                    break;
                }
                break;
            }
            this.percentComplete = this.timeOnThisPhase / num;
        }