This repository was archived by the owner on Jul 19, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +30
-13
lines changed
HoloLensCommander/HoloLensCommander Expand file tree Collapse file tree 5 files changed +30
-13
lines changed Original file line number Diff line number Diff line change @@ -632,7 +632,7 @@ private void Device_HeartbeatReceived(DeviceMonitor sender)
632632 // Did we recover from a heartbeat loss?
633633 if ( this . StatusMessage == HeartbeatLostMessage )
634634 {
635- this . StatusMessage = string . Empty ;
635+ this . ClearStatusMessage ( ) ;
636636 }
637637
638638 // Handle whether or not we were previously selected
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ private void ContentDialog_OkClick(
3636 // Return the data
3737 ( ( SettingsDialogViewModel ) this . DataContext ) . UpdateUserData ( this . appSettings ) ;
3838 this . appSettings . SettingsUpdated = true ;
39- this . appSettings . StatusMessage = "" ;
39+ this . appSettings . StatusMessage = string . Empty ;
4040 }
4141 catch ( Exception e )
4242 {
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ private void RegisterCommands()
199199 this . ClearStatusMessageCommand = new Command (
200200 ( parameter ) =>
201201 {
202- this . StatusMessage = string . Empty ;
202+ this . ClearStatusMessage ( ) ;
203203 } ) ;
204204
205205 this . CloseAllAppsCommand = new Command (
@@ -435,20 +435,29 @@ await this.ConnectToDeviceAsync(
435435 this . UninstallAppCommand = new Command (
436436 ( parameter ) =>
437437 {
438- this . UninstallApp ( ) ;
438+ try
439+ {
440+ this . UninstallApp ( ) ;
441+ }
442+ catch ( Exception e )
443+ {
444+ this . StatusMessage = string . Format (
445+ "Failed to uninstall an app on one or more devices ({0})" ,
446+ e . Message ) ;
447+ }
439448 } ) ;
440449
441450 this . UninstallAllAppsCommand = new Command (
442451 ( parameter ) =>
443452 {
444453 try
445454 {
446- this . UninstallApp ( ) ;
455+ this . UninstallAllApps ( ) ;
447456 }
448457 catch ( Exception e )
449458 {
450459 this . StatusMessage = string . Format (
451- "Failed to uninstall an app on one or more devices ({0})" ,
460+ "Failed to uninstall all apps on one or more devices ({0})" ,
452461 e . Message ) ;
453462 }
454463 } ) ;
Original file line number Diff line number Diff line change @@ -60,6 +60,14 @@ private async Task ClearDeviceStatus()
6060 public ICommand ClearStatusMessageCommand
6161 { get ; private set ; }
6262
63+ /// <summary>
64+ /// Implementation of the clear status message command.
65+ /// </summary>
66+ private void ClearStatusMessage ( )
67+ {
68+ this . StatusMessage = string . Empty ;
69+ }
70+
6371 /// <summary>
6472 /// Command used to close all applications on the selected devices.
6573 /// </summary>
@@ -471,7 +479,7 @@ public ICommand SaveSessionFileCommand
471479 /// </summary>
472480 private async Task SaveSessionFile ( )
473481 {
474- this . StatusMessage = "" ;
482+ this . ClearStatusMessage ( ) ;
475483
476484 try
477485 {
Original file line number Diff line number Diff line change @@ -102,13 +102,13 @@ public Settings() :
102102 /// <param name="interval">Seconds between heartbeat checks.</param>
103103 public Settings ( float interval ) :
104104 this (
105- false ,
105+ false , // autoReconnect
106106 interval ,
107- false ,
108- false ,
109- false ,
110- string . Empty ,
111- string . Empty )
107+ false , // expandCredentials
108+ false , // expandNetworkSettigns
109+ false , // useInstalledCertificate
110+ string . Empty , // defaultSsid
111+ string . Empty ) // defaultNetworkKey
112112 { }
113113
114114 /// <summary>
You can’t perform that action at this time.
0 commit comments