Exemple #1
0
        private void buttonSelectCharacter_Click(object sender, EventArgs e)
        {
            if (0 == this.textBoxUserID.Text.Length ||
                (0 == this.textBoxLimitedKey.Text.Length && 0 == this.textBoxFullKey.Text.Length)
                )
            {
                MessageBox.Show("You must enter a UserID, and a Key before selecting a character.");
                return;
            }
            EveApiId id = new EveApiId(this.textBoxUserID.Text,
                                       (0 != textBoxFullKey.Text.Length) ? textBoxFullKey.Text : textBoxLimitedKey.Text);
            CharacterCollection   col = EveApi.GetCharacterList(m_db, id);
            IDBCollectionContents con = (IDBCollectionContents)col;

            if (1 > con.Count())
            {
                return;
            }

            ListSelectDlg ls = new ListSelectDlg();

            for (int i = 0; i < con.Count(); ++i)
            {
                IDBRecord rec = con.GetRecordInterface(i);
                rec.SetValueString((ulong)Character.QueryValues.UserID, this.textBoxUserID.Text);
                rec.SetValueString((ulong)Character.QueryValues.LimitedKey, this.textBoxLimitedKey.Text);
                rec.SetValueString((ulong)Character.QueryValues.FullKey, this.textBoxFullKey.Text);
                rec.SetValueString((ulong)Character.QueryValues.RegCode, this.textBoxRegCode.Text);
                CharacterObject obj  = (CharacterObject)rec.GetDataObject();
                string          test = obj.ToString();
                ls.List.Items.Add(obj);
            }

            Button btn = (Button)sender;

            ls.Location = this.PointToScreen(new Point(btn.Location.X, btn.Location.Y + btn.Height));
            DialogResult ret = ls.ShowDialog();

            if (DialogResult.OK == ret)
            {
                CharacterObject newObj = (CharacterObject)ls.List.SelectedItem;
                foreach (CharacterObject obj in this.listBoxCharacters.Items)
                {
                    if (0 == obj.ToString().CompareTo(newObj.ToString()))
                    {
                        this.listBoxCharacters.SelectedItem = obj;
                        this.textBoxLimitedKey.Text         = this.textBoxLimitedKey.Text;
                        this.textBoxFullKey.Text            = this.textBoxFullKey.Text;
                        return;
                    }
                }
                this.listBoxCharacters.SelectedIndex = -1;
                m_SelectedObject = newObj;
                FillFromNewCharacter();
            }
        }
Exemple #2
0
        private void CharacterEditor_Load(object sender, EventArgs e)
        {
            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.listBoxCharacters.Items.Add(rec.GetDataObject());
            }
        }
Exemple #3
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)
            {
            }
        }