mirror of
https://github.com/correl/mage.git
synced 2025-04-13 17:00:09 -09:00
* Client - The table panel is loaded automatically as getting connected to a server.
This commit is contained in:
parent
cf3a50d572
commit
59142feb41
2 changed files with 12 additions and 5 deletions
Mage.Client/src/main/java/mage/client
|
@ -711,7 +711,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
connection.setAvatarId(avatarId);
|
connection.setAvatarId(avatarId);
|
||||||
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
||||||
logger.debug("connecting (auto): " + proxyType + " " + proxyServer + " " + proxyPort + " " + proxyUsername);
|
logger.debug("connecting (auto): " + proxyType + " " + proxyServer + " " + proxyPort + " " + proxyUsername);
|
||||||
if (MageFrame.connect(connection)) {
|
if (MageFrame.connect(connection)) {
|
||||||
|
showGames();
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
showMessage("Unable to connect to server");
|
showMessage("Unable to connect to server");
|
||||||
|
@ -887,9 +888,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
}//GEN-LAST:event_btnDeckEditorActionPerformed
|
}//GEN-LAST:event_btnDeckEditorActionPerformed
|
||||||
|
|
||||||
private void btnGamesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGamesActionPerformed
|
private void btnGamesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGamesActionPerformed
|
||||||
this.tablesPane.setVisible(true);
|
this.showGames();
|
||||||
this.tablesPane.showTables();
|
|
||||||
setActive(tablesPane);
|
|
||||||
}//GEN-LAST:event_btnGamesActionPerformed
|
}//GEN-LAST:event_btnGamesActionPerformed
|
||||||
|
|
||||||
private void btnExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExitActionPerformed
|
private void btnExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnExitActionPerformed
|
||||||
|
@ -971,6 +970,12 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
this.tablesPane.hideTables();
|
this.tablesPane.hideTables();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void showGames() {
|
||||||
|
this.tablesPane.setVisible(true);
|
||||||
|
this.tablesPane.showTables();
|
||||||
|
setActive(tablesPane);
|
||||||
|
}
|
||||||
|
|
||||||
public void hideGames() {
|
public void hideGames() {
|
||||||
JInternalFrame[] windows = desktopPane.getAllFramesInLayer(JLayeredPane.DEFAULT_LAYER);
|
JInternalFrame[] windows = desktopPane.getAllFramesInLayer(JLayeredPane.DEFAULT_LAYER);
|
||||||
for (JInternalFrame window : windows) {
|
for (JInternalFrame window : windows) {
|
||||||
|
@ -1107,6 +1112,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
||||||
}
|
}
|
||||||
instance = new MageFrame();
|
instance = new MageFrame();
|
||||||
instance.setVisible(true);
|
instance.setVisible(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -335,8 +335,9 @@ public class ConnectDialog extends MageDialog {
|
||||||
get();
|
get();
|
||||||
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||||
if (result) {
|
if (result) {
|
||||||
lblStatus.setText("");
|
lblStatus.setText("");
|
||||||
connected();
|
connected();
|
||||||
|
MageFrame.getInstance().showGames();
|
||||||
} else {
|
} else {
|
||||||
lblStatus.setText("Could not connect");
|
lblStatus.setText("Could not connect");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue