public void InvokeBackupProgress(Volume volume, VolumeSnapshot snapshot, ulong fileNum, ulong fileCount, ulong bytesTranferred, ulong totalBytes)
 {
     if (BackupProgress != null)
     {
         BackupProgress(volume, snapshot, fileNum, fileCount, bytesTranferred, totalBytes);
     }
 }
 public void InvokeRestoreFinished(Volume volume, VolumeSnapshot snapshot)
 {
     if (RestoreFinished != null)
     {
         RestoreFinished(volume, snapshot);
     }
 }
 public void InvokeBackupStarted(Volume volume, VolumeSnapshot snapshot, bool firstBackupOnLoad)
 {
     if (BackupStarted != null)
     {
         BackupStarted(volume, snapshot, false, firstBackupOnLoad);
     }
 }
 public void InvokeBackupFinished(Volume volume, VolumeSnapshot snapshot, bool snapshotHasBeenSaved, bool firstBackupOnLoad)
 {
     if (BackupFinished != null)
     {
         BackupFinished(volume, snapshot, snapshotHasBeenSaved, firstBackupOnLoad);
     }
 }
Ejemplo n.º 5
0
        void spine_RestoreInitStartedWinThread(Volume volume, VolumeSnapshot snapshot)
        {
//			ShowBalloonTip( "Restore of " + volume.Descriptor.Identifier.Name + " started" );
            MainForm.Instance.SetStatusText("Restoring...");
            MainForm.Instance.SetTitleText("Restoring", 0);
            if (RestoreStarted != null)
            {
                RestoreStarted(volume, snapshot);
            }
        }
Ejemplo n.º 6
0
        void CalculateTotalDatabaseSize()
        {
            ulong totalSize = 0;

            foreach (VolumeSnapshotRevision revision in mBackupRestoreObject.Database.GetRevisionHistory())
            {
                VolumeSnapshot snapshot = mBackupRestoreObject.Database.LoadSnapshotRevision(mBackupRestoreObject.Source, revision);
                totalSize += snapshot.Root.DetermineTotalSizeOfStoredFiles();
            }
            mVolumeDesc.TotalDatabaseSize = totalSize;
        }
Ejemplo n.º 7
0
        void Spine_BackupStartedWinThread(Volume volume, VolumeSnapshot snapshot, bool snapshotHasBeenSaved, bool firstBackupOnLoad)
        {
            MainForm.Instance.SetStatusText("Backing up...");
            if (BackupStarted != null)
            {
                BackupStarted(volume, snapshot, snapshotHasBeenSaved, firstBackupOnLoad);
            }
            mProgressBar.Value = 0;
            MainForm.Instance.SetTitleText("Backing up", 0);
//			if ( !firstBackupOnLoad )
//				ShowBalloonTip( "Backup of " + volume.Descriptor.Identifier.Name + " started" );
        }
Ejemplo n.º 8
0
 void Spine_RestoreFinishedWinThread(Volume volume, VolumeSnapshot snapshot)
 {
     ShowBalloonTip("Restore of " + volume.Descriptor.VolumeName + " finished");
     mProgressBar.Value = 0;
     MainForm.Instance.SetDefaultStatusText();
     MainForm.Instance.SetTitleText("", 0);
     Log.WriteLine(LogType.AppLog | LogType.TextLog | LogType.DebugLog, "Restoration of '" + volume.Descriptor.VolumeName + "' complete");
     if (RestoreFinished != null)
     {
         RestoreFinished(volume, snapshot);
     }
 }
Ejemplo n.º 9
0
        public void volumeParentVolume()
        {
            RightScale.netClient.Core.APIClient.Instance.InitWebClient();
            RightScale.netClient.Core.APIClient.Instance.Authenticate(apiRefreshToken);
            Volume vol = Volume.show(cloudID, childVolumeID);

            Assert.IsNotNull(vol);
            VolumeSnapshot parVol = vol.parentVolumeSnapshot;

            Assert.IsTrue(true);//no exception
            RightScale.netClient.Core.APIClient.Instance.InitWebClient();
        }
Ejemplo n.º 10
0
        void spine_RestoreFileFinishedWinThread(Volume volume, VolumeSnapshot snapshot, ulong fileNum, ulong fileCount, ulong bytesTranferred, ulong totalBytes)
        {
            while (totalBytes > int.MaxValue)
            {
                totalBytes      /= 10;
                bytesTranferred /= 10;
            }

            mProgressBar.Maximum = ( int )totalBytes + 1;
            mProgressBar.Value   = ( int )bytesTranferred;

            int percentComplete = (int)(((float)bytesTranferred / (float)(totalBytes + 1)) * 100.0f);

            MainForm.Instance.SetTitleText("Restoring", percentComplete);
            Log.WriteLine(LogType.DebugLog | LogType.TextLog, "File: " + fileNum.ToString() + "/" + fileCount.ToString() + " Progress: " + bytesTranferred.ToString() + "/" + totalBytes.ToString());
        }
