Beispiel #1
0
        public static void InitConstants(Database db)
        {
            ReferenceTypeCollection col = new ReferenceTypeCollection();

            db.ReadRecord(col as IDBCollection);
            IDBCollectionContents icol = col as IDBCollectionContents;

            for (long i = 0; i < icol.Count(); ++i)
            {
                IDBRecord           rec = icol.GetRecordInterface(i);
                ReferenceTypeObject obj = rec.GetDataObject() as ReferenceTypeObject;
                m_RefValues.Add((int)obj.refTypeID, obj.refTypeName);
            }
        }
Beispiel #2
0
        public Form1()
        {
            InitializeComponent();

            //if (!AppData.bDEBUG)
            //    this.debugToolStripMenuItem.Visible = false;

            Logger.SetLogger(this.richTextBoxLogging);
            m_db = new Database();
            if (!m_db.IsOpen())
            {
                return;
            }

            CharacterCollection charcol = new CharacterCollection();

            m_db.ReadRecord(charcol);
            IDBCollectionContents col = (IDBCollectionContents)charcol;

            for (long idx = 0; idx < col.Count(); idx++)
            {
                IDBRecord rec = col.GetRecordInterface(idx);
                this.toolStripComboBoxCharacterSelection.Items.Add(rec.GetDataObject());
            }
            if (0 != this.toolStripComboBoxCharacterSelection.Items.Count)
            {
                this.toolStripComboBoxCharacterSelection.SelectedIndex = 0;
            }

            Logger.ReportNotice("Initializing Reference Types Collection");
            ReferenceTypeCollection refCol = EveApi.GetRefTypesList(m_db, false);

            //m_db.InsertRecord(refCol);
            Logger.ReportNotice("Using BulkLoader");
            refCol.DoBulkLoader(m_db);
            Logger.ReportNotice("Done With BulkLoader");

            AppData.InitConstants(m_db);
            CharJournalInit();
            CharTransactionInit();
            CorpJournalInit();
            CorpTransInit();

            if (AppData.bAutoFetch)
            {
            }
        }