private void button1_Click_1(object sender, EventArgs e) { if (!DBiFace.IsDBAvailable()) { return; } // ReSharper disable once UnusedVariable var v = new WaitWindow.Window(this, handler => DBiFace.AccDB.Retriever.GetFinishWindow += handler, handler => DBiFace.AccDB.Retriever.GetFinishWindow += handler, 700); if (radioCharname.Checked) { DBiFace.AccDB.Retriever.GetMetasByName(textBox1.Text); } if (radioAccID.Checked) { DBiFace.AccDB.Retriever.GetAccountChars(textBox1.Text, checkSearchDeleted.Checked); } if (radioCharCode.Checked) { DBiFace.AccDB.Retriever.GetMetasByCharID(textBox1.Text); } if (radioIP.Checked) { DBiFace.AccDB.Retriever.GetAccountsByIP(textBox1.Text); } }
private void stopScannerToolStripMenuItem_Click(object sender, EventArgs e) { if (DBiFace.IsDBAvailable()) { DBiFace.AccDB.Scan.Cancel(); } }
private void FillPlayerData(Character ch) { _curCharacter = ch; foreach (var b in GetAll(tabPage2, typeof(Button))) { b.Enabled = true; } tabPage5.Enabled = true; //TODO: background DBiFace.AccDB.LoginDB.IPDataReady.Add((sender, e) => olvIP.SetObjects((List <IPData>)sender)); DBiFace.AccDB.LoginDB.GetIPByAccID(_curCharacter.AccountID); DBiFace.AccDB.LoginDB.IDDataReady.Add((sender, e) => olvID.SetObjects((List <IDData>)sender)); DBiFace.AccDB.LoginDB.GetIDByAccID(_curCharacter.AccountID); //olvIP.SetObjects(); textBoxName.Text = _curCharacter.Name; textBoxMoney.Text = _curCharacter.Money.ToString(CultureInfo.InvariantCulture); //comboBoxSystem.SelectedValue = _curCharacter.System.ToLowerInvariant(); comboBoxShip.SelectedValue = _curCharacter.ShipArch; checkBanned.Checked = ch.IsBanned; checkBanned2.Checked = checkBanned.Checked; rtbBanReason.Text = DBiFace.AccDB.Bans.GetAccBanReason(_curCharacter.AccountID); textAccID.Text = ch.AccountID; textAdminRights.Text = ch.AdminRights; FillLocationBox(ch.System, ch.Base); var ship = Universe.Gis.Ships.FindByHash(_curCharacter.ShipArch); if (ship != null) { labelHoldSize.Text = String.Format("Hold size: {0}", ship.HoldSize); } RefreshCargoSpace(); dateLastOnline.MaxDate = DateTime.Now; dateLastOnline.Value = _curCharacter.LastOnline; olvRep.SetObjects(_curCharacter.Reputation.ToList()); olvCargo.SetObjects(null); olvCargo.SetObjects(_curCharacter.Cargo); var eqList = EquipTable.GetTable(_curCharacter, _log); dlvEquipment.DataSource = eqList; if (DBiFace.IsHookAvailable()) { checkIsOnline.Checked = DBiFace.HookTransport.IsOnServer(_curCharacter.Name); } textCreatedAt.Text = _curCharacter.Created.ToLongDateString(); }
private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { if (DBiFace.IsDBAvailable()) { DBiFace.GetOnlineTable(); } var set = new Settings(_log); set.ShowDialog(); }
private void MainForm_Shown(object sender, EventArgs e) { DBiFace.InitiateDB(Properties.Settings.Default.DBType, Properties.Settings.Default.DBPath, Properties.Settings.Default.FLDBPath, _log); if (!DBiFace.IsDBAvailable()) { return; } DBiFace.UpdateDB(); }
private void updateDBToolStripMenuItem_Click(object sender, EventArgs e) { DBiFace.UpdateDB(); }
private void rescanDBToolStripMenuItem_Click(object sender, EventArgs e) { DBiFace.RescanDB(Properties.Settings.Default.DBAggressiveScan); }
private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { DBiFace.PlayerDBCommitted -= DBiFace_PlayerDBCommitted; DBiFace.CloseDB(); }