private void OnInformationChanged(ImportInformation import)
 {
     if (import.ImportName.Equals("Currency"))
     {
         CurrencyStatus = import.Information;
     }
     if (import.ImportName.Equals("Commitment"))
     {
         CommitmentStatus = import.Information;
         if (import.Object != null)
         {
             importCommitments = import.Object as ObservableCollection <ImportCommitment>;
         }
     }
     if (import.ImportName.Equals("Cashflows"))
     {
         CashFlowStatus = import.Information;
     }
     if (import.ImportName.Equals("Ended"))
     {
         numberOfProcesses--;
     }
     if (numberOfProcesses == 0)
     {
         workDone = true;
     }
 }
Exemple #2
0
        private void onAnchorDataAvailable(MqttNetClientAccess.mqttMessage message)
        {
            DateTime anchorTime = TimeMethodesForAnchors.parseAnchor(message.topic).Value;

            importInformation = new ImportInformation(3, message.payload, anchorTime);
            //TODO: what happens when one anchor gets available while the other is currently importing
            //then we should somehow stop the import of the other and use the new

            //we have the anchor now
            AppDataExportManager.Instance.unsubscribe(message.topic, onAnchorDataAvailable);

            WorldAnchorTransferBatch.ImportAsync(message.payload, onImportComplete);
        }
Exemple #3
0
        private void onImportCompleteForUnity(object transferBatchObject)
        {
            WorldAnchorTransferBatch transferBatch = (WorldAnchorTransferBatch)transferBatchObject;


            //before we lock this, we remove the world anchor
            detachWorldAnchor();

            //locks it in place
            WorldAnchor wa = transferBatch.LockObject(gameObject.name, this.gameObject);

            anchorOrigin = AnchorOrigin.Server;

            //saves the importet anchor in the store
            WorldAnchorManager.Instance.SaveAnchor(this.gameObject);


            //if import complete, we take the time from information as current time
            latestAnchor = importInformation.anchorTime;

            //reset
            importInformation = default(ImportInformation);
        }