public New_Event(PlanData plandata) { InitializeComponent(); Init(); thisPlan = plandata; this.StartPosition = FormStartPosition.CenterParent; }
public DailyPlan(DateTime Date, PlanData planData) { InitializeComponent(); this.date = Date; this.data = planData; dateTimePicker.Value = date; }
public Calender() { InitializeComponent(); RegistryKey regkey = Registry.CurrentUser.CreateSubKey("Software\\Calendar"); RegistryKey regstart = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); string keyvalue = "1"; try { regkey.SetValue("Index", keyvalue); regstart.SetValue("Calendar", Application.StartupPath + "\\Calendar.exe"); //regkey.Close(); } catch (System.Exception ex) { } LoadMatrix(); try { schedules = DeserializeFromXML(filePath) as PlanData; } catch (Exception ex) { SetDefaultValue(); } }
public Form1() { Year.SyncYear(); Months.SyncMonth(); InitializeComponent(); this.PresentMonth.Text = Months.ToString(); InitDateMatrix(); try { allPlan = (PlanData)DeserializeFromXML(filepath); } catch { } if (allPlan == null) { allPlan = new PlanData(); } this.CenterToScreen(); new_Event = new New_Event(allPlan); LoadItemToDayView(Year.GetCurrentYear(), Months.iCurrent, DateTime.Now.Day); List <GroupPlanItem> groupsAlert = allPlan.ListGroupAlertForToday(DateTime.Now); for (int i = 0; i < groupsAlert.Count; i++) { alertForToday.AddRange(groupsAlert[i].ListAlertForToday(DateTime.Now)); } timer = new Timer(); timer.Tick += Notify; timer.Interval = (60 - DateTime.Now.Second) * 1000; timer.Start(); }
public EditEvent(PlanData planData, GroupPlanItem group, PlanItem item) : base(planData) { InitializeComponent(); this.group = group; this.item = item; this.title.Text = item.title; this.location.Text = item.location; this.notes.Text = item.note; this.Day_Start.Text = item.startTime.Day.ToString(); this.Month_Start.Text = item.startTime.Month.ToString(); this.Year_Start.Text = item.startTime.Year.ToString(); this.Hour_Start.Text = item.startTime.Hour.ToString(); this.Minute_Start.Text = item.startTime.Minute.ToString(); this.Day_End.Text = item.endTime.Day.ToString(); this.Month_End.Text = item.endTime.Month.ToString(); this.Year_End.Text = item.endTime.Year.ToString(); this.Hour_End.Text = item.endTime.Hour.ToString(); this.Minute_End.Text = item.endTime.Minute.ToString(); this.Repeat.SelectedIndex = group.repeatKind; if (group.repeatKind == 5) { repeatValue.Text = group.repeatValue.ToString(); } this.Day_RepeatEnd.Text = group.repeatEnd.Day.ToString(); this.Month_RepeatEnd.Text = group.repeatEnd.Month.ToString(); this.Year_RepeatEnd.Text = group.repeatEnd.Year.ToString(); this.priority.SelectedIndex = (int)item.priority; TimeSpan ts = item.startTime - item.alert; if (ts.Hours == 1) { this.alert.SelectedIndex = 0; } else if (ts.Minutes == 30) { this.alert.SelectedIndex = 1; } else if (ts.Minutes == 15) { this.alert.SelectedIndex = 2; } else { this.alert.SelectedIndex = 3; } }
void SetDefaultJob() { Job = new PlanData(); Job.Job = new List <PlanItem>(); Job.Job.Add(new PlanItem() { Date = DateTime.Now, Job = "Thử nghiệm thôi", Status = PlanItem.ListStatus[(int)EPlanItem.COMING] }); }
void SetDefaultValue() { schedules = new PlanData(); schedules.plans = new List <PlanItem>(); schedules.plans.Add(new PlanItem() { planDate = DateTime.Now, fromTime = new Point(0, 0), toTime = new Point(0, 0), job = "", status = PlanItem.listStatus[1] }); }
void SetDefaultJob() { Job = new PlanData(); Job.Job = new List <PlanItem>(); Job.Job.Add(new PlanItem() { Date = DateTime.Now.AddDays(-1), FromTime = new Point(8, 0), ToTime = new Point(5, 0), Job = "khong thu nua", Status = PlanItem.ListStatus[(int)EPlanItem.DONE] }); }
public DailyPlan(DateTime date, PlanData job) { InitializeComponent(); this.Date = date; this.Job = job; fPanel.Width = pnlJob.Width; fPanel.Height = pnlJob.Height; pnlJob.Controls.Add(fPanel); dtpkDate.Value = Date; }
void SetDefaultJob() { Job = new PlanData(); Job.Job = new List <PlanItem>(); Job.Job.Add(new PlanItem() { Date = DateTime.Now, FromTime = new Point(4, 0), ToTime = new Point(5, 0), Job = "Test", Status = PlanItem.ListStatus[(int)EPlanItem.COMING] }); }
public DailyPlan(DateTime date, PlanData job, int userId, Socket client) { context = new PlanItem_BO(); InitializeComponent(); UserId = userId; Date = date; Job = job; Client = client; fPanel.Width = pnlJob.Width; fPanel.Height = pnlJob.Height; pnlJob.Controls.Add(fPanel); dtpkDate.Value = Date; }
public DailyPlan(DateTime date, PlanData job) { context = new PlanItem_BO(); InitializeComponent(); Date = date; Job = job; fPanel.Width = pnlJob.Width; fPanel.Height = pnlJob.Height; pnlJob.Controls.Add(fPanel); dtpkDate.Value = Date; }
public Form1() { InitializeComponent(); LoadMatrix(); try { Job = DeserializeFromXML(filePath) as PlanData; } catch { SetDefaultJob(); } }
public QuanLyLichNhanVien(int userId) { InitializeComponent(); Connect(); context = new PlanItem_BO(); UserId = userId; RegistryKey regkey = Registry.CurrentUser.CreateSubKey("Software\\LapLich"); //mo registry khoi dong cung win RegistryKey regstart = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); string keyvalue = "1"; //string subkey = "Software\\ManhQuyen"; try { //chen gia tri key regkey.SetValue("Index", keyvalue); //regstart.SetValue("taoregistrytronghethong", "E:\\Studing\\Bai Tap\\CSharp\\Channel 4\\bai temp\\tao registry trong he thong\\tao registry trong he thong\\bin\\Debug\\tao registry trong he thong.exe"); regstart.SetValue("LapLich", Application.StartupPath + "\\Lập lịch.exe"); ////dong tien trinh ghi key //regkey.Close(); } catch (System.Exception ex) { } tmNotify.Start(); AppTime = 0; LoadMatrix(); try { //Job = DeserializeFromXML(filePath) as PlanData; Job = new PlanData() { Job = context.GetAllPlanItems() }; } catch { SetDefaultJob(); } }
public Form1(int userId) { context = new PlanItem_BO(); context2 = new User_BO(); InitializeComponent(); Connect(); UserId = userId; //RegistryKey regkey = Registry.CurrentUser.CreateSubKey("Software\\LapLich"); //mo registry khoi dong cung win //RegistryKey regstart = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"); string keyvalue = "1"; //try //{ //chen gia tri key //regkey.SetValue("Index", keyvalue); //regstart.SetValue("LapLich", Application.StartupPath + "\\Lập lịch.exe"); //} //catch (System.Exception ex) //{ //} tmNotify.Start(); appTime = 0; LoadMatrix(); try { Job = new PlanData() { Job = context.GetAllPlanItems() }; } catch { } }
void SetDefaultJob() { Job = new PlanData(); Job.Job = new List <PlanItem>(); //PlanItem pi = new PlanItem(); Job.Job.Add(new PlanItem() { Date = DateTime.Now, Notify = false, Job = "Test", FromTime = new Point(0, 0), ToTime = new Point(1, 1), Status = Cons.ListStatus[(int)EPlanItem.DONE] }); Job.Job.Add(new PlanItem() { Date = DateTime.Now, Notify = false, Job = "Test", FromTime = new Point(0, 0), ToTime = new Point(2, 2), Status = Cons.ListStatus[(int)EPlanItem.MISSED] }); }
public DailyPlan(DateTime date, PlanData job) { InitializeComponent(); this.Date = date; this.Job = job; }