public void addRecord(BibTeXRecord newRecord)
 {
     this.records.Add(newRecord);
 }
示例#2
0
文件: GUI.cs 项目: Cantanos/BibTeX
        private void fillDetailedGridView(BibTeXRecord record)
        {
            gridViewEntryDetail.Rows.Add(2);
            gridViewEntryDetail.Rows[0].Cells[0].Value = "Type";
            gridViewEntryDetail.Rows[0].Cells[1].Value = record.Type;
            gridViewEntryDetail.Rows[0].Cells[2].Value = true;
            gridViewEntryDetail.Rows[0].Cells[2].ReadOnly = true;

            gridViewEntryDetail.Rows[1].Cells[0].Value = "ID";
            gridViewEntryDetail.Rows[1].Cells[1].Value = record.ID;
            gridViewEntryDetail.Rows[1].Cells[2].Value = true;
            gridViewEntryDetail.Rows[1].Cells[2].ReadOnly = true;

            foreach (Style tempStyle in styleCollection.Styles)
            {
                gridViewComboBox.Items.Add(tempStyle.Name);
            }

            gridViewEntryDetail.Rows[0].Cells[3].Value = gridViewComboBox.Items[0];
            gridViewEntryDetail.Rows[1].Cells[3].Value = gridViewComboBox.Items[0];

            foreach (Parameter parameter in record.Parameters.Values)
            {
                gridViewEntryDetail.Rows.Add();

                gridViewEntryDetail.Rows[gridViewEntryDetail.Rows.Count - 1].Cells[0].Value = parameter.Name;
                gridViewEntryDetail.Rows[gridViewEntryDetail.Rows.Count - 1].Cells[1].Value = parameter.Value;
                gridViewEntryDetail.Rows[gridViewEntryDetail.Rows.Count - 1].Cells[2].Value = bibEntryContent.getEnabled(parameter.Name);
                gridViewEntryDetail.Rows[gridViewEntryDetail.Rows.Count - 1].Cells[3].Value = gridViewComboBox.Items[styleCollection.getStyleIndex(bibEntryContent.getStyle(parameter.Name))]; //HARDCORE!!
            }
        }
示例#3
0
 BibTeXRecord prepareRecord(string toPrepare)
 {
     BibTeXRecord result = new BibTeXRecord(getParameters(toPrepare));
     result.Type = readType(toPrepare);
     result.ID = readID(toPrepare);
     return result;
 }