Exemple #1
0
 //Begin code
 public Main()
 {
     InitializeComponent();
     this.client = new BattleshipServiceClient(new InstanceContext(this));
     roomsPage   = new RoomsPage(this);
     SetContent(roomsPage);
     loginPage = new LoginPage(this);
     ((RoomsPage)this.Content).grid.Children.Add(loginPage);
     loginPage.SetValue(Grid.RowSpanProperty, 4);
     loginPage.SetValue(Grid.ColumnSpanProperty, 2);
     this.Closing += Dispatcher_ShutdownStarted;
     chat          = "";
 }
Exemple #2
0
 public Main()
 {
     InitializeComponent();
     this.client = new BattleshipServiceClient(new InstanceContext(this));
     roomsPage = new RoomsPage(this);
     SetContent(roomsPage);
     loginPage = new LoginPage(this);
     ((RoomsPage)this.Content).grid.Children.Add(loginPage);
     loginPage.SetValue(Grid.RowSpanProperty, 4);
     loginPage.SetValue(Grid.ColumnSpanProperty, 2);
     this.Closing += Dispatcher_ShutdownStarted;
     chat = "";
 }
Exemple #3
0
 public void CantConnectToServer(string message)
 {
     MessageBox.Show(message, "Can't connect to server!", MessageBoxButton.OK, MessageBoxImage.Error);
     client = null;
     Application.Current.Shutdown();
 }
Exemple #4
0
 public void CantConnectToServer(string message)
 {
     MessageBox.Show(message, "Can't connect to server!", MessageBoxButton.OK, MessageBoxImage.Error);
     client = null;
     Application.Current.Shutdown();
 }