コード例 #1
0
        private void btn_addNote_Click(object sender, RoutedEventArgs e)
        {
            TVStaffNote      rawNote    = new TVStaffNote();
            TVStaffNote      note       = new TVStaffNote();
            var              builder    = new StringBuilder();
            TvViewStaffNotes staffNotes = new TvViewStaffNotes(dGrid_staffTvNotes);

            staffNotes.createHeader();


            rawNote.Notes = txtBox_notes.Text.ToString();

            for (int i = 0; i < txtBox_notes.LineCount; i++)
            {
                builder.Append(txtBox_notes.GetLineText(i));
                builder.Append(System.Environment.NewLine);
            }


            note.Notes = builder.ToString();

            if (note.Notes != "")
            {
                staffNotes.addNote(note.Notes);
                txtBox_notes.Clear();
            }
        }
コード例 #2
0
        /// <summary>
        /// Adds a string note to the datagrid
        /// </summary>
        /// <param name="note"></param>
        public void addNote(string note)
        {
            TVStaffNote staffNote = new TVStaffNote();
            DataGridRow newRow    = new DataGridRow();

            staffNote.Notes = note;

            newRow.Item = staffNote;
            dataGrid.Items.Add(newRow);
            updateRowHeight();
        }
コード例 #3
0
        public void intialScheduleLoad()
        {
            Repository.ScheduleRepository.LoadTvView(dGrid_staffTvFullscreen, cb_Box, token);
            TVStaffNote      rawNote    = new TVStaffNote();
            TVStaffNote      note       = new TVStaffNote();
            var              builder    = new StringBuilder();
            TvViewStaffNotes staffNotes = new TvViewStaffNotes(dGrid_staffTvNotesFullscreen);

            staffNotes.createHeader();

            loadNotes();
        }