From bf2bc8f2b1ad463bac3e4354b842a87c2e7b13eb Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 14 Jan 2018 17:23:12 +0200 Subject: Added code comments for: MachineStudio.Synchronization --- .../ViewModels/RemoteSynchronizationViewVM.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs index e14b0ffb9..5ce0a9786 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Synchronization/ViewModels/RemoteSynchronizationViewVM.cs @@ -24,6 +24,11 @@ using Tango.Synchronization.Remote; namespace Tango.MachineStudio.Synchronization.ViewModels { + /// + /// Represents the 'Semi Remote Synchronization' view model. + /// + /// + /// public class RemoteSynchronizationViewVM : ViewModel, IShutdownRequestBlocker { private SyncNavigationManager _navigation; @@ -158,6 +163,9 @@ namespace Tango.MachineStudio.Synchronization.ViewModels #region Private Methods + /// + /// Cleans the slave database file. + /// private async void CleanSlave() { if (_notification.ShowQuestion("Are you sure you want to erase all data on slave database?")) @@ -195,6 +203,9 @@ namespace Tango.MachineStudio.Synchronization.ViewModels } } + /// + /// Compares the remote database with the selected database file. + /// private void Compare() { Task.Factory.StartNew(() => @@ -243,6 +254,9 @@ namespace Tango.MachineStudio.Synchronization.ViewModels }); } + /// + /// Commits the selected difference. + /// private void Commit() { Task.Factory.StartNew(() => @@ -274,6 +288,9 @@ namespace Tango.MachineStudio.Synchronization.ViewModels }); } + /// + /// Commits all the differences. + /// private void CommitAll() { Task.Factory.StartNew(() => @@ -325,6 +342,9 @@ namespace Tango.MachineStudio.Synchronization.ViewModels }); } + /// + /// Browse for slave database file. + /// private void BrowseSlaveDB() { String file = BrowseForFilePath(); @@ -336,6 +356,9 @@ namespace Tango.MachineStudio.Synchronization.ViewModels } } + /// + /// Browse for database file. + /// private String BrowseForFilePath() { OpenFileDialog dlg = new OpenFileDialog(); @@ -348,16 +371,28 @@ namespace Tango.MachineStudio.Synchronization.ViewModels return null; } + /// + /// Displays an error message. + /// + /// The message. private void ShowError(String message) { InvokeUINow(() => _notification.ShowError(message)); } + /// + /// Displays an information message. + /// + /// The message. private void ShowInfo(String message) { InvokeUINow(() => _notification.ShowInfo(message)); } + /// + /// Called when the application is shutting down. + /// + /// public Task OnShutdownRequest() { if (_comparer != null) -- cgit v1.3.1