private void ConfigureCatalogueExtractabilityUI_FormClosing(object sender, FormClosingEventArgs e) { if (!_choicesFinalised) { if (_importedNewTable) { var confirm = MessageBox.Show("The database table was created as part of this import. Do you want to keep that?", "Confirm", MessageBoxButtons.YesNoCancel); if (confirm != DialogResult.Cancel) { DialogResult = DialogResult.Cancel; _catalogue.DeleteInDatabase(); _catalogue = null; if (confirm == DialogResult.No) { _tableInfo.DeleteInDatabase(); _tableInfo = null; if (TableCreated != null && TableCreated.Exists()) { TableCreated.Drop(); } } else { Activator.Publish(TableInfoCreated); } } else { e.Cancel = true; } } else { if (MessageBox.Show( "Are you sure you want to Cancel?", "Confirm", MessageBoxButtons.YesNo) == DialogResult.Yes) { DialogResult = DialogResult.Cancel; _catalogue.DeleteInDatabase(); _catalogue = null; } else { e.Cancel = true; } } } else { if (CatalogueCreatedIfAny != null) { Activator.Publish(CatalogueCreatedIfAny); } } }
public void Handle(TableCreated e) { _tables.Save(new TableView() { Id = e.Id, Name = e.Name, BuyIn = e.BuyIn, SmallBlind = e.SmallBlind, MaxPlayers = e.MaxPlayers }); }
public void Handle(TableCreated e) { UsersHub.CurrentContext.Clients.Group(e.Metadata.UserId).goToTablesView(); }
/// <summary> /// Create table in DB /// </summary> protected virtual void OnTableCreated() { TableCreated?.Invoke(this, System.EventArgs.Empty); }
protected virtual void OnTableCreated(TableEventArgs e) => TableCreated?.Invoke(this, e);
/// <summary> /// /// </summary> /// <param name="tableInfo"></param> public static void TableCreatedInvoke(TableInfo tableInfo) { TableCreated?.Invoke(tableInfo); }