Jump to content

System Data Table


korasoglu
 Share

Recommended Posts

System Data Table

Arkadaşlar tüm açık uygulamalardan ulaşabileceğim datatable nasıl yapabilirim hiç kullanmadım çözemedim.

mantık şu sürekli arka planda timerden zaman kontrol yaptıracağım aynı verileri diğer uygulamadanda ulaşmak istiyorum. Ajanda etkinlik programı birinden işlem yapıcam birinde sürekli kontrol edecek.

thereat denedim olmadı

şöyle  yaptım

Thread syncThread = null;
        System.Timers.Timer timer1;

        public Service1()
        {
            InitializeComponent();             
        }

        protected override void OnStart(string[] args)
        {
            timer1 = new System.Timers.Timer();
            timer1.Interval = 60000; // 1 min
            timer1.Enabled = true;
            timer1.Elapsed += new ElapsedEventHandler(timer1_Elapsed);
            timer1.Start();
        }
        protected override void OnStop()
        {
            syncThread.Abort();
            timer1.Stop();
        }
        protected void timer1_Elapsed(object sender, ElapsedEventArgs e)
        {
            syncThread = new Thread(new ThreadStart(doStuffInMyOwnThread));
            syncThread.Start();
        }
        protected void doStuffInMyOwnThread()
        {
            // whatever you put here, it will
            // run for each timer interval that elapses
            // in a separate thread, and each thread will
            // end when the processing in this function ends            
        } 

kullanımını beceremedim.

 

Birde timer ekledim Thread çalışmıyor timer haricinde çalışıyor ama timerden çalışmıyor

Edited by korasoglu
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...