Пример #1
0
        public SidePaneTreeStore(BibtexRecords btRecords)
        {
            bibtexRecords = btRecords;

            bibtexRecords.RecordModified += OnBibtexRecordModified;
            bibtexRecords.RecordAdded    += OnBibtexRecordAdded;
            bibtexRecords.RecordDeleted  += OnBibtexRecordDeleted;

            var coltype = new GLib.GType[1];

            coltype[0]  = (GLib.GType) typeof(string);
            ColumnTypes = coltype;
            WriteLine(10, "Adding Side Pane Filter Categories");

            iterAll = AppendNode();
            SetValue(iterAll, 0, "All");
            iterAuth = AppendNode();
            SetValue(iterAuth, 0, "Author");
            iterYear = AppendNode();
            SetValue(iterYear, 0, "Year");
            iterJourn = AppendNode();
            SetValue(iterJourn, 0, "Journal");

            InitialiseTreeStore();
        }
Пример #2
0
 public void SetBibtexRecords(BibtexRecords btRecords)
 {
     bibtexRecords = btRecords;
     bibtexRecords.RecordModified += OnBibtexRecordModified;
     bibtexRecords.RecordAdded    += OnBibtexRecordAdded;
     bibtexRecords.RecordDeleted  += OnBibtexRecordDeleted;
     InitialiseTreeStore();
 }
Пример #3
0
 public void SubscribeAlteredRecords(BibtexRecords records)
 {
     Enter(alterationMonitorQueue);
     foreach (BibtexRecord record in records)
     {
         if (!alterationMonitorQueue.Contains(records))
         {
             alterationMonitorQueue.Enqueue(record);
         }
     }
     Exit(alterationMonitorQueue);
 }
Пример #4
0
        public void SetBibtexRecords(BibtexRecords btRecords)
        {
            Clear();

            bibtexRecords                = btRecords;
            bibtexRecords.RecordAdded   += OnRecordAdded;
            bibtexRecords.RecordDeleted += OnRecordDeleted;

            foreach (BibtexRecord record in btRecords)
            {
                Debug.WriteLine(10, "Inserting record");
                Gtk.TreeIter iter = Append();
                SetValue(iter, 0, record);
            }
        }
Пример #5
0
        public LitListStore(BibtexRecords btRecords)
        {
            var coltype = new GLib.GType[1];

            coltype[0]  = (GLib.GType) typeof(BibtexRecord);
            ColumnTypes = coltype;

            if (btRecords == null)
            {
                // TODO: Throw a proper exception here!!
                throw (new Exception());
            }
            //if (btRecords == null)
            //    this.bibtexRecords = new BibtexRecords ();
            //else
            //    this.bibtexRecords = btRecords;

            //this.bibtexRecords.RecordAdded += this.OnRecordAdded;
            //this.bibtexRecords.RecordDeleted += this.OnRecordDeleted;
        }