public MainForm()
 {
     //InitializeComponent();
     _tddGameView = new TerrariumDirectDrawGameView();
     var host = new WindowsFormsHost {Child = _tddGameView};
     //tddGameView.Children.Add(host);
 }
Example #2
0
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
            this.contextMenu1 = new System.Windows.Forms.ContextMenu();
            this.menuItemClearBadPeers = new System.Windows.Forms.MenuItem();
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.menuItemAbout = new System.Windows.Forms.MenuItem();
            this.menuItemText = new System.Windows.Forms.MenuItem();
            this.menuItemDamage = new System.Windows.Forms.MenuItem();
            this.menuItemEnergy = new System.Windows.Forms.MenuItem();
            this.tddGameView = new Terrarium.Renderer.TerrariumDirectDrawGameView();
            this.developerPanel = new Terrarium.Forms.Classes.Controls.DeveloperPanel();
            this.bottomPanel = new Terrarium.Forms.GlassBottomPanel();
            this.resizeBar = new Terrarium.Forms.ResizeBar();
            this.titleBar = new Terrarium.Forms.GlassTitleBar();
            this.bottomContainerPanel = new System.Windows.Forms.Panel();
            ((System.ComponentModel.ISupportInitialize)(this.tddGameView)).BeginInit();
            this.bottomContainerPanel.SuspendLayout();
            this.SuspendLayout();
            //
            // timer1
            //
            this.timer1.Interval = 40;
            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
            //
            // openFileDialog1
            //
            this.openFileDialog1.DefaultExt = "dll";
            this.openFileDialog1.Filter = ".NET Terrarium Assemblies (*.dll)|*.dll|All Files (*.*)|*.*";
            this.openFileDialog1.Title = "Choose the Assembly where your animal is located";
            //
            // contextMenu1
            //
            this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItemClearBadPeers,
            this.menuItem1,
            this.menuItemAbout});
            //
            // menuItemClearBadPeers
            //
            this.menuItemClearBadPeers.Index = 0;
            this.menuItemClearBadPeers.Text = "Reset Bad Peer List";
            this.menuItemClearBadPeers.Click += new System.EventHandler(this.menuItemClearBadPeers_Click);
            //
            // menuItem1
            //
            this.menuItem1.Index = 1;
            this.menuItem1.Text = "-";
            //
            // menuItemAbout
            //
            this.menuItemAbout.Index = 2;
            this.menuItemAbout.Text = "About Terrarium...";
            this.menuItemAbout.Click += new System.EventHandler(this.menuItemAbout_Click);
            //
            // menuItemText
            //
            this.menuItemText.Index = -1;
            this.menuItemText.Text = "";
            //
            // menuItemDamage
            //
            this.menuItemDamage.Index = -1;
            this.menuItemDamage.Text = "";
            //
            // menuItemEnergy
            //
            this.menuItemEnergy.Index = -1;
            this.menuItemEnergy.Text = "";
            //
            // tddGameView
            //
            this.tddGameView.BackColor = System.Drawing.Color.Black;
            this.tddGameView.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tddGameView.DrawBackgroundGrid = false;
            this.tddGameView.DrawBoundingBox = false;
            this.tddGameView.DrawCursor = true;
            this.tddGameView.DrawDestinationLines = false;
            this.tddGameView.DrawScreen = true;
            this.tddGameView.DrawText = true;
            this.tddGameView.Location = new System.Drawing.Point(200, 32);
            this.tddGameView.Name = "tddGameView";
            this.tddGameView.Size = new System.Drawing.Size(619, 453);
            this.tddGameView.TabIndex = 21;
            this.tddGameView.TabStop = false;
            this.tddGameView.TerrariumMessage = null;
            this.tddGameView.OrganismClicked += new Terrarium.Renderer.OrganismClickedEventHandler(this.Organism_Clicked);
            //
            // developerPanel
            //
            this.developerPanel.AnimalCount = 0;
            this.developerPanel.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
            this.developerPanel.Dock = System.Windows.Forms.DockStyle.Left;
            this.developerPanel.FailedReceives = 0;
            this.developerPanel.FailedSends = 0;
            this.developerPanel.GameModeText = "XXXXX";
            this.developerPanel.LandSize = new System.Drawing.Size(1600, 1600);
            this.developerPanel.Location = new System.Drawing.Point(0, 32);
            this.developerPanel.MapLocation = new System.Drawing.Point(0, 0);
            this.developerPanel.MaximumAnimalCount = 0;
            this.developerPanel.Name = "developerPanel";
            this.developerPanel.PeerCount = 0;
            this.developerPanel.PlantCount = 0;
            this.developerPanel.Size = new System.Drawing.Size(200, 453);
            this.developerPanel.TabIndex = 20;
            this.developerPanel.Teleportations = 0;
            this.developerPanel.WebRoot = "XXXXX";
            //
            // bottomPanel
            //
            this.bottomPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.bottomPanel.GameMode = Terrarium.Forms.GameModes.Ecosystem;
            this.bottomPanel.Location = new System.Drawing.Point(0, 0);
            this.bottomPanel.Mode = Terrarium.Forms.ScreenSaverMode.ShowSettingsModeless;
            this.bottomPanel.Name = "bottomPanel";
            this.bottomPanel.Size = new System.Drawing.Size(799, 48);
            this.bottomPanel.TabIndex = 19;

            //
            // resizeBar
            //
            this.resizeBar.BackColor = System.Drawing.Color.Transparent;
            this.resizeBar.Dock = System.Windows.Forms.DockStyle.Right;
            this.resizeBar.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.resizeBar.ForeColor = System.Drawing.Color.White;
            this.resizeBar.Location = new System.Drawing.Point(799, 0);
            this.resizeBar.Name = "resizeBar";
            this.resizeBar.Size = new System.Drawing.Size(20, 48);
            this.resizeBar.TabIndex = 18;
            //
            // titleBar
            //
            this.titleBar.Dock = System.Windows.Forms.DockStyle.Top;
            this.titleBar.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.titleBar.ForeColor = System.Drawing.Color.White;
            this.titleBar.Image = ((System.Drawing.Image)(resources.GetObject("titleBar.Image")));
            this.titleBar.Location = new System.Drawing.Point(0, 0);
            this.titleBar.Name = "titleBar";
            this.titleBar.Size = new System.Drawing.Size(819, 32);
            this.titleBar.TabIndex = 3;
            this.titleBar.Title = "Terrarium";
            this.titleBar.DoubleClick += new System.EventHandler(this.titleBar_DoubleClick);
            this.titleBar.CloseClicked += new System.EventHandler(this.Close_Click);
            this.titleBar.MinimizeClicked += new System.EventHandler(this.titleBar_MinimizeClicked);
            this.titleBar.MaximizeClicked += new System.EventHandler(this.titleBar_MaximizeClicked);

            //
            // bottomContainerPanel
            //
            this.bottomContainerPanel.Controls.Add(this.bottomPanel);
            this.bottomContainerPanel.Controls.Add(this.resizeBar);
            this.bottomContainerPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.bottomContainerPanel.Location = new System.Drawing.Point(0, 485);
            this.bottomContainerPanel.Name = "bottomContainerPanel";
            this.bottomContainerPanel.Size = new System.Drawing.Size(819, 48);
            this.bottomContainerPanel.TabIndex = 22;
            //
            // MainForm
            //
            this.BackColor = System.Drawing.Color.Magenta;
            this.ClientSize = new System.Drawing.Size(819, 533);
            this.ContextMenu = this.contextMenu1;
            this.Controls.Add(this.tddGameView);
            this.Controls.Add(this.developerPanel);
            this.Controls.Add(this.titleBar);
            this.Controls.Add(this.bottomContainerPanel);
            this.ForeColor = System.Drawing.Color.White;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.KeyPreview = true;
            this.MinimumSize = new System.Drawing.Size(320, 240);
            this.Name = "MainForm";
            this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Terrarium";
            this.Closing += new System.ComponentModel.CancelEventHandler(this.Form_Closing);
            this.SystemColorsChanged += new System.EventHandler(this.MainForm_SystemColorsChanged);
            this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Form_KeyUp);
            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MainForm_KeyDown);
            ((System.ComponentModel.ISupportInitialize)(this.tddGameView)).EndInit();
            this.bottomContainerPanel.ResumeLayout(false);
            this.ResumeLayout(false);
        }