daily pastebin goal
73%
SHARE
TWEET

Untitled

a guest Mar 20th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void Form1_Load(object sender, EventArgs e)
  2.     {
  3.         // Create the delegate for the Timer type.
  4.         System.Threading.TimerCallback timeCB = new System.Threading.TimerCallback(d);
  5.  
  6.         // Establish timer settings.
  7.         System.Threading.Timer t = new System.Threading.Timer(
  8.           timeCB,     // The TimerCallback delegate object.
  9.           null,       // Any info to pass into the called method (null for no info).
  10.           0,          // Amount of time to wait before starting (in milliseconds).
  11.           1000);      // Interval of time between calls (in milliseconds).
  12.     }
  13.  
  14.     void m(object o)
  15.     {
  16.         System.Media.SystemSounds.Hand.Play();
  17.         SReminderEntities ctx = new SReminderEntities();
  18.  
  19.         var jobs = (from m in ctx.Messages
  20.                     select m).ToList();
  21.  
  22.         var seljobs = from j in jobs
  23.                       where j.RemindeTime.Date == DateTime.Now.Date
  24.                             && j.RemindeTime.Hour == DateTime.Now.Hour
  25.                             && j.RemindeTime.Minute == DateTime.Now.Minute
  26.                       select j;
  27.  
  28.         foreach (var j in seljobs)
  29.         {
  30.            // SendGmail("iReminder", j.Text, new string[] { j.User.Email }, "iReminderSender@Gmail.com");
  31.             //this.sendSMS(j.User.Mobile, j.Text);
  32.             System.Media.SystemSounds.Hand.Play();
  33.         }//foreach
  34.     }
  35.  
  36.     void d(object o)
  37.     {
  38.         MessageBox.Show("Test");
  39.     }
  40.      
  41. System.Threading.Timer t = System.Threading.Timer    
  42.  
  43. private void Form1_Load(object sender, EventArgs e)
  44.         {
  45.             // Create the delegate for the Timer type.
  46.             System.Threading.TimerCallback timeCB = new System.Threading.TimerCallback(d);
  47.  
  48.             // Establish timer settings.
  49.               t = new System.Threading.Timer(
  50.               timeCB,     // The TimerCallback delegate object.
  51.               null,       // Any info to pass into the called method (null for no info).
  52.               0,          // Amount of time to wait before starting (in milliseconds).
  53.               1000);      // Interval of time between calls (in milliseconds).
  54.         }
  55.  
  56.         void m(object o)
  57.         {
  58.             System.Media.SystemSounds.Hand.Play();
  59.             SReminderEntities ctx = new SReminderEntities();
  60.  
  61.             var jobs = (from m in ctx.Messages
  62.                         select m).ToList();
  63.  
  64.             var seljobs = from j in jobs
  65.                           where j.RemindeTime.Date == DateTime.Now.Date
  66.                                 && j.RemindeTime.Hour == DateTime.Now.Hour
  67.                                 && j.RemindeTime.Minute == DateTime.Now.Minute
  68.                           select j;
  69.  
  70.             foreach (var j in seljobs)
  71.             {
  72.                // SendGmail("iReminder", j.Text, new string[] { j.User.Email }, "iReminderSender@Gmail.com");
  73.                 //this.sendSMS(j.User.Mobile, j.Text);
  74.                 System.Media.SystemSounds.Hand.Play();
  75.             }//foreach
  76.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top