35 lines
		
	
	
		
			869 B
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			35 lines
		
	
	
		
			869 B
		
	
	
	
		
			C#
		
	
	
	
|  | using System; | |||
|  | using System.Collections.Generic; | |||
|  | using System.Linq; | |||
|  | using System.Text; | |||
|  | 
 | |||
|  | namespace elelab | |||
|  | { | |||
|  |     public class unart_manage | |||
|  |     { | |||
|  |         public static int com_count = 20; | |||
|  |         public static ele_base[] com_manage = new ele_base[com_count]; | |||
|  |         public static void init_sys() | |||
|  |         { | |||
|  |             for (int i = 0; i < com_count; i++) | |||
|  |             { | |||
|  |                 //ele_base s1 = new ele_base(); | |||
|  |                 if (com_manage[i] == null) | |||
|  |                 { | |||
|  |                     com_manage[i] = new ele_base(); | |||
|  |                 } | |||
|  |                      | |||
|  |             } | |||
|  |         } | |||
|  |         public static bool init_com_sys(int com, bool modify) | |||
|  |         { | |||
|  |             if (com_manage[com].port_state == false) | |||
|  |             { | |||
|  |                 com_manage[com].init(com, modify); | |||
|  |                 return true; | |||
|  |             } | |||
|  |             return false; | |||
|  |         } | |||
|  |     } | |||
|  | } |