Beispiel #1
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     Area = new Area(Output.Width, Output.Height);
     Draw = new Draw(Area);
     UpdPicter.Start();
     TimeTick.Start();
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            try{
                //初始化构造函数
                Common.GetAccessToken();
            }
            catch (MyException err) {
                throw err;
            }

            baidu = new BaiduWebHelper();
            baidu.GetResult();

            Handle   handle = new Handle(RefreshCatch);
            TimeTick tick   = new TimeTick(60000);

            tick.Start(handle);

            server = new HttpServer();
            server.AddDomain("http://*:1234/");

            Log.WriteLine(Common.GetTime() + "服务器已启动: http://localhost:1234/");
            try{
                server.Start();
                server.WaitRequest();
            }
            catch (MyException err)
            {
                Log.WriteLine(Common.GetTime() + err.Message);
            }
            finally{
                server.Stop();
            }
        }
 private void frmQryResumenBanco_Load(object sender, EventArgs e)
 {
     try
     {
         TimeTick.Start();
         TimeTick.Enabled = true;
         CargarDatos();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #4
0
        private static void OneTimeStarted()
        {
            if (TimeTick == null)
            {
                TimeTick = new OneTickTimer();
            }

            if (TimeMillisecond == null)
            {
                TimeMillisecond = new OneMilliTimer();
            }

            if (TimeSecond == null)
            {
                TimeSecond = new OneSecTimer();
            }

            if (TimeMinute == null)
            {
                TimeMinute = new OneMinTimer();
            }

            if (TimeHour == null)
            {
                TimeHour = new OneHourTimer();
            }

            if (TimeDay == null)
            {
                TimeDay = new OneDayTimer();
            }

            TimeTick.Start();
            TimeMillisecond.Start();
            TimeSecond.Start();
            TimeMinute.Start();
            TimeHour.Start();
            TimeDay.Start();
        }