diff --git a/CalendarNotepad/WorkMain.cs b/CalendarNotepad/WorkMain.cs index b08be98..14f9cce 100644 --- a/CalendarNotepad/WorkMain.cs +++ b/CalendarNotepad/WorkMain.cs @@ -13,7 +13,7 @@ namespace CalendarNotepad public WorkMain() { InitializeComponent(); this.rtbMsg.EnableAutoDragDrop = true; - this.DataReset(); + this.OnDataReset(); this.rtbMsg.TextChanged += RtbMsg_TextChanged; foreach(var c in this.C_WorkTypes.Controls) { var rab = c as RadioButton; @@ -79,7 +79,7 @@ namespace CalendarNotepad } } } - this.DataReset(); + this.OnDataReset(); Task.Factory.StartNew(() => { this.Invoke(() => { this.mcWorkDay.BoldedDates = GetBoldDays().ToArray(); @@ -157,7 +157,7 @@ namespace CalendarNotepad var qu = this.Db.Queryable().Where(exp).ToList(); if(qu.Any() && msg.IsNullOrEmpty()) { this.Db.Deleteable().Where(exp).ExecuteCommand(); - this.DataReset(); + this.OnDataReset(); return; } if(qu.Any() && msg.IsNotNullOrEmpty()) { @@ -166,7 +166,7 @@ namespace CalendarNotepad .SetColumns(a => a.WorkType == wt) .SetColumns(a => a.Workout == wo) .ExecuteCommand(); - this.DataReset(); + this.OnDataReset(); return; } if(!qu.Any() && msg.IsNotNullOrEmpty()) { @@ -174,21 +174,21 @@ namespace CalendarNotepad WorkDay = wd, WorkMessage = msg,WorkType = wt,Workout = wo, }).ExecuteCommand(); - this.DataReset(); + this.OnDataReset(); return; } } private void btReset_Click(object sender,EventArgs e) { mcWorkDay_DateChanged(sender,new DateRangeEventArgs(this.mcWorkDay.SelectionStart,this.mcWorkDay.SelectionEnd)); - this.DataReset(); + this.OnDataReset(); } private void DataChanged() { this.btSave.Enabled = true; this.btReset.Enabled = true; } - private void DataReset() { + private void OnDataReset() { this.btSave.Enabled = false; this.btReset.Enabled = false; }