private void CheckAppointments() { curPath = Directory.GetCurrentDirectory(); //Thread.Sleep(5000); path = curPath + "\\Schedule.ebase"; EbRows = File.ReadAllLines(path); for (int i = 0; i < EbRows.Length; i++) { string[] EbCol = EbRows[i].Split('~'); if (DateTime.Now.Year.ToString() == EbCol[1] && DateTime.Now.Month.ToString() == EbCol[2] && DateTime.Now.Day.ToString() == EbCol[3]) { string hour = EbCol[4]; int hourNumber = Int32.Parse(hour); string minute = EbCol[5]; int minuteNumber = Int32.Parse(minute); string timeOfDay; if (hourNumber > 12) { hourNumber -= 12; timeOfDay = "PM"; } else { timeOfDay = "AM"; } //if (DateTime.Now.Minute >= minuteNumber) //{ Station.BeepRemind(); MessageBox.Show("there is an Appointment slated for " + hourNumber + ":" + EbCol[5] + " " + timeOfDay + " at " + EbCol[6] + ". ", EbCol[0], MessageBoxButtons.OK, MessageBoxIcon.Information); //} } } }