コード例 #1
0
        /// <summary>
        /// Displays given record page
        /// </summary>
        void ShowRecord(RecordPage recordPage)
        {
            if (openedRecords.Any(rp => rp.recordId == recordPage.recordId))
            {
                openedRecords.First(rp => rp.recordId == recordPage.recordId).Activate();
                return;
            }

            recordPage.Show();
            openedRecords.Add(recordPage);
        }
コード例 #2
0
        private void NewRecord_click(object sender, RoutedEventArgs e)
        {
            RecordPage creationPage = new RecordPage(this);

            ShowRecord(creationPage);
        }
コード例 #3
0
 /// <summary>
 /// Closes given record page
 /// </summary>
 public void CloseRecordPage(RecordPage page)
 {
     openedRecords.Remove(page);
 }
コード例 #4
0
        /// <summary>
        /// Shows record window for record with given id
        /// </summary>
        void EditRecord(int id)
        {
            RecordPage recordPage = new RecordPage(this, Records.First(r => r.Id == id));

            ShowRecord(recordPage);
        }