Beispiel #1
0
 /// <summary>
 /// Creates a Reader instance and connects the TCP Client / Creates the reading thread.
 /// In case of error, the program will exit.
 /// </summary>
 /// <param name="assist"></param>
 public Reader(SeniorHomeAssistCore assist)
 {
     try {
         tcpClient    = new TcpClient(SERVER, PORT);
         listenThread = new Thread(new ThreadStart(Read));
     }
     catch (Exception e)
     {
         assist.splash.CloseSplash();
         MessageBox.Show(null, "Erreur de connection au lecteur de badge : \n" + e.Message, "Erreur TCP", MessageBoxButtons.OK, MessageBoxIcon.Error);
         Environment.Exit(3);
         return;
     }
     seniorHomeAssist = assist;
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            SeniorHomeAssistCore seniorHomeAssist = new SeniorHomeAssistCore(args);

            if (args.Length > 0 && args[0].Equals("-bypass"))
            {
                seniorHomeAssist.Launch(true);
            }
            else if (args.Length > 0 && args[0].Equals("-options"))
            {
            }
            else
            {
                seniorHomeAssist.Launch(false);
            }
        }