public SerialCommunicationForm(Sync syn, PLCState plcS, Queue<Orientamento> list)
 {
     this.microToPLC = list;
     this.syncPolling = new Sync();
     this.ComPort = new SerialPort();
     this.param = Param.getInstance();
     this.plcState = plcS;
     init();
 }
 static void Main()
 {
     Param.getInstance();
     //Param.XmlSerializer();
     //Param.JsonSerializer();
     Param.XmlDeserialize();
     //Param.JsonDeserialize();
     Sync sync = new Sync();
     Queue<Orientamento> microToPLC = new Queue<Orientamento>();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     PLCState plcState = new PLCState();
     Application.Run(new SerialCommunicationForm(sync, plcState,microToPLC));
 }