Exemple #1
0
        private void buttonOrdersFetch_Click(object sender, EventArgs e)
        {
            if (-1 == this.toolStripComboBoxCharacterSelection.SelectedIndex)
            {
                return;
            }

            CharacterObject charObj = (CharacterObject)
                                      this.toolStripComboBoxCharacterSelection.SelectedItem;

            EveApiId id = new EveApiId(charObj.UserID, charObj.FullKey);
            CharacterOrderCollection collection =
                EveApi.GetCharacterOrderList(m_db, id, charObj.CharID, true);

            m_db.InsertRecord(null as ProcessingDlg, collection);
        }
Exemple #2
0
        private void listBoxCharacters_SelectedIndexChanged(object sender, EventArgs e)
        {
            ListBox lb = (ListBox)sender;

            if (-1 == lb.SelectedIndex)
            {
                this.textBoxUserName.Text   = "";
                this.textBoxUserID.Text     = "";
                this.textBoxLimitedKey.Text = "";
                this.textBoxFullKey.Text    = "";
                this.textBoxRegCode.Text    = "";
            }
            else
            {
                CharacterObject obj = (CharacterObject)lb.SelectedItem;
                this.textBoxUserName.Text   = obj.CharName;
                this.textBoxUserID.Text     = obj.UserID.ToString();
                this.textBoxLimitedKey.Text = obj.LimitedKey;
                this.textBoxFullKey.Text    = obj.FullKey;
                this.textBoxRegCode.Text    = obj.RegCode;
            }
        }
Exemple #3
0
        private void buttonTransactionFetch_Click(object sender, EventArgs e)
        {
            if (-1 == this.toolStripComboBoxCharacterSelection.SelectedIndex)
            {
                return;
            }

            CharacterObject charObj = (CharacterObject)
                                      this.toolStripComboBoxCharacterSelection.SelectedItem;

            EveApiId id = new EveApiId(charObj.UserID, charObj.FullKey);
            CharacterTransactionCollection collection =
                EveApi.GetCharacterTransactionList(m_db, id, charObj.CharID, null, true);

            if (null == collection)
            {
                return;
            }

            Logger.ReportNotice("Using BulkLoader");
            collection.DoBulkLoader(m_db);
            Logger.ReportNotice("Done With BulkLoader");
        }
        private void toolStripMenuItemCorpEditWalletName_Click(object sender, EventArgs e)
        {
            if (-1 == this.toolStripComboBoxCharacterSelection.SelectedIndex)
            {
                return;
            }

            CharacterObject charObj = (CharacterObject)
                                      this.toolStripComboBoxCharacterSelection.SelectedItem;
            CorpWalletNameObjectWritable wallet = ReadWalletNames();

            CorpEditWalletNamesDlg dlg = new CorpEditWalletNamesDlg();

            dlg.SetObject(wallet);
            DialogResult ret = dlg.ShowDialog();

            if (ret == DialogResult.OK)
            {
                dlg.GetObject(wallet);
                CorpWalletNameCollection newCol = new CorpWalletNameCollection();
                newCol.AppendList(false, long.Parse(charObj.CorpID), wallet);
                m_db.InsertOrUpdateRecord(newCol);
            }
        }
Exemple #5
0
 public Character(CharacterObject obj)
 {
     m_DataObject = (CharacterObjectInternal)obj;
 }
        private void buttonCorpJournalFilter_Click(object sender, EventArgs e)
        {
            listViewCorpJournal.Items.Clear();

            if (-1 == this.toolStripComboBoxCharacterSelection.SelectedIndex)
            {
                return;
            }

            CharacterObject charObj = (CharacterObject)
                                      this.toolStripComboBoxCharacterSelection.SelectedItem;

            CorporationJournalCollection col = new CorporationJournalCollection();
            IDBCollection       icol         = col as IDBCollection;
            JournalFilterObject obj          = comboBoxCorpJournalFilter.SelectedItem as JournalFilterObject;

            if (null != obj)
            {
                if (1 == obj.Count)
                {
                    icol.SetConstraint((long)CorporationJournal.QueryValues.refType,
                                       new DBConstraint(DBConstraint.QueryConstraints.Equal, obj.Value(0)));
                }
                else if (0 != obj.Count)
                {
                    throw new NotImplementedException();
                }
            }

            JournalFilterObject WalletObj = comboBoxCorpJournal.SelectedItem as JournalFilterObject;

            if (null != WalletObj)
            {
                if (1 == WalletObj.Count)
                {
                    icol.SetConstraint((long)CorporationJournal.QueryValues.Division,
                                       new DBConstraint(DBConstraint.QueryConstraints.Equal, WalletObj.Value(0)));
                }
                else if (0 != WalletObj.Count)
                {
                    throw new NotImplementedException();
                }
            }

            DateTime start = dateTimePickerCorpJournalStart.Value;
            DateTime end   = dateTimePickerCorpJournalEnd.Value;

            if (!checkBoxCorpJournalStartUseTime.Checked)
            {
                start = start.Date;
            }
            if (!checkBoxCorpJournalEndUseTime.Checked)
            {
                end = end.Date.AddDays(1).AddSeconds(-1);
            }

            icol.SetConstraint((long)CorporationJournal.QueryValues.CorpID,
                               new DBConstraint(DBConstraint.QueryConstraints.Equal, long.Parse(charObj.CorpID)));
            icol.SetConstraint((long)CorporationJournal.QueryValues.date,
                               new DBConstraint(DBConstraint.QueryConstraints.Between,
                                                start.ToOADate(), end.ToOADate()));

            icol.SetSortConstraint((long)CorporationJournal.QueryValues.date,
                                   new DBSortConstraint(DBSortConstraint.SortConstraints.Ascending));

            if (Database.DatabaseError.NoError == this.m_db.ReadRecord(icol))
            {
                IDBCollectionContents icolcon = col as IDBCollectionContents;
                for (long i = 0; i < icolcon.Count(); ++i)
                {
                    listViewCorpJournal.Items.Add(new JournalListViewItem(icolcon.GetRecordInterface(i).GetDataObject() as JournalObject));
                }
            }
        }