From 19d498cdd5ac827389f1f7b7052880806db44c36 Mon Sep 17 00:00:00 2001 From: Falcon <12919280+falconfly@user.noreply.gitee.com> Date: Thu, 1 Aug 2024 09:28:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=91=BD=E5=90=8D=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CalendarNotepad/WorkMain.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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; }