public void Signout(bool needsave) { Status = $"感谢使用!"; if (needsave) { Save(); } Currentuser = null; Diaries.Clear(); AllDiaries.Clear(); }
public void InitializeDiary() { AllDiaries.Clear(); Diaries.Clear(); var QDiaries = from r in DataContext.Diary where r.UserID == Currentuser.ID select r; foreach (var QD in QDiaries) { AllDiaries.Add(QD); Diaries.Add(QD); } }