Ejemplo n.º 11
0
 void Spine_BackupFinishedWinThread(Volume volume, VolumeSnapshot snapshot, bool snapshotHasBeenSaved, bool firstBackupOnLoad)
 {
     if (!firstBackupOnLoad && snapshotHasBeenSaved)
     {
         ShowBalloonTip("Backup of " + volume.Descriptor.VolumeName + " finished");
     }
     MainForm.Instance.SetDefaultStatusText();
     mProgressBar.Value = 0;
     MainForm.Instance.SetTitleText("", 0);
     if (snapshotHasBeenSaved)
     {
         Log.WriteLine(LogType.AppLog | LogType.TextLog | LogType.DebugLog, "Backup of '" + volume.Descriptor.VolumeName + "' complete");
     }
     if (BackupFinished != null)
     {
         BackupFinished(volume, snapshot, snapshotHasBeenSaved, firstBackupOnLoad);
     }
 }
Ejemplo n.º 12
0
        void Spine_BackupFileFinishedWinThread(Volume volume, VolumeSnapshot snapshot, ulong fileNum, ulong fileCount, ulong bytesTranferred, ulong totalBytes)
        {
            try
            {
                while (totalBytes >= int.MaxValue)
                {
                    totalBytes      /= 10;
                    bytesTranferred /= 10;
                }

                mProgressBar.Maximum = ( int )totalBytes + 1;
                mProgressBar.Value   = ( int )bytesTranferred;

                int percentComplete = (int)(((float)bytesTranferred / (float)(totalBytes + 1)) * 100.0f);
                MainForm.Instance.SetTitleText("Backing up", percentComplete);
            }
            catch (System.Exception)
            {
                throw;
            }
        }
Ejemplo n.º 13
0
 void Spine_BackupStarted(Volume volume, VolumeSnapshot snapshot, bool snapshotHasBeenSaved, bool firstBackupOnLoad)
 {
     mInvokeControl.Invoke(new VolumeBackupHandler(Spine_BackupStartedWinThread), volume, snapshot, snapshotHasBeenSaved, firstBackupOnLoad);
 }
Ejemplo n.º 14
0
 void Spine_RestoreFinished(Volume volume, VolumeSnapshot snapshot)
 {
     mInvokeControl.Invoke(new VolumeRestoreHandler(Spine_RestoreFinishedWinThread), volume, snapshot);
 }
Ejemplo n.º 15
0
 void Spine_RestoreFinished(Volume volume, VolumeSnapshot snapshot)
 {
     mLabel.Text         = mCancelledByUser ? "Transfer cancelled" : "Transfer complete";
     mButtonNext.Enabled = true;
 }
Ejemplo n.º 16
0
 void Spine_BackupFinishedWinThread(Volume volume, VolumeSnapshot snapshot, bool snapshotHasBeenSaved, bool firstBackupOnLoad)
 {
     mTreeView.SetVolumeAsBusy(volume.Descriptor, false);
 }
Ejemplo n.º 17
0
 void Spine_RestoreFinishedWinThread(Volume volume, VolumeSnapshot snapshot)
 {
     mTreeView.LockInterface(false);
 }
Ejemplo n.º 18
0
 void Spine_RestoreInitStartedWinThread(Volume volume, VolumeSnapshot snapshot)
 {
     mTreeView.LockInterface(true);
 }
Ejemplo n.º 19
0
 void spine_RestoreFileFinished(Volume volume, VolumeSnapshot snapshot, ulong fileNum, ulong fileCount, ulong bytesTranferred, ulong totalBytes)
 {
     mInvokeControl.Invoke(new VolumeBackupProgressHandler(spine_RestoreFileFinishedWinThread), volume, snapshot, fileNum, fileCount, bytesTranferred, totalBytes);
 }
 /// <inheritdoc cref="VolumeSnapshot.DeleteAsync"/>
 public static void Delete(this VolumeSnapshot volume)
 {
     volume.DeleteAsync().ForceSynchronous();
 }
Ejemplo n.º 21
0
 void Spine_BackupFinished(Volume volume, VolumeSnapshot snapshot, bool snapshotHasBeenSaved, bool firstBackupOnLoad)
 {
     mVolumeListView.Refresh();
 }
Ejemplo n.º 22
0
 void spine_RestoreInitStarted(Volume volume, VolumeSnapshot snapshot)
 {
     mInvokeControl.Invoke(new VolumeRestoreHandler(spine_RestoreInitStartedWinThread), volume, snapshot);
 }