Notes logic. This scirpt handles the printing of text to the small paper notes that can be found throughout the game. The notes are displayed as UISprites with a UILabel ontop of them. Created by Simon Jonasson
Inheritance: MonoBehaviour
Beispiel #1
0
 public MyNotesViewModel(NotesLogic notesLogic, ImportantDatesLogic importantDatesLogic, BasketLogic basketLogic)
 {
     this.notesLogic          = notesLogic;
     this.importantDatesLogic = importantDatesLogic;
     this.basketLogic         = basketLogic;
     NotesLogic          = this.notesLogic;
     ImportantDatesLogic = this.importantDatesLogic;
 }
Beispiel #2
0
 public NewNoteViewModel(NotesLogic notesLogic)
 {
     this.notesLogic     = notesLogic;
     Condition           = "Visible";
     Date                = "Сегодня " + DateTime.Now.ToString("H:mm");
     IsClose             = false;
     nameElementWhoClose = "Сохранить";
     ItCanSave           = false;
     UpdateDateAsync();
 }
Beispiel #3
0
 private async void CreateLogicAsync()
 {
     await Task.Run(() =>
     {
         notesLogic               = new NotesLogic(diaryLogic.GetDataBase());
         importantDatesLogic      = new ImportantDatesLogic(diaryLogic.GetDataBase());
         timetableForTheDaysLogic = new TimetableForTheDaysLogic(diaryLogic.GetDataBase());
         habitsTrackerLogic       = new HabitsTrackerLogic();
         goalsLogic               = new GoalsLogic(diaryLogic.GetDataBase());
         basketLogic              = new BasketLogic(diaryLogic.GetDataBase());
     });
 }
Beispiel #4
0
 public BasketViewModel(NotesLogic notesLogic, BasketLogic basketLogic)
 {
     this.notesLogic  = notesLogic;
     this.basketLogic = basketLogic;
     DeleteNote       = new GalaSoft.MvvmLight.Command.RelayCommand <int>(Delete);
     RecoverNote      = new GalaSoft.MvvmLight.Command.RelayCommand <int>(Recover);
     EditAndViewNote  = new GalaSoft.MvvmLight.Command.RelayCommand <int>(EditAndView);
     dispatcher       = Dispatcher.CurrentDispatcher;
     TextSearch       = "";
     Notes            = new ObservableCollection <Basket>(this.basketLogic.Notes);
     Count            = Notes.Count;
 }
Beispiel #5
0
 public AllNotesViewModel(NotesLogic notesLogic, BasketLogic basketLogic)
 {
     this.notesLogic        = notesLogic;
     this.basketLogic       = basketLogic;
     DeleteNoteCommand      = new RelayCommand <int>(DeleteNote);
     EditAndViewNoteCommand = new RelayCommand <int>(EditAndViewNote);
     Condition  = "Visible";
     isClose    = false;
     dispatcher = Dispatcher.CurrentDispatcher;
     TextSearch = "";
     Notes      = new ObservableCollection <Note>(this.notesLogic.Notes);
     Count      = Notes.Count;
 }
Beispiel #6
0
 public EditNoteViewModel(NotesLogic notesLogic, int id)
 {
     this.notesLogic     = notesLogic;
     this.id             = id;
     countClickOnButton  = 0;
     nameElementWhoClose = "Сохранить";
     startText           = this.notesLogic.GetNoteContent(this.id);
     Condition           = "Visible";
     Date        = this.notesLogic.GetDateInternal(this.id);
     Text        = startText;
     ButtonEdit  = "Редактировать";
     IsClose     = false;
     Color       = (Brush) new BrushConverter().ConvertFromString("#FAFAD2");
     CountBorder = 0;
     Fill        = (Brush) new BrushConverter().ConvertFromString("Gray");
 }