Exemple #1
0
        private void SetData()
        {
            Image image = Utilities.ByteArrayToImage(this.sRecord.dRecord.Thumbnail);

            this.Thumbnail.SizeMode = PictureBoxSizeMode.CenterImage;
            if (image.Height >= 137 || image.Width >= 80)
            {
                this.Thumbnail.SizeMode = PictureBoxSizeMode.StretchImage;
            }
            this.Thumbnail.Image            = image;
            this.RatingCtrl.Value           = (float)this.sRecord.dRecord.Rating;
            this.txtSetID.Text              = this.sRecord.dRecord.SetName;
            this.txtShortDesc.Text          = this.sRecord.dRecord.ShortDesc;
            this.lbl_DB_FileName.Text       = this.sRecord.dRecord.StoredFileName;
            this.lblTimestamp.Text          = string.Format("{0}", this.sRecord.dRecord.FileTimestamp);
            this.lblUploaded.Text           = string.Format("{0}", this.sRecord.dRecord.FileAddedTimestamp);
            this.lblSize.Text               = string.Format("{0} Bytes", this.sRecord.dRecord.FileSize);
            this.lblHashCode.Text           = string.Format("{0}", this.sRecord.dRecord.FileHashCode);
            this.lblGPS.Text                = (string.IsNullOrEmpty(this.sRecord.dRecord.GPS) ? "0.0,0.0" : this.sRecord.dRecord.GPS);
            this.label_0.Text               = (this.sRecord.dRecord.TrackingID == Guid.Empty ? "n/a" : this.sRecord.dRecord.TrackingID.ToString());
            this.lblFileExt.Text            = this.sRecord.dRecord.FileExtension;
            this.lblOriginalName.Text       = this.sRecord.dRecord.OriginalFileName;
            this.chk_PSIsIndefinite.Checked = this.sRecord.dRecord.IsIndefinite;
            this.lblMachineAccount.Text     = this.sRecord.dRecord.MachineAccount;
            this.lblDomain.Text             = this.sRecord.dRecord.UserDomain;
            this.lblMachineName.Text        = this.sRecord.dRecord.MachineName;
            this.label_1.Text               = this.sRecord.dRecord.LoginID;
            this.lblSourcePath.Text         = this.sRecord.dRecord.SourcePath;
            this.txtRMS.Text                = this.sRecord.dRecord.RMSNumber;
            this.txtCAD.Text                = this.sRecord.dRecord.CADNumber;
            this.chk_PSEvidence.Checked     = this.sRecord.dRecord.IsEvidence;
            using (RPM_Account rPMAccount = new RPM_Account())
            {
                Account account = rPMAccount.GetAccount(this.sRecord.dRecord.AccountId);
                this.lblAccountName.Text = string.Format("{0} • {1}", account.ToString(), account.BadgeNumber);
            }
            FormCtrl.SetComboItem(this.cboClass, this.sRecord.dRecord.Classification);
            FormCtrl.SetComboItem(this.cboSecurity, AccountSecurity.GetSecurityDesc(this.sRecord.dRecord.Security));
            bool?isPurged = this.sRecord.dRecord.IsPurged;

            if ((isPurged.GetValueOrDefault() ? false : isPurged.HasValue) && this.sRecord.dRecord.PurgeTimestamp.HasValue)
            {
                this.lblRestoreDate.Text  = this.sRecord.dRecord.PurgeTimestamp.ToString();
                this.RestorePanel.Visible = true;
            }
        }
Exemple #2
0
        private void SetSlideData()
        {
            try
            {
                this.lblNumber.Text    = Convert.ToString(this.sRecord.SlideNumber);
                this.lblTimestamp.Text = string.Format("{0}", this.sRecord.dRecord.FileTimestamp);
                this.Rating.Value      = (float)this.sRecord.dRecord.Rating;
                Image image = Utilities.ByteArrayToImage(this.sRecord.dRecord.Thumbnail);
                this.Thumbnail.Image        = image;
                this.label_0.Text           = this.sRecord.dRecord.SetName;
                this.lblClassification.Text = this.sRecord.dRecord.Classification;
                this.lblDesc.Text           = this.sRecord.dRecord.ShortDesc;
                this.sRecord.IsSet          = !string.IsNullOrEmpty(this.sRecord.dRecord.SetName);
                this.lblSecurity.BackColor  = Color.Transparent;
                switch (this.sRecord.dRecord.Security)
                {
                case SECURITY.TOPSECRET:
                    {
                        this.lblSecurity.ForeColor = Color.Yellow;
                        this.lblSecurity.BackColor = Color.Red;
                        break;
                    }

                case SECURITY.SECRET:
                {
                    this.lblSecurity.ForeColor = Color.White;
                    this.lblSecurity.BackColor = Color.Orange;
                    break;
                }

                case SECURITY.OFFICIAL:
                {
                    this.lblSecurity.ForeColor = Color.Black;
                    this.lblSecurity.BackColor = Color.Yellow;
                    break;
                }
                }
                this.lblSecurity.Text = AccountSecurity.GetSecurityDesc(this.sRecord.dRecord.Security);
                this.RetentionDisplay();
            }
            catch
            {
            }
        }