Esempio n. 1
0
        public TimeTablePageNoteWindow(TimeTablePageTimeTableNote parent, string SubjectName, Note Note = null)
        {
            logic       = new NotesPageVM(new SQLiteDataService(), App.currentUser);
            Title       = "Note";
            this.parent = parent;

            note = Note;
            InitializeComponent();
            textDeadline.DisplayDateStart = DateTime.Now;
            subjectName.Text    = SubjectName;
            buttonCancel.Click += ButtonCancelClick;
            if (note == null)
            {
                textName.Text      = textNamePlaceholder;
                textName.GotFocus += TextTitleGotFocus;
                buttonAdd.Click   += ButtonAddClick;
            }
            else
            {
                textName.Text     = note.Name;
                textDeadline.Text = note.Deadline.ToShortDateString();
                subjectName.Text  = note.SubjectID;
                textMaterials.AppendText(note.Materials);
                buttonAdd.Click += ButtonAddClickModify;
            }
        }
        public TimeTablePageTimeTableNote(string Subject, string Teacher)
        {
            InitializeComponent();
            this.Subject.Text = Subject;
            this.Teacher.Text = Teacher;

            logic          = new NotesPageVM(new SQLiteDataService(), App.currentUser);
            NotesOfSubject = ((List <Note>)logic.GetNotes()).Where(x => x.SubjectID == Subject).ToList();

            FillNotes();
            buttonOk.Click          += EndWorkWithNotes;
            check.Click             += MarkAll;
            buttonCheckedDone.Click += DeleteMarked;
            toSortByTime.Click      += SortByTime;
            toSortByTitle.Click     += SortByTitle;
        }
 public NotesPage()
 {
     this.logic = new NotesPageVM(new SQLiteDataService(), App.currentUser);
     logic.GetNotes();
     InitializeComponent();
     navbar.button_Profile.Click       += Navbar_Button_Profile_Click;
     navbar.button_FAQ.Click           += Navbar_Button_FAQ_Click;
     navbar.button_Notes.Click         += Navbar_Button_Notes_Click;
     navbar.button_TimeTable.Click     += Navbar_Button_TimeTable_Click;
     navbar.button_Notes.Style          = Application.Current.Resources["MenuButtonActive"] as Style;
     content.button_delete.Click       += Content_Button_delete_Click;
     content.button_add.MouseDown      += Content_Button_add_MouseDown;
     content.button_sortCreated.Click  += Content_Button_sortCreated_Click;
     content.button_sortDeadline.Click += Content_Button_sortDeadline_Click;
     content.button_sortSubject.Click  += Content_Button_sortCreated_Click;
     content.button_sortName.Click     += Content_Button_sortDeadline_Click;
     SortNotes(sorted);
     searchBar.textSearch.KeyDown += SearchBar_TextSearch_Search_On_KeyDown;
 }