Exemple #1
0
 public void OnDateChanged(DateTime date)
 {
     date_ = date;
     SetDate(date_);
     SetColor(DiaryNoteBase.ToColor(date_));
     GetComponentInChildren <LogTree>().OnDateChanged(date);
 }
Exemple #2
0
 public override void SaveFile()
 {
     if (file_ == null)
     {
         if (OwnerLogNote != null)
         {
             file_ = new FileInfo(DiaryNoteBase.ToFileName(OwnerLogNote.TreeNote, date_));
         }
         else
         {
             print("failed to save file.");
             return;
         }
     }
     if (file_.Exists == false)
     {
         if (rootLine_.Count == 0 || (rootLine_.Count == 1 && rootLine_[0].Count == 0 && rootLine_[0].Text == ""))
         {
             // 何も書くことがなければファイル生成しない
             IsEdited = false;
             return;
         }
     }
     base.SaveFile();
 }