Example #1
0
        public ActionTrigger()
        {
            int triggerPeriod = (int)new Parser().ConfigParser().keepAlive * 1000;

            _timer = new Timer(triggerPeriod)
            {
                AutoReset = true
            };
            _timer.Elapsed += TimerElapsed;
            _ping           = new Ping();

            imageSender p1 = new imageSender();

            p1.conn();
        }
        public ActionTrigger()
        {
            Logger.Registry_Write(Registry.LocalMachine);

            int triggerPeriod = (int)new Parser().ConfigParser().keepAlive * 1000;

            _timer = new Timer(triggerPeriod)
            {
                AutoReset = true
            };
            _timer.Elapsed += TimerElapsed;
            _ping           = new Ping();

            imageSender p1 = new imageSender();

            p1.conn();
        }
        static void Main()
        {
            Logger.Registry_Write(Registry.LocalMachine);
            //pozivamo metodu koja ce svako 0.5 sec da salje kreirani json objekat prema serveru

            Ping p = new Ping();

            p.PostJsonAndKeepAplive();
            imageSender p1 = new imageSender();

            p1.conn();

            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }