重命名方法
This commit is contained in:
parent
5841d6807e
commit
19d498cdd5
|
@ -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<WorkUnit>().Where(exp).ToList();
|
||||
if(qu.Any() && msg.IsNullOrEmpty()) {
|
||||
this.Db.Deleteable<WorkUnit>().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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user