Beispiel #1
0
 public RD_ERROR OnRecordOpenedStatus(bool anOpened)
 {
     if (anOpened == true)
     {
         OnRecordOpenSuccessDelegate pfn = Fire_OnRecordOpenSuccess;
         Program.context.recordEditor.Invoke(pfn);
     }
     else
     {
         currentRecord   = null;
         openingRecordID = INCORRECT_RECORD_ID;
         if (OnRecordOpenFailed != null)
         {
             OnRecordOpenFailed(this, new RecordControllerEventArgs());
         }
     }
     return(RD_ERROR.RDE_NOERROR);
 }
Beispiel #2
0
        public RD_ERROR OpenRecordImpl(RecordDocument apRecord)
        {
            if (apRecord == null)
            {
                return(RD_ERROR.RDE_INCORRECT_PARAMETERS);
            }

            if (apRecord.Description == null)
            {
                return(RD_ERROR.RDE_INCORRECT_PARAMETERS);
            }

            if (openingRecordID != apRecord.Description.recordID)
            {
                return(RD_ERROR.RDE_COMMAND_OBSOLETE);
            }

            string asURL = apRecord.Description.URL + "&em=1";

            return(Program.context.playerSession.OpenRecordRequest(asURL));
        }
Beispiel #3
0
        public RD_ERROR UpdateRecordInfo(RecordDescription apDesc)
        {
            if (openingRecordID != apDesc.recordID)
            {
                return(RD_ERROR.RDE_COMMAND_OBSOLETE);
            }

            System.Diagnostics.Debug.Assert(currentRecord == null);

            RecordDescription recordDescription = GetRecordDescription(apDesc.recordID);

            if (recordDescription != null)
            {
                recordDescription.Set(apDesc);

                currentRecord             = new RecordDocument();
                currentRecord.Description = recordDescription;
                return(OpenRecordImpl(currentRecord));
            }
            return(RD_ERROR.RDE_COMMAND_OBSOLETE);
        }