示例#1
0
        public void OpenDatabaseRecord(DataCoreDatabase dataCore, DataCoreRecord record)
        {
            foreach (TabItem existing_tab in Tabs.Items)
            {
                if (record.ID == existing_tab.DataContext as Guid?)
                {
                    Tabs.SelectedValue = existing_tab;
                    return;
                }
            }

            TabItem tab = new TabItem();

            var name = record.Name;

            tab.Header      = name;
            tab.DataContext = record.ID;

            var closable_tab_style = this.FindResource("ClosableTab");

            tab.Style = closable_tab_style as Style;

            tab.Content = new DatabaseStructureView(dataCore, record.Instance, true);

            Tabs.Items.Add(tab);
            Tabs.SelectedItem = tab;
            tab.IsSelected    = true;
        }
示例#2
0
 public DatabaseRecordSearchResult(DataCoreDatabase dataCore, DataCoreRecord record)
 {
     this.Database = dataCore;
     this.Record   = record;
 }