|
|
@@ -40,14 +40,14 @@ namespace OHV.Vehicle.Concept
|
|
|
public string Title
|
|
|
{
|
|
|
get { return _title; }
|
|
|
- set { SetProperty(ref _title, value); }
|
|
|
+ set { SetProperty( ref _title, value ); }
|
|
|
}
|
|
|
|
|
|
private double _cpu;
|
|
|
public double CPU
|
|
|
{
|
|
|
get { return this._cpu; }
|
|
|
- set { this.SetProperty(ref this._cpu, value); }
|
|
|
+ set { this.SetProperty( ref this._cpu, value ); }
|
|
|
}
|
|
|
|
|
|
private double _totalCPU;
|
|
|
@@ -57,7 +57,7 @@ namespace OHV.Vehicle.Concept
|
|
|
set
|
|
|
{
|
|
|
//this._totalCPU = dti.cpuResult.ToString();
|
|
|
- this.SetProperty(ref this._totalCPU, value);
|
|
|
+ this.SetProperty( ref this._totalCPU, value );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -66,14 +66,14 @@ namespace OHV.Vehicle.Concept
|
|
|
public double RAM
|
|
|
{
|
|
|
get { return this._ram; }
|
|
|
- set { this.SetProperty(ref this._ram, value); }
|
|
|
+ set { this.SetProperty( ref this._ram, value ); }
|
|
|
}
|
|
|
|
|
|
private double _cDrive;
|
|
|
public double CDrive
|
|
|
{
|
|
|
get { return this._cDrive; }
|
|
|
- set { this.SetProperty(ref this._cDrive, value); }
|
|
|
+ set { this.SetProperty( ref this._cDrive, value ); }
|
|
|
}
|
|
|
|
|
|
DateTime _dateTime;
|
|
|
@@ -82,7 +82,7 @@ namespace OHV.Vehicle.Concept
|
|
|
get { return _dateTime; }
|
|
|
set
|
|
|
{
|
|
|
- this.SetProperty(ref _dateTime, value);
|
|
|
+ this.SetProperty( ref _dateTime, value );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -90,83 +90,93 @@ namespace OHV.Vehicle.Concept
|
|
|
public string VehicleID
|
|
|
{
|
|
|
get { return this._vehicleID; }
|
|
|
- set { this.SetProperty(ref this._vehicleID, value); }
|
|
|
+ set { this.SetProperty( ref this._vehicleID, value ); }
|
|
|
}
|
|
|
|
|
|
private string _vehicleIP = "127.0.0.1";
|
|
|
public string VehicleIP
|
|
|
{
|
|
|
get { return this._vehicleIP; }
|
|
|
- set { this.SetProperty(ref this._vehicleIP, value); }
|
|
|
+ set { this.SetProperty( ref this._vehicleIP, value ); }
|
|
|
}
|
|
|
private string _ocsIP;
|
|
|
public string OcsIP
|
|
|
{
|
|
|
get { return this._ocsIP; }
|
|
|
- set { this.SetProperty(ref this._ocsIP, value); }
|
|
|
+ set { this.SetProperty( ref this._ocsIP, value ); }
|
|
|
}
|
|
|
|
|
|
private string _swVersion;
|
|
|
public string SwVersion
|
|
|
{
|
|
|
get { return this._swVersion; }
|
|
|
- set { this.SetProperty(ref this._swVersion, value); }
|
|
|
+ set { this.SetProperty( ref this._swVersion, value ); }
|
|
|
}
|
|
|
|
|
|
bool _startEnable = true;
|
|
|
public bool StartEnable
|
|
|
{
|
|
|
get { return this._startEnable; }
|
|
|
- set { this.SetProperty(ref this._startEnable, value); }
|
|
|
+ set { this.SetProperty( ref this._startEnable, value ); }
|
|
|
}
|
|
|
|
|
|
bool _stopEnable = false;
|
|
|
public bool StopEnable
|
|
|
{
|
|
|
get { return this._stopEnable; }
|
|
|
- set { this.SetProperty(ref this._stopEnable, value); }
|
|
|
+ set { this.SetProperty( ref this._stopEnable, value ); }
|
|
|
}
|
|
|
|
|
|
private DateTime _lastBuildedTime;
|
|
|
public DateTime LastBuildedTime
|
|
|
{
|
|
|
get { return this._lastBuildedTime; }
|
|
|
- set { this.SetProperty(ref this._lastBuildedTime, value); }
|
|
|
+ set { this.SetProperty( ref this._lastBuildedTime, value ); }
|
|
|
}
|
|
|
|
|
|
private bool isManualMode = true;
|
|
|
public bool IsManualMode
|
|
|
{
|
|
|
get { return isManualMode; }
|
|
|
- set { SetProperty(ref isManualMode, value); }
|
|
|
+ set { SetProperty( ref isManualMode, value ); }
|
|
|
}
|
|
|
|
|
|
private bool isVehicleAlarm = false;
|
|
|
public bool IsVehicleAlarm
|
|
|
{
|
|
|
get { return isVehicleAlarm; }
|
|
|
- set { SetProperty(ref this.isVehicleAlarm, value); }
|
|
|
+ set { SetProperty( ref this.isVehicleAlarm, value ); }
|
|
|
}
|
|
|
|
|
|
private eMachineMode machineMode = eMachineMode.LocalMode;
|
|
|
public eMachineMode MachineMode
|
|
|
{
|
|
|
get { return machineMode; }
|
|
|
- set { SetProperty(ref this.machineMode, value); }
|
|
|
+ set { SetProperty( ref this.machineMode, value ); }
|
|
|
}
|
|
|
|
|
|
eOcsState ocsState = eOcsState.DisConnect;
|
|
|
public eOcsState OcsState
|
|
|
{
|
|
|
get { return this.ocsState; }
|
|
|
- set { this.SetProperty( ref this.ocsState , value ); }
|
|
|
+ set { this.SetProperty( ref this.ocsState, value ); }
|
|
|
}
|
|
|
+<<<<<<< HEAD
|
|
|
+
|
|
|
+=======
|
|
|
+>>>>>>> 69c47f10da3d0471e11a86cb5cebfd28044ec0fd
|
|
|
+
|
|
|
|
|
|
eBatteryState batteryState = eBatteryState.DisConnect;
|
|
|
public eBatteryState BatteryState
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
+ get { return this.batteryConnectState; }
|
|
|
+ set { this.SetProperty( ref this.batteryConnectState, value ); }
|
|
|
+=======
|
|
|
get { return this.batteryState; }
|
|
|
set { this.SetProperty( ref this.batteryState , value ); }
|
|
|
+>>>>>>> 69c47f10da3d0471e11a86cb5cebfd28044ec0fd
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
@@ -179,7 +189,7 @@ namespace OHV.Vehicle.Concept
|
|
|
get { return _ocsBrush; }
|
|
|
set
|
|
|
{
|
|
|
- SetProperty(ref _ocsBrush, value);
|
|
|
+ SetProperty( ref _ocsBrush, value );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -190,7 +200,7 @@ namespace OHV.Vehicle.Concept
|
|
|
get { return batteryBrush; }
|
|
|
set
|
|
|
{
|
|
|
- SetProperty( ref batteryBrush , value );
|
|
|
+ SetProperty( ref batteryBrush, value );
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -198,7 +208,7 @@ namespace OHV.Vehicle.Concept
|
|
|
public double SOC
|
|
|
{
|
|
|
get { return this.soc; }
|
|
|
- set { this.SetProperty( ref this.soc , value ); }
|
|
|
+ set { this.SetProperty( ref this.soc, value ); }
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
@@ -223,21 +233,24 @@ namespace OHV.Vehicle.Concept
|
|
|
VCSMessagePubSubEvent vcsMessagePublisher;
|
|
|
|
|
|
IRegionManager regionManager;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
DeskTopInfo dti = new DeskTopInfo();
|
|
|
SqliteManager sql;
|
|
|
|
|
|
- public D_MainWindowViewModel( IEventAggregator _ea , VCSystem cSystem , IRegionManager _regionManager , MessageController _msgController, SqliteManager _sql )
|
|
|
+ public D_MainWindowViewModel( IEventAggregator _ea, VCSystem cSystem, IRegionManager _regionManager, MessageController _msgController, SqliteManager _sql )
|
|
|
{
|
|
|
this.regionManager = _regionManager;
|
|
|
|
|
|
this.eventAggregator = _ea;
|
|
|
- this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Subscribe( UICallbackCommunication , ThreadOption.UIThread );
|
|
|
- this.eventAggregator.GetEvent<HostConnectedPubSubEvent>().Subscribe( OcsConnectCallBack , ThreadOption.UIThread , false );
|
|
|
+ this.eventAggregator.GetEvent<GUIMessagePubSubEvent>().Subscribe( UICallbackCommunication, ThreadOption.UIThread );
|
|
|
+ this.eventAggregator.GetEvent<HostConnectedPubSubEvent>().Subscribe( OcsConnectCallBack, ThreadOption.UIThread, false );
|
|
|
|
|
|
vcsMessagePublisher = this.eventAggregator.GetEvent<VCSMessagePubSubEvent>();
|
|
|
|
|
|
this.VCSystem = cSystem;
|
|
|
-
|
|
|
+
|
|
|
this.messageController = _msgController;
|
|
|
this.sql = _sql;
|
|
|
|
|
|
@@ -246,28 +259,28 @@ namespace OHV.Vehicle.Concept
|
|
|
this.OcsIP = sql.ConfigDal.GetK( ConstString.Addr ).Value;
|
|
|
|
|
|
this.TestCommand = new DelegateCommand( ExecuteTextCommand );
|
|
|
- this.NavigateCommand = new DelegateCommand<object>(this.Navigate);
|
|
|
- this.SystemOffCommand = new DelegateCommand(ExecuteSystemOffCommand);
|
|
|
- this.ChangeLanguage = new DelegateCommand(Execte_ChangeLanguage);
|
|
|
- this.StartCommand = new DelegateCommand(ExecuteStartCommand);
|
|
|
- this.StopCommand = new DelegateCommand(ExecuteStopCommand);
|
|
|
- this.AlarmResetCommand = new DelegateCommand( ExecuteAlarmResetCommand);
|
|
|
- this.EmergencyStopCommand = new DelegateCommand(ExecuteEStop);
|
|
|
+ this.NavigateCommand = new DelegateCommand<object>( this.Navigate );
|
|
|
+ this.SystemOffCommand = new DelegateCommand( ExecuteSystemOffCommand );
|
|
|
+ this.ChangeLanguage = new DelegateCommand( Execte_ChangeLanguage );
|
|
|
+ this.StartCommand = new DelegateCommand( ExecuteStartCommand );
|
|
|
+ this.StopCommand = new DelegateCommand( ExecuteStopCommand );
|
|
|
+ this.AlarmResetCommand = new DelegateCommand( ExecuteAlarmResetCommand );
|
|
|
+ this.EmergencyStopCommand = new DelegateCommand( ExecuteEStop );
|
|
|
this.BuzzerStopCommand = new DelegateCommand( ExecuteBuzzerStop );
|
|
|
this.MachineModeChgCommand = new DelegateCommand<string>( ExecuteMachineModeChgCommand );
|
|
|
|
|
|
DispatcherTimer dateTimer = new DispatcherTimer();
|
|
|
- dateTimer.Tick += (object sender, EventArgs e) =>
|
|
|
+ dateTimer.Tick += ( object sender, EventArgs e ) =>
|
|
|
{
|
|
|
this.DateTime = DateTime.Now;
|
|
|
};
|
|
|
- dateTimer.Interval = TimeSpan.FromMilliseconds(500);
|
|
|
+ dateTimer.Interval = TimeSpan.FromMilliseconds( 500 );
|
|
|
dateTimer.Start();
|
|
|
|
|
|
this.SwVersion = AssemblyUtils.GetVersion();
|
|
|
this.LastBuildedTime = new Helpler.AssemblyInfo().Get_BuildDateTime();
|
|
|
|
|
|
- GSG.NET.Quartz.QuartzUtils.Invoke("RESOURCE_CHECK", GSG.NET.Quartz.QuartzUtils.GetExpnSecond(1), QuzOnResourceUsage);
|
|
|
+ GSG.NET.Quartz.QuartzUtils.Invoke( "RESOURCE_CHECK", GSG.NET.Quartz.QuartzUtils.GetExpnSecond( 1 ), QuzOnResourceUsage );
|
|
|
}
|
|
|
|
|
|
void QuzOnResourceUsage()
|
|
|
@@ -291,19 +304,19 @@ namespace OHV.Vehicle.Concept
|
|
|
else
|
|
|
msg.Arg = eMachineMode.LocalMode;
|
|
|
|
|
|
- this.messageController.ShowConfirmationPopupView( $"Change to {msg.Arg} ?", r =>
|
|
|
- {
|
|
|
+ this.messageController.ShowConfirmationPopupView( $"Change to {msg.Arg} ?", r =>
|
|
|
+ {
|
|
|
if ( r.Result == ButtonResult.OK )
|
|
|
vcsMessagePublisher.Publish( msg );
|
|
|
} );
|
|
|
|
|
|
}
|
|
|
|
|
|
- private void ExecuteBuzzerStop( )
|
|
|
+ private void ExecuteBuzzerStop()
|
|
|
{
|
|
|
var msg = new VCSMessageEventArgs
|
|
|
{
|
|
|
- Kind = VCSMessageEventArgs.eVCSMessageKind.ReqBuzzerStop ,
|
|
|
+ Kind = VCSMessageEventArgs.eVCSMessageKind.ReqBuzzerStop,
|
|
|
};
|
|
|
vcsMessagePublisher.Publish( msg );
|
|
|
|
|
|
@@ -319,61 +332,61 @@ namespace OHV.Vehicle.Concept
|
|
|
{
|
|
|
var msg = new VCSMessageEventArgs
|
|
|
{
|
|
|
- Kind = VCSMessageEventArgs.eVCSMessageKind.ReqEStop ,
|
|
|
+ Kind = VCSMessageEventArgs.eVCSMessageKind.ReqEStop,
|
|
|
};
|
|
|
vcsMessagePublisher.Publish( msg );
|
|
|
}
|
|
|
|
|
|
- private void ExecuteAlarmResetCommand( )
|
|
|
+ private void ExecuteAlarmResetCommand()
|
|
|
{
|
|
|
- this.messageController.ShowConfirmationPopupView(" Alarm Reset ? ", r =>
|
|
|
- {
|
|
|
- if (r.Result == ButtonResult.OK)
|
|
|
- {
|
|
|
- var msg = new VCSMessageEventArgs
|
|
|
- {
|
|
|
- Kind = VCSMessageEventArgs.eVCSMessageKind.ReqAlarmReset,
|
|
|
- };
|
|
|
+ this.messageController.ShowConfirmationPopupView( " Alarm Reset ? ", r =>
|
|
|
+ {
|
|
|
+ if ( r.Result == ButtonResult.OK )
|
|
|
+ {
|
|
|
+ var msg = new VCSMessageEventArgs
|
|
|
+ {
|
|
|
+ Kind = VCSMessageEventArgs.eVCSMessageKind.ReqAlarmReset,
|
|
|
+ };
|
|
|
|
|
|
- vcsMessagePublisher.Publish(msg);
|
|
|
- }
|
|
|
- });
|
|
|
+ vcsMessagePublisher.Publish( msg );
|
|
|
+ }
|
|
|
+ } );
|
|
|
}
|
|
|
|
|
|
private void ExecuteStopCommand()
|
|
|
{
|
|
|
- this.messageController.ShowConfirmationPopupView(" Vehicle Stop ? ", r =>
|
|
|
- {
|
|
|
- if (r.Result == ButtonResult.OK)
|
|
|
- {
|
|
|
- var msg = new VCSMessageEventArgs
|
|
|
- {
|
|
|
- Kind = VCSMessageEventArgs.eVCSMessageKind.ReqVehicleModeChange,
|
|
|
- MessageKey = MessageKey.ManualMode,
|
|
|
- };
|
|
|
+ this.messageController.ShowConfirmationPopupView( " Vehicle Stop ? ", r =>
|
|
|
+ {
|
|
|
+ if ( r.Result == ButtonResult.OK )
|
|
|
+ {
|
|
|
+ var msg = new VCSMessageEventArgs
|
|
|
+ {
|
|
|
+ Kind = VCSMessageEventArgs.eVCSMessageKind.ReqVehicleModeChange,
|
|
|
+ MessageKey = MessageKey.ManualMode,
|
|
|
+ };
|
|
|
|
|
|
- vcsMessagePublisher.Publish(msg);
|
|
|
- }
|
|
|
- });
|
|
|
+ vcsMessagePublisher.Publish( msg );
|
|
|
+ }
|
|
|
+ } );
|
|
|
}
|
|
|
|
|
|
private void ExecuteStartCommand()
|
|
|
{
|
|
|
- this.messageController.ShowConfirmationPopupView("Request Vehicle Auto Mode ?", r =>
|
|
|
- {
|
|
|
- if (r.Result == ButtonResult.OK)
|
|
|
- {
|
|
|
- var msg = new VCSMessageEventArgs
|
|
|
- {
|
|
|
- Kind = VCSMessageEventArgs.eVCSMessageKind.ReqVehicleModeChange,
|
|
|
- MessageKey = MessageKey.AutoMode,
|
|
|
- };
|
|
|
- vcsMessagePublisher.Publish(msg);
|
|
|
- }
|
|
|
- });
|
|
|
+ this.messageController.ShowConfirmationPopupView( "Request Vehicle Auto Mode ?", r =>
|
|
|
+ {
|
|
|
+ if ( r.Result == ButtonResult.OK )
|
|
|
+ {
|
|
|
+ var msg = new VCSMessageEventArgs
|
|
|
+ {
|
|
|
+ Kind = VCSMessageEventArgs.eVCSMessageKind.ReqVehicleModeChange,
|
|
|
+ MessageKey = MessageKey.AutoMode,
|
|
|
+ };
|
|
|
+ vcsMessagePublisher.Publish( msg );
|
|
|
+ }
|
|
|
+ } );
|
|
|
}
|
|
|
|
|
|
- private void OcsConnectCallBack(HostConnectedEventArgs obj)
|
|
|
+ private void OcsConnectCallBack( HostConnectedEventArgs obj )
|
|
|
{
|
|
|
var state = obj.State;
|
|
|
|
|
|
@@ -390,28 +403,28 @@ namespace OHV.Vehicle.Concept
|
|
|
|
|
|
private void ExecuteSystemOffCommand()
|
|
|
{
|
|
|
- this.messageController.ShowConfirmationPopupView("System ShutDown ?", r =>
|
|
|
- {
|
|
|
- if (r.Result == ButtonResult.OK)
|
|
|
- App.Current.Shutdown();
|
|
|
- });
|
|
|
+ this.messageController.ShowConfirmationPopupView( "System ShutDown ?", r =>
|
|
|
+ {
|
|
|
+ if ( r.Result == ButtonResult.OK )
|
|
|
+ App.Current.Shutdown();
|
|
|
+ } );
|
|
|
}
|
|
|
|
|
|
- private void Navigate(object obj)
|
|
|
+ private void Navigate( object obj )
|
|
|
{
|
|
|
var selectItem = obj.ToString();
|
|
|
- if (!string.IsNullOrEmpty(selectItem))
|
|
|
- regionManager.RequestNavigate("MainView", selectItem);
|
|
|
+ if ( !string.IsNullOrEmpty( selectItem ) )
|
|
|
+ regionManager.RequestNavigate( "MainView", selectItem );
|
|
|
}
|
|
|
|
|
|
- void VehicleModeChange(bool isAutoMode)
|
|
|
+ void VehicleModeChange( bool isAutoMode )
|
|
|
{
|
|
|
- if (isAutoMode)
|
|
|
+ if ( isAutoMode )
|
|
|
{
|
|
|
this.StartEnable = false;
|
|
|
this.StopEnable = true;
|
|
|
this.IsManualMode = false;
|
|
|
- regionManager.RequestNavigate(RegionNames.MainView, "AutoView");
|
|
|
+ regionManager.RequestNavigate( RegionNames.MainView, "AutoView" );
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -421,8 +434,10 @@ namespace OHV.Vehicle.Concept
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private void UICallbackCommunication(GUIMessageEventArgs obj)
|
|
|
+ private void UICallbackCommunication( GUIMessageEventArgs obj )
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
+=======
|
|
|
if ( obj.Kind == GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange )
|
|
|
{
|
|
|
if ( obj.MessageKey.Equals( MessageKey.Vehicle ) )
|
|
|
@@ -434,6 +449,7 @@ namespace OHV.Vehicle.Concept
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+>>>>>>> 69c47f10da3d0471e11a86cb5cebfd28044ec0fd
|
|
|
switch ( obj.Kind )
|
|
|
{
|
|
|
case GUIMessageEventArgs.eGUIMessageKind.ModelPropertyChange:
|
|
|
@@ -459,7 +475,7 @@ namespace OHV.Vehicle.Concept
|
|
|
case GUIMessageEventArgs.eGUIMessageKind.RspVihicleState:
|
|
|
break;
|
|
|
case GUIMessageEventArgs.eGUIMessageKind.RspMachineModeChg:
|
|
|
- RspMachineModeChg(obj);
|
|
|
+ RspMachineModeChg( obj );
|
|
|
break;
|
|
|
default:
|
|
|
break;
|
|
|
@@ -488,7 +504,7 @@ namespace OHV.Vehicle.Concept
|
|
|
FluentResults.Result result = obj.Result;
|
|
|
if ( obj.Result.IsFailed )
|
|
|
{
|
|
|
- reason = result.Errors.FirstOrDefault().Message;
|
|
|
+ reason = result.Errors.FirstOrDefault().Message;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -499,12 +515,12 @@ namespace OHV.Vehicle.Concept
|
|
|
this.messageController.ShowNotificationView( reason );
|
|
|
}
|
|
|
|
|
|
- private void RspVehicleModeChange(GUIMessageEventArgs obj)
|
|
|
+ private void RspVehicleModeChange( GUIMessageEventArgs obj )
|
|
|
{
|
|
|
- if ( obj.Result.IsSuccess)
|
|
|
+ if ( obj.Result.IsSuccess )
|
|
|
{
|
|
|
- if (obj.MessageKey.Equals(MessageKey.AutoMode)) { this.VehicleModeChange(true); }
|
|
|
- if (obj.MessageKey.Equals(MessageKey.ManualMode)) { this.VehicleModeChange(false); }
|
|
|
+ if ( obj.MessageKey.Equals( MessageKey.AutoMode ) ) { this.VehicleModeChange( true ); }
|
|
|
+ if ( obj.MessageKey.Equals( MessageKey.ManualMode ) ) { this.VehicleModeChange( false ); }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
@@ -512,19 +528,23 @@ namespace OHV.Vehicle.Concept
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- void UICallBackModelPropertyChange(GUIMessageEventArgs args)
|
|
|
+ void UICallBackModelPropertyChange( GUIMessageEventArgs args )
|
|
|
{
|
|
|
- if (args.MessageKey.Equals(MessageKey.Alarm))
|
|
|
+ if ( args.MessageKey.Equals( MessageKey.Alarm ) )
|
|
|
{
|
|
|
var hisAlarm = args.Args as HisAlarm;
|
|
|
- this.messageController.ShowNotificationView(args.MessageText);
|
|
|
- this.VehicleModeChange(false);//알람이 발생하면 자동으로 Manual Mode 로 변경됨
|
|
|
+ this.messageController.ShowNotificationView( args.MessageText );
|
|
|
+ this.VehicleModeChange( false );//알람이 발생하면 자동으로 Manual Mode 로 변경됨
|
|
|
this.IsVehicleAlarm = true;
|
|
|
}
|
|
|
|
|
|
- if (args.MessageKey.Equals(MessageKey.Vehicle))
|
|
|
+ if ( args.MessageKey.Equals( MessageKey.Vehicle ) )
|
|
|
{
|
|
|
+<<<<<<< HEAD
|
|
|
+ switch ( args.ModelPropertyName )
|
|
|
+=======
|
|
|
switch(args.ModelPropertyName)
|
|
|
+>>>>>>> 69c47f10da3d0471e11a86cb5cebfd28044ec0fd
|
|
|
{
|
|
|
case "VehicleStateProperty":
|
|
|
{
|
|
|
@@ -535,6 +555,22 @@ namespace OHV.Vehicle.Concept
|
|
|
this.IsVehicleAlarm = false;
|
|
|
}
|
|
|
break;
|
|
|
+<<<<<<< HEAD
|
|
|
+
|
|
|
+ case "MachineMode":
|
|
|
+ this.MachineMode = CastTo<eMachineMode>.From<object>( args.Args );
|
|
|
+ break;
|
|
|
+
|
|
|
+ case "BatteryIsConnect":
|
|
|
+ this.RspBatteryConnected( args );
|
|
|
+ break;
|
|
|
+
|
|
|
+ case "BatteryStateOfCharge":
|
|
|
+ this.SOC = CastTo<double>.From<object>( args.Args );
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+=======
|
|
|
case "MachineMode":
|
|
|
this.MachineMode = CastTo<eMachineMode>.From<object>( args.Args );
|
|
|
break;
|
|
|
@@ -554,6 +590,7 @@ namespace OHV.Vehicle.Concept
|
|
|
{
|
|
|
var cTime = CastTo<double>.From<object>( args.Args );
|
|
|
}
|
|
|
+>>>>>>> 69c47f10da3d0471e11a86cb5cebfd28044ec0fd
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
@@ -580,7 +617,7 @@ namespace OHV.Vehicle.Concept
|
|
|
//}
|
|
|
//var vsys = containerRegistry.GetContainer().Resolve<IContainerProvider>();
|
|
|
|
|
|
- regionManager.RequestNavigate(RegionNames.MainView, "AutoView");
|
|
|
+ regionManager.RequestNavigate( RegionNames.MainView, "AutoView" );
|
|
|
}
|
|
|
|
|
|
public void Dispose()
|
|
|
@@ -588,38 +625,38 @@ namespace OHV.Vehicle.Concept
|
|
|
//VCSystem.Instance.Dispose();
|
|
|
}
|
|
|
|
|
|
- public static void SelectCulture(string culture)
|
|
|
+ public static void SelectCulture( string culture )
|
|
|
{
|
|
|
- if (String.IsNullOrEmpty(culture))
|
|
|
+ if ( String.IsNullOrEmpty( culture ) )
|
|
|
return;
|
|
|
|
|
|
//Copy all MergedDictionarys into a auxiliar list.
|
|
|
var dictionaryList = Application.Current.Resources.MergedDictionaries.ToList();
|
|
|
|
|
|
//Search for the specified culture.
|
|
|
- string requestedCulture = string.Format("StringResources.{0}.xaml", culture);
|
|
|
+ string requestedCulture = string.Format( "StringResources.{0}.xaml", culture );
|
|
|
var resourceDictionary = dictionaryList.
|
|
|
- FirstOrDefault(d => d.Source.OriginalString == "/OHV.ResourceDic;component/Resources/StringResource.en-US.xaml");
|
|
|
+ FirstOrDefault( d => d.Source.OriginalString == "/OHV.ResourceDic;component/Resources/StringResource.en-US.xaml" );
|
|
|
|
|
|
- if (resourceDictionary == null)
|
|
|
+ if ( resourceDictionary == null )
|
|
|
{
|
|
|
//If not found, select our default language.
|
|
|
requestedCulture = "StringResources.xaml";
|
|
|
resourceDictionary = dictionaryList.
|
|
|
- FirstOrDefault(d => d.Source.OriginalString == requestedCulture);
|
|
|
+ FirstOrDefault( d => d.Source.OriginalString == requestedCulture );
|
|
|
}
|
|
|
|
|
|
//If we have the requested resource, remove it from the list and place at the end.
|
|
|
//Then this language will be our string table to use.
|
|
|
- if (resourceDictionary != null)
|
|
|
+ if ( resourceDictionary != null )
|
|
|
{
|
|
|
- Application.Current.Resources.MergedDictionaries.Remove(resourceDictionary);
|
|
|
- Application.Current.Resources.MergedDictionaries.Add(resourceDictionary);
|
|
|
+ Application.Current.Resources.MergedDictionaries.Remove( resourceDictionary );
|
|
|
+ Application.Current.Resources.MergedDictionaries.Add( resourceDictionary );
|
|
|
}
|
|
|
|
|
|
//Inform the threads of the new culture.
|
|
|
- Thread.CurrentThread.CurrentCulture = new CultureInfo(culture);
|
|
|
- Thread.CurrentThread.CurrentUICulture = new CultureInfo(culture);
|
|
|
+ Thread.CurrentThread.CurrentCulture = new CultureInfo( culture );
|
|
|
+ Thread.CurrentThread.CurrentUICulture = new CultureInfo( culture );
|
|
|
}
|
|
|
}
|
|
|
}
|