Inheritance: System.Windows.Forms.UserControl
コード例 #1
0
ファイル: MainForm.cs プロジェクト: NaseUkolyCZ/Terrarium
        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.TerrariumGameView();
            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);
        }
コード例 #2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TerrariumForm));
     this._titleBar = new Terrarium.Forms.GlassTitleBar();
     this._dialogDescriptionLabel = new Terrarium.Glass.GlassLabel();
     this._bottomPanel            = new Terrarium.Glass.GlassPanel();
     this.SuspendLayout();
     //
     // 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(261, 32);
     this._titleBar.TabIndex  = 13;
     this._titleBar.Title     = "Form Title";
     //
     // dialogDescriptionLabel
     //
     this._dialogDescriptionLabel.BackColor = System.Drawing.Color.Transparent;
     this._dialogDescriptionLabel.Font      = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this._dialogDescriptionLabel.ForeColor = System.Drawing.Color.White;
     this._dialogDescriptionLabel.Location  = new System.Drawing.Point(12, 35);
     this._dialogDescriptionLabel.Name      = "dialogDescriptionLabel";
     this._dialogDescriptionLabel.NoWrap    = false;
     this._dialogDescriptionLabel.Size      = new System.Drawing.Size(237, 32);
     this._dialogDescriptionLabel.TabIndex  = 14;
     this._dialogDescriptionLabel.Text      = "Form Title";
     //
     // bottomPanel
     //
     this._bottomPanel.Borders = ((Terrarium.Glass.GlassBorders)((((Terrarium.Glass.GlassBorders.Left | Terrarium.Glass.GlassBorders.Top)
                                                                   | Terrarium.Glass.GlassBorders.Right)
                                                                  | Terrarium.Glass.GlassBorders.Bottom)));
     this._bottomPanel.Dock            = System.Windows.Forms.DockStyle.Bottom;
     this._bottomPanel.Gradient.Bottom = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
     this._bottomPanel.Gradient.Top    = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(96)))), ((int)(((byte)(96)))));
     this._bottomPanel.IsGlass         = true;
     this._bottomPanel.IsSunk          = false;
     this._bottomPanel.Location        = new System.Drawing.Point(0, 302);
     this._bottomPanel.Name            = "bottomPanel";
     this._bottomPanel.Size            = new System.Drawing.Size(261, 40);
     this._bottomPanel.TabIndex        = 15;
     this._bottomPanel.UseStyles       = true;
     //
     // TerrariumForm
     //
     this.BackColor  = System.Drawing.Color.Fuchsia;
     this.ClientSize = new System.Drawing.Size(261, 342);
     this.Controls.Add(this._bottomPanel);
     this.Controls.Add(this._dialogDescriptionLabel);
     this.Controls.Add(this._titleBar);
     this.Font            = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.ForeColor       = System.Drawing.SystemColors.ControlText;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name            = "TerrariumForm";
     this.ShowInTaskbar   = false;
     this.SizeGripStyle   = System.Windows.Forms.SizeGripStyle.Hide;
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text            = "Terrarium";
     this.ResumeLayout(false);
 }
コード例 #3
0
ファイル: TerrariumForm.cs プロジェクト: Carolasb/Terrarium
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TerrariumForm));
     this._titleBar = new Terrarium.Forms.GlassTitleBar();
     this._dialogDescriptionLabel = new Terrarium.Glass.GlassLabel();
     this._bottomPanel = new Terrarium.Glass.GlassPanel();
     this.SuspendLayout();
     //
     // 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(261, 32);
     this._titleBar.TabIndex = 13;
     this._titleBar.Title = "Form Title";
     //
     // dialogDescriptionLabel
     //
     this._dialogDescriptionLabel.BackColor = System.Drawing.Color.Transparent;
     this._dialogDescriptionLabel.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this._dialogDescriptionLabel.ForeColor = System.Drawing.Color.White;
     this._dialogDescriptionLabel.Location = new System.Drawing.Point(12, 35);
     this._dialogDescriptionLabel.Name = "dialogDescriptionLabel";
     this._dialogDescriptionLabel.NoWrap = false;
     this._dialogDescriptionLabel.Size = new System.Drawing.Size(237, 32);
     this._dialogDescriptionLabel.TabIndex = 14;
     this._dialogDescriptionLabel.Text = "Form Title";
     //
     // bottomPanel
     //
     this._bottomPanel.Borders = ((Terrarium.Glass.GlassBorders)((((Terrarium.Glass.GlassBorders.Left | Terrarium.Glass.GlassBorders.Top)
                 | Terrarium.Glass.GlassBorders.Right)
                 | Terrarium.Glass.GlassBorders.Bottom)));
     this._bottomPanel.Dock = System.Windows.Forms.DockStyle.Bottom;
     this._bottomPanel.Gradient.Bottom = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
     this._bottomPanel.Gradient.Top = System.Drawing.Color.FromArgb(((int)(((byte)(96)))), ((int)(((byte)(96)))), ((int)(((byte)(96)))));
     this._bottomPanel.IsGlass = true;
     this._bottomPanel.IsSunk = false;
     this._bottomPanel.Location = new System.Drawing.Point(0, 302);
     this._bottomPanel.Name = "bottomPanel";
     this._bottomPanel.Size = new System.Drawing.Size(261, 40);
     this._bottomPanel.TabIndex = 15;
     this._bottomPanel.UseStyles = true;
     //
     // TerrariumForm
     //
     this.BackColor = System.Drawing.Color.Fuchsia;
     this.ClientSize = new System.Drawing.Size(261, 342);
     this.Controls.Add(this._bottomPanel);
     this.Controls.Add(this._dialogDescriptionLabel);
     this.Controls.Add(this._titleBar);
     this.Font = new System.Drawing.Font("Trebuchet MS", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.ForeColor = System.Drawing.SystemColors.ControlText;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.Name = "TerrariumForm";
     this.ShowInTaskbar = false;
     this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
     this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
     this.Text = "Terrarium";
     this.ResumeLayout(false);
 }