|  | @@ -1,5 +1,6 @@
 | 
											
												
													
														|  |  #include "StdAfx.h"
 |  |  #include "StdAfx.h"
 | 
											
												
													
														|  |  #include "SATDevices.h"
 |  |  #include "SATDevices.h"
 | 
											
												
													
														|  | 
 |  | +#include "SATExecutor.h"
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  bool CSATDevices::s_bEnableAndroid = true;
 |  |  bool CSATDevices::s_bEnableAndroid = true;
 | 
											
												
													
														|  |  ULONGLONG CSATDevices::s_ulEraseDuration = 30000;
 |  |  ULONGLONG CSATDevices::s_ulEraseDuration = 30000;
 | 
											
										
											
												
													
														|  | @@ -205,6 +206,7 @@ void CSATDevices::DelDevices(std::string name)
 | 
											
												
													
														|  |  				str.append(name);
 |  |  				str.append(name);
 | 
											
												
													
														|  |  				WinExec(str.c_str(), SW_HIDE);
 |  |  				WinExec(str.c_str(), SW_HIDE);
 | 
											
												
													
														|  |  				s_vtDevices.erase(it);
 |  |  				s_vtDevices.erase(it);
 | 
											
												
													
														|  | 
 |  | +				CSATExecutor::GetInstance()->AddDevices(*it);
 | 
											
												
													
														|  |  			}
 |  |  			}
 | 
											
												
													
														|  |  			break;
 |  |  			break;
 | 
											
												
													
														|  |  		}
 |  |  		}
 | 
											
										
											
												
													
														|  | @@ -221,8 +223,10 @@ void CSATDevices::AddReticleDevices(std::string ip)
 | 
											
												
													
														|  |  	stDevice.nUsageState = SATDEV::Idle;
 |  |  	stDevice.nUsageState = SATDEV::Idle;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	AutoThreadSection ats(&s_ThreadSection);
 |  |  	AutoThreadSection ats(&s_ThreadSection);
 | 
											
												
													
														|  | -	if (!IsDeviceExist(stDevice))
 |  | 
 | 
											
												
													
														|  | 
 |  | +	if (!IsDeviceExist(stDevice)) {
 | 
											
												
													
														|  |  		s_vtDevices.push_back(stDevice);
 |  |  		s_vtDevices.push_back(stDevice);
 | 
											
												
													
														|  | 
 |  | +		CSATExecutor::GetInstance()->AddDevices(stDevice);
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  void CSATDevices::AddVirtualDevices(std::string name)
 |  |  void CSATDevices::AddVirtualDevices(std::string name)
 | 
											
										
											
												
													
														|  | @@ -235,8 +239,10 @@ void CSATDevices::AddVirtualDevices(std::string name)
 | 
											
												
													
														|  |  	stDevice.nUsageState = SATDEV::Idle;
 |  |  	stDevice.nUsageState = SATDEV::Idle;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	AutoThreadSection ats(&s_ThreadSection);
 |  |  	AutoThreadSection ats(&s_ThreadSection);
 | 
											
												
													
														|  | -	if (!IsDeviceExist(stDevice))
 |  | 
 | 
											
												
													
														|  | 
 |  | +	if (!IsDeviceExist(stDevice)) {
 | 
											
												
													
														|  |  		s_vtDevices.push_back(stDevice);
 |  |  		s_vtDevices.push_back(stDevice);
 | 
											
												
													
														|  | 
 |  | +		CSATExecutor::GetInstance()->AddDevices(stDevice);
 | 
											
												
													
														|  | 
 |  | +	}
 | 
											
												
													
														|  |  }
 |  |  }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  bool CSATDevices::IsDeviceExist(SATDEV::STDevice &stDevice)
 |  |  bool CSATDevices::IsDeviceExist(SATDEV::STDevice &stDevice)
 | 
											
										
											
												
													
														|  | @@ -302,6 +308,7 @@ bool CSATDevices::IsNewDevices(SATDEV::STDevice &stDevice)
 | 
											
												
													
														|  |  	if ( bNewDevices ) {
 |  |  	if ( bNewDevices ) {
 | 
											
												
													
														|  |  		AutoThreadSection ats(&s_ThreadSection);
 |  |  		AutoThreadSection ats(&s_ThreadSection);
 | 
											
												
													
														|  |  		s_vtDevices.push_back(stDevice);
 |  |  		s_vtDevices.push_back(stDevice);
 | 
											
												
													
														|  | 
 |  | +		CSATExecutor::GetInstance()->AddDevices(stDevice);
 | 
											
												
													
														|  |  	}
 |  |  	}
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  	return bNewDevices;
 |  |  	return bNewDevices;
 |