00001 #define Cubes3D_FULLSCREEN
00002
00003 using System;
00004 using System.IO;
00005 using System.Collections.Generic;
00006 using System.ComponentModel;
00007 using System.Data;
00008 using System.Drawing;
00009 using System.Text;
00010 using System.Windows.Forms;
00011 using Resolution;
00012
00013 using GRV11;
00014
00015 namespace Cubes3D
00016 {
00017 public partial class MainForm : Form
00018 {
00019
00020 private ClientConfig FClientConfig = null;
00021 private ClientHandler FClientHandler = null;
00022 private GRV11.GRControl FGameGRControl = null;
00023 private ServerHandler FServerHandler = null;
00024
00025 private byte FClientWait = 0;
00026 private byte FServerWait = 0;
00027
00028 private int FDuration = 0;
00029 private int FHighscore = -1;
00030
00031 #if Cubes3D_FULLSCREEN
00032 private Point FResolution;
00033 #endif //Cubes3D_FULLSCREEN
00034
00035 public MainForm()
00036 {
00037 InitializeComponent();
00038 }
00039
00040 private void Form1_Load(object sender, EventArgs e)
00041 {
00042 FClientConfig = new ClientConfig();
00043
00044 GameTabPage.SuspendLayout();
00045 MainTabControl.SuspendLayout();
00046 SuspendLayout();
00047
00048
00049 FGameGRControl = new GRV11.GRControl();
00050 FGameGRControl.Name = "GameGRControl";
00051 FGameGRControl.TabIndex = 0;
00052 FGameGRControl.TabStop = true;
00053 FGameGRControl.Text = "";
00054 FGameGRControl.BackColor = Color.Black;
00055
00056 GameTabPage.Controls.Add(FGameGRControl);
00057
00058
00059
00060
00061 GameTabPage.ResumeLayout(false);
00062 MainTabControl.ResumeLayout(false);
00063 ResumeLayout(false);
00064
00065
00067
00068 MainTabControl.SelectedTab = TitleTabPage;
00069 Cursor.Hide();
00070 TitleTimer.Enabled = true;
00071
00072 #if Cubes3D_FULLSCREEN
00073 FormBorderStyle = FormBorderStyle.None;
00074 Height = Screen.PrimaryScreen.Bounds.Height;
00075 Left = 0;
00076 Top = 0;
00077 Width = Screen.PrimaryScreen.Bounds.Width;
00078
00079
00080
00081 FResolution = new Point(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height);
00082 Resolution.ScreenResolution.ChangeResolution(1024, 768);
00083
00084 BringToFront();
00085 #endif //Cubes3D_FULLSCREEN
00086
00087 MainForm_ResizeEnd(null, null);
00088 MainTabControl.CausesValidation = false;
00089 }
00090
00091 private void MainForm_ResizeEnd(object sender, EventArgs e)
00092 {
00093
00094 Point lMaxHidden = HiddenTabPage.PointToScreen(new Point(HiddenTabPage.ClientRectangle.Width - 1, HiddenTabPage.ClientRectangle.Height - 1));
00095 Point lMaxMain = MainTabControl.PointToScreen(new Point(MainTabControl.ClientRectangle.Width - 1, MainTabControl.ClientRectangle.Height - 1));
00096
00097
00098 Point lMinHidden = HiddenTabPage.PointToScreen(new Point(0, 0));
00099 Point lMinMain = MainTabControl.PointToScreen(new Point(0, 0));
00100
00101
00102 MainTabControl.Left = (lMinMain.X - lMinHidden.X);
00103 MainTabControl.Top = (lMinMain.Y - lMinHidden.Y);
00104
00105
00106 MainTabControl.Height = ClientRectangle.Height + (lMinHidden.Y - lMinMain.Y) +(lMaxMain.Y - lMaxHidden.Y);
00107 MainTabControl.Width = ClientRectangle.Width + (lMinHidden.X - lMinMain.X) +(lMaxMain.X - lMaxHidden.X);
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123 if (FGameGRControl != null)
00124 {
00125
00126 FGameGRControl.Height = ClientRectangle.Height;
00127 FGameGRControl.Left = 0;
00128 FGameGRControl.Top = 0;
00129 FGameGRControl.Width = ClientRectangle.Width;
00130 }
00131 }
00132
00133 private void MainForm_Activated(object sender, EventArgs e)
00134 {
00135 if (FGameGRControl != null)
00136 {
00137
00138 FGameGRControl.Focus();
00139 }
00140 }
00141
00142
00143 protected override bool ProcessDialogKey(Keys keyData)
00144 {
00145
00146 if (new KeyEventArgs(keyData).KeyCode == Keys.Escape)
00147 {
00148 Close();
00149
00150 return true;
00151 }
00152
00153 if (MainTabControl.SelectedTab == TitleTabPage)
00154 {
00155 if (new KeyEventArgs(keyData).KeyCode == Keys.Return)
00156 {
00157 MainTabControl.SelectedTab = MenuTabPage;
00158
00159 return true;
00160 }
00161 }
00162
00163 if (MainTabControl.SelectedTab == ServerBTabPage)
00164 {
00165 if (new KeyEventArgs(keyData).KeyCode == Keys.Return)
00166 {
00167 FServerWait = 60;
00168
00169 return true;
00170 }
00171 }
00172
00173 if (MainTabControl.SelectedTab == GameTabPage)
00174 {
00175 if ((FGameGRControl != null) && (FClientHandler != null))
00176 {
00177 FClientHandler.KeyDown(FGameGRControl, new KeyEventArgs(keyData));
00178
00179 return true;
00180 }
00181 }
00182
00183 return base.ProcessDialogKey(keyData);
00184 }
00185
00186
00187 private void MainForm_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
00188 {
00189
00190 if (MainTabControl.SelectedTab == GameTabPage)
00191 {
00192 if ((FGameGRControl != null) && (FClientHandler != null))
00193 {
00194 FClientHandler.KeyDown(FGameGRControl, new KeyEventArgs(e.KeyData));
00195 }
00196 }
00197 }
00198
00199
00200 private void MainForm_KeyDown(object sender, KeyEventArgs e)
00201 {
00202 if (MainTabControl.SelectedTab == GameTabPage)
00203 {
00204 if ((FGameGRControl != null) && (FClientHandler != null))
00205 {
00206 FClientHandler.KeyDown(FGameGRControl, new KeyEventArgs(e.KeyData));
00207 }
00208 }
00209 }
00210
00211
00212 private void MainForm_KeyUp(object sender, KeyEventArgs e)
00213 {
00214 if (MainTabControl.SelectedTab == GameTabPage)
00215 {
00216 if ((FGameGRControl != null) && (FClientHandler != null))
00217 {
00218 FClientHandler.KeyUp(FGameGRControl, new KeyEventArgs(e.KeyData));
00219 }
00220 }
00221 }
00222
00223 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
00224 {
00225 if (FClientHandler != null)
00226 {
00227 FClientHandler.Kill = true;
00228 FClientHandler = null;
00229 }
00230
00231 if (FServerHandler != null)
00232 {
00233 FServerHandler.Kill = true;
00234 FServerHandler = null;
00235 }
00236
00237 #if Cubes3D_FULLSCREEN
00238 if (FResolution != null)
00239 {
00240 Resolution.ScreenResolution.ChangeResolution(FResolution.X, FResolution.Y);
00241 }
00242 #endif //Cubes3D_FULLSCREEN
00243 }
00244
00245 private void ServerWaitTimer_Tick(object sender, EventArgs e)
00246 {
00247 if (FServerHandler != null)
00248 {
00249 if (MainTabControl.SelectedTab == ServerBTabPage)
00250 {
00251 ServerWaitLabel.Visible = (!(ServerWaitLabel.Visible));
00252
00253 if ((FClientHandler.Acknowledged) && FClientConfig.LocalGame)
00254 {
00255 MainTabControl.SelectedTab = GameTabPage;
00256 FServerHandler.GameRunning = true;
00257 }
00258 else
00259 {
00260 FServerWait++;
00261 if (FServerWait > 60)
00262 {
00263 MainTabControl.SelectedTab = GameTabPage;
00264 FServerHandler.GameRunning = true;
00265 }
00266 }
00267 }
00268 }
00269 }
00270
00271 private void MainTabControl_SelectedIndexChanged(object sender, EventArgs e)
00272 {
00273 if (MainTabControl.SelectedTab == TitleTabPage)
00274 {
00275 Cursor.Hide();
00276
00277 TitleTimer.Enabled = true;
00278 }
00279 else
00280 {
00281 TitleTimer.Enabled = false;
00282 }
00283
00284 if (MainTabControl.SelectedTab == MenuTabPage)
00285 {
00286 Cursor.Show();
00287 }
00288
00289 if (MainTabControl.SelectedTab == OptionsTabPage)
00290 {
00291 Cursor.Show();
00292
00293 if (FClientConfig.RecordReplay)
00294 {
00295 ReplaysValueLabel.Text = "on";
00296 }
00297 else
00298 {
00299 ReplaysValueLabel.Text = "off";
00300 }
00301 }
00302
00303 if (MainTabControl.SelectedTab == ClientTabPage)
00304 {
00305 Cursor.Show();
00306
00307
00308 if (FClientHandler != null)
00309 {
00310 FClientHandler.Kill = true;
00311 FClientHandler = null;
00312 }
00313
00314
00315 FClientHandler = new ClientHandler(this, FGameGRControl, false);
00316 FClientHandler.PlayReplay = true;
00317 FClientHandler.RecordReplay = FClientConfig.RecordReplay;
00318
00319
00320 FGameGRControl.OpenGLStarted += new GRControl.DelegateOpenGLStarted(FClientHandler.OpenGLStarted);
00321 FGameGRControl.KeyDown += new KeyEventHandler(FClientHandler.KeyDown);
00322 FGameGRControl.KeyUp += new KeyEventHandler(FClientHandler.KeyUp);
00323 FGameGRControl.MouseDown += new MouseEventHandler(FClientHandler.MouseDown);
00324 FGameGRControl.MouseUp += new MouseEventHandler(FClientHandler.MouseUp);
00325 FGameGRControl.MouseMove += new MouseEventHandler(FClientHandler.MouseMove);
00326 FGameGRControl.MouseWheel += new MouseEventHandler(FClientHandler.MouseWheel);
00327 FGameGRControl.Paint += new PaintEventHandler(FClientHandler.Paint);
00328 FGameGRControl.KeyPress += new KeyPressEventHandler(FClientHandler.KeyPress);
00329
00330
00331 FClientHandler.Active = true;
00332 ClientTimer.Enabled = true;
00333
00334 FClientWait = 0;
00335 }
00336 else
00337 {
00338 ClientTimer.Enabled = false;
00339 }
00340
00341 if (MainTabControl.SelectedTab == ServerTabPage)
00342 {
00343 Cursor.Show();
00344 }
00345
00346 if (MainTabControl.SelectedTab == ServerBTabPage)
00347 {
00348 Cursor.Show();
00349
00350
00351 if (FServerHandler != null)
00352 {
00353 FServerHandler.Kill = true;
00354 FServerHandler = null;
00355 }
00356
00357
00358 if (File.Exists(FClientConfig.MapFile))
00359 {
00360 FServerHandler = new ServerHandler(FClientConfig.MapFile, FClientConfig.LocalGame);
00361 FServerHandler.Active = true;
00362
00363
00364 if (FClientHandler != null)
00365 {
00366 FClientHandler.Kill = true; ;
00367 FClientHandler = null;
00368 }
00369
00370
00371 FClientHandler = new ClientHandler(this, FGameGRControl, false);
00372 FClientHandler.PlayReplay = false;
00373 FClientHandler.RecordReplay = FClientConfig.RecordReplay;
00374
00375
00376 FGameGRControl.OpenGLStarted += new GRControl.DelegateOpenGLStarted(FClientHandler.OpenGLStarted);
00377 FGameGRControl.KeyDown += new KeyEventHandler(FClientHandler.KeyDown);
00378 FGameGRControl.KeyUp += new KeyEventHandler(FClientHandler.KeyUp);
00379 FGameGRControl.MouseDown += new MouseEventHandler(FClientHandler.MouseDown);
00380 FGameGRControl.MouseUp += new MouseEventHandler(FClientHandler.MouseUp);
00381 FGameGRControl.MouseMove += new MouseEventHandler(FClientHandler.MouseMove);
00382 FGameGRControl.MouseWheel += new MouseEventHandler(FClientHandler.MouseWheel);
00383 FGameGRControl.Paint += new PaintEventHandler(FClientHandler.Paint);
00384 FGameGRControl.KeyPress += new KeyPressEventHandler(FClientHandler.KeyPress);
00385
00386
00387 FClientHandler.Active = true;
00388 ServerTimer.Enabled = true;
00389
00390 FServerWait = 0;
00391 }
00392 }
00393 else
00394 {
00395 ServerTimer.Enabled = false;
00396 }
00397
00398 if (MainTabControl.SelectedTab == InfoTabPage)
00399 {
00400 Cursor.Show();
00401 }
00402
00403
00404 if (MainTabControl.SelectedTab == GameTabPage)
00405 {
00406 Cursor.Hide();
00407
00408 GameTimer.Enabled = true;
00409 }
00410 else
00411 {
00412 GameTimer.Enabled = false;
00413 }
00414
00415 if (MainTabControl.SelectedTab == HighscoreTabPage)
00416 {
00417 Cursor.Show();
00418
00419 FHighscore = FClientConfig.SetHighscore(FDuration);
00420
00421 int LMinutes = FDuration / 60000;
00422 int LSeconds = (FDuration % 60000) / 1000;
00423 PersonalLabel.Text = "Your Time: " + Convert.ToString(LMinutes) + ":" + Convert.ToString(LSeconds);
00424
00425 LMinutes = FClientConfig.Highscore[0] / 60000;
00426 LSeconds = (FClientConfig.Highscore[0] % 60000) / 1000;
00427 Highscore0Label.Text = "Rank A) " + Convert.ToString(LMinutes) + ":" + Convert.ToString(LSeconds);
00428
00429 LMinutes = FClientConfig.Highscore[1] / 60000;
00430 LSeconds = (FClientConfig.Highscore[1] % 60000) / 1000;
00431 Highscore1Label.Text = "Rank B) " + Convert.ToString(LMinutes) + ":" + Convert.ToString(LSeconds);
00432
00433 LMinutes = FClientConfig.Highscore[2] / 60000;
00434 LSeconds = (FClientConfig.Highscore[2] % 60000) / 1000;
00435 Highscore2Label.Text = "Rank C) " + Convert.ToString(LMinutes) + ":" + Convert.ToString(LSeconds);
00436
00437 LMinutes = FClientConfig.Highscore[3] / 60000;
00438 LSeconds = (FClientConfig.Highscore[3] % 60000) / 1000;
00439 Highscore3Label.Text = "Rank D) " + Convert.ToString(LMinutes) + ":" + Convert.ToString(LSeconds);
00440
00441 LMinutes = FClientConfig.Highscore[4] / 60000;
00442 LSeconds = (FClientConfig.Highscore[4] % 60000) / 1000;
00443 Highscore4Label.Text = "Rank E) " + Convert.ToString(LMinutes) + ":" + Convert.ToString(LSeconds);
00444
00445 Highscore0Label.Visible = true;
00446 Highscore1Label.Visible = true;
00447 Highscore2Label.Visible = true;
00448 Highscore3Label.Visible = true;
00449 Highscore4Label.Visible = true;
00450
00451 HighscoreTimer.Enabled = true;
00452 }
00453 else
00454 {
00455 HighscoreTimer.Enabled = false;
00456 }
00457 }
00458
00459 private void ExitLabel_MouseEnter(object sender, EventArgs e)
00460 {
00461 ExitLabel.Text = "EXIT";
00462 }
00463
00464 private void ExitLabel_MouseLeave(object sender, EventArgs e)
00465 {
00466 ExitLabel.Text = "exit";
00467 }
00468
00469 private void ExitLabel_Click(object sender, EventArgs e)
00470 {
00471 Close();
00472 }
00473
00474 private void InfoLabel_MouseEnter(object sender, EventArgs e)
00475 {
00476 InfoLabel.Text = "INFOS";
00477 }
00478
00479 private void InfoLabel_MouseLeave(object sender, EventArgs e)
00480 {
00481 InfoLabel.Text = "infos";
00482 }
00483
00484 private void InfoLabel_Click(object sender, EventArgs e)
00485 {
00486 MainTabControl.SelectedTab = InfoTabPage;
00487 }
00488
00489 private void BackLabel_MouseEnter(object sender, EventArgs e)
00490 {
00491 BackLabel.Text = "BACK";
00492 }
00493
00494 private void BackLabel_MouseLeave(object sender, EventArgs e)
00495 {
00496 BackLabel.Text = "back";
00497 }
00498
00499 private void BackLabel_Click(object sender, EventArgs e)
00500 {
00501 MainTabControl.SelectedTab = MenuTabPage;
00502 }
00503
00504 private void OptionsLabel_MouseEnter(object sender, EventArgs e)
00505 {
00506 OptionsLabel.Text = "OPTIONS";
00507 }
00508
00509 private void OptionsLabel_MouseLeave(object sender, EventArgs e)
00510 {
00511 OptionsLabel.Text = "options";
00512 }
00513
00514 private void OptionsLabel_Click(object sender, EventArgs e)
00515 {
00516 MainTabControl.SelectedTab = OptionsTabPage;
00517 }
00518
00519 private void Back2Label_MouseEnter(object sender, EventArgs e)
00520 {
00521 Back2Label.Text = "BACK";
00522 }
00523
00524 private void Back2Label_MouseLeave(object sender, EventArgs e)
00525 {
00526 Back2Label.Text = "back";
00527 }
00528
00529 private void Back2Label_Click(object sender, EventArgs e)
00530 {
00531 MainTabControl.SelectedTab = MenuTabPage;
00532 }
00533
00534 private void EnterLabel_MouseEnter(object sender, EventArgs e)
00535 {
00536 EnterLabel.Text = "ENTER GAME";
00537 }
00538
00539 private void EnterLabel_MouseLeave(object sender, EventArgs e)
00540 {
00541 EnterLabel.Text = "enter game";
00542 }
00543
00544 private void EnterLabel_Click(object sender, EventArgs e)
00545 {
00546 MainTabControl.SelectedTab = ClientTabPage;
00547 }
00548
00549 private void CreateLabel_MouseEnter(object sender, EventArgs e)
00550 {
00551 CreateLabel.Text = "CREATE GAME";
00552 }
00553
00554 private void CreateLabel_MouseLeave(object sender, EventArgs e)
00555 {
00556 CreateLabel.Text = "create game";
00557 }
00558
00559 private void CreateLabel_Click(object sender, EventArgs e)
00560 {
00561 MainTabControl.SelectedTab = ServerTabPage;
00562 }
00563
00564 private void ReplaysLabel_MouseEnter(object sender, EventArgs e)
00565 {
00566 ReplayLabel.Text = "RECORD REPLAYS";
00567 }
00568
00569 private void ReplaysLabel_MouseLeave(object sender, EventArgs e)
00570 {
00571 ReplayLabel.Text = "record replays";
00572 }
00573
00574 private void ReplaysLabel_Click(object sender, EventArgs e)
00575 {
00576 FClientConfig.RecordReplay = (!(FClientConfig.RecordReplay));
00577
00578 if (FClientConfig.RecordReplay)
00579 {
00580 ReplaysValueLabel.Text = "on";
00581 }
00582 else
00583 {
00584 ReplaysValueLabel.Text = "off";
00585 }
00586 }
00587
00588 private void TitleTimer_Tick(object sender, EventArgs e)
00589 {
00590 KeyLabel.Visible = (!(KeyLabel.Visible));
00591 }
00592
00593 private void ClientTimer_Tick(object sender, EventArgs e)
00594 {
00595 if (FClientHandler != null)
00596 {
00597 if (MainTabControl.SelectedTab == ClientTabPage)
00598 {
00599 ClientWaitLabel.Visible = (!(ClientWaitLabel.Visible));
00600
00601 if (FClientHandler.Acknowledged)
00602 {
00603 MainTabControl.SelectedTab = GameTabPage;
00604 }
00605 else
00606 {
00607 FClientWait++;
00608 if (FClientWait > 60)
00609 {
00610 FClientHandler.Kill = true;
00611 FClientHandler = null;
00612
00613 MainTabControl.SelectedTab = MenuTabPage;
00614 }
00615 }
00616 }
00617 }
00618 }
00619
00620 private void LocalLabel_MouseEnter(object sender, EventArgs e)
00621 {
00622 LocalLabel.Text = "LOCAL GAME";
00623 }
00624
00625 private void LocalLabel_MouseLeave(object sender, EventArgs e)
00626 {
00627 LocalLabel.Text = "local game";
00628 }
00629
00630 private void RemoteLabel_MouseEnter(object sender, EventArgs e)
00631 {
00632 RemoteLabel.Text = "REMOTE GAME";
00633 }
00634
00635 private void RemoteLabel_MouseLeave(object sender, EventArgs e)
00636 {
00637 RemoteLabel.Text = "remote game";
00638 }
00639
00640 private void Back3label_MouseEnter(object sender, EventArgs e)
00641 {
00642 Back3label.Text = "BACK";
00643 }
00644
00645 private void Back3label_MouseLeave(object sender, EventArgs e)
00646 {
00647 Back3label.Text = "back";
00648 }
00649
00650 private void Back3label_Click(object sender, EventArgs e)
00651 {
00652 MainTabControl.SelectedTab = MenuTabPage;
00653 }
00654
00655 private void RemoteLabel_Click(object sender, EventArgs e)
00656 {
00657 OpenFileDialog.InitialDirectory = System.Environment.CurrentDirectory;
00658 if (OpenFileDialog.ShowDialog() == DialogResult.OK)
00659 {
00660 FClientConfig.LocalGame = false;
00661 FClientConfig.MapFile = OpenFileDialog.FileName;
00662
00663 MainTabControl.SelectedTab = ServerBTabPage;
00664 }
00665 }
00666
00667 private void LocalLabel_Click(object sender, EventArgs e)
00668 {
00669 OpenFileDialog.InitialDirectory = System.Environment.CurrentDirectory;
00670 if (OpenFileDialog.ShowDialog() == DialogResult.OK)
00671 {
00672 FClientConfig.LocalGame = true;
00673 FClientConfig.MapFile = OpenFileDialog.FileName;
00674
00675 MainTabControl.SelectedTab = ServerBTabPage;
00676 }
00677 }
00678
00679 private void GameTimer_Tick(object sender, EventArgs e)
00680 {
00681 if (MainTabControl.SelectedTab == GameTabPage)
00682 {
00683 if (FClientHandler != null)
00684 {
00685 if (FClientHandler.Ended || FClientHandler.Finished)
00686 {
00687 FDuration = FClientHandler.GameStop - FClientHandler.GameStart;
00688
00689 MainTabControl.SelectedTab = HighscoreTabPage;
00690
00691 FClientHandler.Active = false;
00692 FClientHandler.Kill = true;
00693 FClientHandler = null;
00694
00695 if (FServerHandler != null)
00696 {
00697 if (!(FServerHandler.GameRunning))
00698 {
00699 FServerHandler.Active = false;
00700 FServerHandler.Kill = true;
00701 FServerHandler = null;
00702 }
00703 }
00704 }
00705 }
00706 }
00707 }
00708
00709 private void HighscoreTimer_Tick(object sender, EventArgs e)
00710 {
00711 if (MainTabControl.SelectedTab == HighscoreTabPage)
00712 {
00713 switch (FHighscore)
00714 {
00715 case 0:
00716 {
00717 Highscore0Label.Visible = (!(Highscore0Label.Visible));
00718 break;
00719 }
00720
00721 case 1:
00722 {
00723 Highscore1Label.Visible = (!(Highscore1Label.Visible));
00724 break;
00725 }
00726
00727 case 2:
00728 {
00729 Highscore2Label.Visible = (!(Highscore2Label.Visible));
00730 break;
00731 }
00732
00733 case 3:
00734 {
00735 Highscore3Label.Visible = (!(Highscore3Label.Visible));
00736 break;
00737 }
00738
00739 case 4:
00740 {
00741 Highscore4Label.Visible = (!(Highscore4Label.Visible));
00742 break;
00743 }
00744 }
00745 }
00746 }
00747
00748 private void Back4Label_MouseEnter(object sender, EventArgs e)
00749 {
00750 Back4Label.Text = "BACK";
00751 }
00752
00753 private void Back4Label_MouseLeave(object sender, EventArgs e)
00754 {
00755 Back4Label.Text = "back";
00756 }
00757
00758 private void Back4Label_Click(object sender, EventArgs e)
00759 {
00760 MainTabControl.SelectedTab = MenuTabPage;
00761 }
00762 }
00763 }