Exemplo n.º 1
0
        void timer1_Tick(object sender, EventArgs e)
        {
            TimeClass.GetSystemTime(out st);
            systemTimeUC1.setDateTime(st);
            systemTimeUC1.setType("System Time");

            TimeClass.GetLocalTime(out stLocal);
            systemTimeUC2.setDateTime(stLocal);
            systemTimeUC2.setType("Local Time");

            test();
        }
Exemplo n.º 2
0
        public TimeInfo()
        {
            InitializeComponent();
            timer1          = new System.Windows.Forms.Timer();
            timer1.Tick    += new EventHandler(timer1_Tick);
            timer1.Interval = 1000;
            timer1.Enabled  = true;

            TimeClass.GetSystemTime(out st);
            systemTimeUC1.setDateTime(st);
            systemTimeUC1.setType("System Time");

            TimeClass.GetLocalTime(out stLocal);
            systemTimeUC2.setDateTime(stLocal);
            systemTimeUC2.setType("Local Time");
        }