Exemple #1
0
 public Core(SdlDotNet.Windows.SurfaceControl SC)
 {
     MyMemory       = new Memory(this);
     MyCPU          = new CPU(this, false);
     MyDisplay      = new Display(this, SC);
     DesignatedKeys = new Keys[] { Keys.Right, Keys.Left, Keys.Up, Keys.Down, Keys.A, Keys.S, Keys.R, Keys.T };
 }
Exemple #2
0
 public void Initialize()
 {
     /**
      * Initialize SDL components
      * */
     control = new SdlDotNet.Windows.SurfaceControl();
     surface = new Surface(9000, 9000, 24, false);
 }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MapForm));
     this.surfaceControl = new SdlDotNet.Windows.SurfaceControl();
     this.mapContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
     this.showGridToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
     this.setGridSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.setGridColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     this.surfacePanel = new System.Windows.Forms.Panel();
     ((System.ComponentModel.ISupportInitialize)(this.surfaceControl)).BeginInit();
     this.mapContextMenuStrip.SuspendLayout();
     this.surfacePanel.SuspendLayout();
     this.SuspendLayout();
     //
     // surfaceControl
     //
     this.surfaceControl.AccessibleDescription = "";
     this.surfaceControl.AccessibleName = "";
     this.surfaceControl.AccessibleRole = System.Windows.Forms.AccessibleRole.Graphic;
     this.surfaceControl.BackColor = System.Drawing.SystemColors.Control;
     this.surfaceControl.ContextMenuStrip = this.mapContextMenuStrip;
     this.surfaceControl.Dock = System.Windows.Forms.DockStyle.Fill;
     this.surfaceControl.ErrorImage = null;
     this.surfaceControl.Image = ((System.Drawing.Image)(resources.GetObject("surfaceControl.Image")));
     this.surfaceControl.InitialImage = null;
     this.surfaceControl.Location = new System.Drawing.Point(0, 0);
     this.surfaceControl.Name = "surfaceControl";
     this.surfaceControl.Size = new System.Drawing.Size(209, 145);
     this.surfaceControl.TabIndex = 0;
     this.surfaceControl.TabStop = false;
     this.surfaceControl.MouseLeave += new System.EventHandler(this.surfaceControl_MouseLeave);
     this.surfaceControl.MouseMove += new System.Windows.Forms.MouseEventHandler(this.surfaceControl_MouseMove);
     this.surfaceControl.MouseClick += new System.Windows.Forms.MouseEventHandler(this.surfaceControl_MouseClick);
     //
     // mapContextMenuStrip
     //
     this.mapContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
     this.showGridToolStripMenuItem,
     this.toolStripSeparator1,
     this.setGridSizeToolStripMenuItem,
     this.setGridColorToolStripMenuItem});
     this.mapContextMenuStrip.Name = "mapContextMenuStrip";
     this.mapContextMenuStrip.Size = new System.Drawing.Size(152, 76);
     //
     // showGridToolStripMenuItem
     //
     this.showGridToolStripMenuItem.CheckOnClick = true;
     this.showGridToolStripMenuItem.Name = "showGridToolStripMenuItem";
     this.showGridToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
     this.showGridToolStripMenuItem.Text = "Show Grid";
     this.showGridToolStripMenuItem.Click += new System.EventHandler(this.showGridToolStripMenuItem_Click);
     //
     // toolStripSeparator1
     //
     this.toolStripSeparator1.Name = "toolStripSeparator1";
     this.toolStripSeparator1.Size = new System.Drawing.Size(148, 6);
     //
     // setGridSizeToolStripMenuItem
     //
     this.setGridSizeToolStripMenuItem.Name = "setGridSizeToolStripMenuItem";
     this.setGridSizeToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
     this.setGridSizeToolStripMenuItem.Text = "Set Cell Size";
     this.setGridSizeToolStripMenuItem.Click += new System.EventHandler(this.setGridSizeToolStripMenuItem_Click);
     //
     // setGridColorToolStripMenuItem
     //
     this.setGridColorToolStripMenuItem.Name = "setGridColorToolStripMenuItem";
     this.setGridColorToolStripMenuItem.Size = new System.Drawing.Size(151, 22);
     this.setGridColorToolStripMenuItem.Text = "Set Grid Color";
     this.setGridColorToolStripMenuItem.Click += new System.EventHandler(this.setGridColorToolStripMenuItem_Click);
     //
     // surfacePanel
     //
     this.surfacePanel.AutoScroll = true;
     this.surfacePanel.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
     this.surfacePanel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.surfacePanel.Controls.Add(this.surfaceControl);
     this.surfacePanel.Location = new System.Drawing.Point(65, 45);
     this.surfacePanel.Name = "surfacePanel";
     this.surfacePanel.Size = new System.Drawing.Size(211, 147);
     this.surfacePanel.TabIndex = 1;
     //
     // MapForm
     //
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
     this.AutoScroll = true;
     this.ClientSize = new System.Drawing.Size(372, 273);
     this.Controls.Add(this.surfacePanel);
     this.MinimumSize = new System.Drawing.Size(30, 80);
     this.Name = "MapForm";
     this.ShowInTaskbar = false;
     this.Text = "MapWindow";
     this.Load += new System.EventHandler(this.MapForm_Load);
     this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.MapForm_KeyUp);
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MapForm_FormClosing);
     this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.MapForm_KeyDown);
     ((System.ComponentModel.ISupportInitialize)(this.surfaceControl)).EndInit();
     this.mapContextMenuStrip.ResumeLayout(false);
     this.surfacePanel.ResumeLayout(false);
     this.ResumeLayout(false);
 }
 /// <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(InfoForm));
     this.surfaceControl = new SdlDotNet.Windows.SurfaceControl();
     this.xPositionLabel = new System.Windows.Forms.Label();
     this.yPositionLabel = new System.Windows.Forms.Label();
     this.xValueLabel = new System.Windows.Forms.Label();
     this.yValueLabel = new System.Windows.Forms.Label();
     this.panel = new System.Windows.Forms.Panel();
     this.infoGroupBox = new System.Windows.Forms.GroupBox();
     ((System.ComponentModel.ISupportInitialize)(this.surfaceControl)).BeginInit();
     this.panel.SuspendLayout();
     this.infoGroupBox.SuspendLayout();
     this.SuspendLayout();
     //
     // surfaceControl
     //
     this.surfaceControl.AccessibleDescription = "";
     this.surfaceControl.AccessibleName = "SurfaceControl";
     this.surfaceControl.AccessibleRole = System.Windows.Forms.AccessibleRole.Graphic;
     this.surfaceControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                 | System.Windows.Forms.AnchorStyles.Left)
                 | System.Windows.Forms.AnchorStyles.Right)));
     this.surfaceControl.ErrorImage = null;
     this.surfaceControl.Image = ((System.Drawing.Image)(resources.GetObject("surfaceControl.Image")));
     this.surfaceControl.InitialImage = null;
     this.surfaceControl.Location = new System.Drawing.Point(0, 0);
     this.surfaceControl.Name = "surfaceControl";
     this.surfaceControl.Size = new System.Drawing.Size(181, 127);
     this.surfaceControl.TabIndex = 0;
     this.surfaceControl.TabStop = false;
     //
     // xPositionLabel
     //
     this.xPositionLabel.AutoSize = true;
     this.xPositionLabel.Location = new System.Drawing.Point(7, 13);
     this.xPositionLabel.Name = "xPositionLabel";
     this.xPositionLabel.Size = new System.Drawing.Size(14, 13);
     this.xPositionLabel.TabIndex = 1;
     this.xPositionLabel.Text = "X";
     //
     // yPositionLabel
     //
     this.yPositionLabel.AutoSize = true;
     this.yPositionLabel.Location = new System.Drawing.Point(7, 30);
     this.yPositionLabel.Name = "yPositionLabel";
     this.yPositionLabel.Size = new System.Drawing.Size(14, 13);
     this.yPositionLabel.TabIndex = 2;
     this.yPositionLabel.Text = "Y";
     //
     // xValueLabel
     //
     this.xValueLabel.AutoSize = true;
     this.xValueLabel.Location = new System.Drawing.Point(27, 13);
     this.xValueLabel.Name = "xValueLabel";
     this.xValueLabel.Size = new System.Drawing.Size(10, 13);
     this.xValueLabel.TabIndex = 3;
     this.xValueLabel.Text = "-";
     //
     // yValueLabel
     //
     this.yValueLabel.AutoSize = true;
     this.yValueLabel.Location = new System.Drawing.Point(27, 30);
     this.yValueLabel.Name = "yValueLabel";
     this.yValueLabel.Size = new System.Drawing.Size(10, 13);
     this.yValueLabel.TabIndex = 4;
     this.yValueLabel.Text = "-";
     //
     // panel
     //
     this.panel.Controls.Add(this.surfaceControl);
     this.panel.Location = new System.Drawing.Point(5, 5);
     this.panel.Name = "panel";
     this.panel.Size = new System.Drawing.Size(180, 135);
     this.panel.TabIndex = 5;
     //
     // infoGroupBox
     //
     this.infoGroupBox.Controls.Add(this.xPositionLabel);
     this.infoGroupBox.Controls.Add(this.yPositionLabel);
     this.infoGroupBox.Controls.Add(this.xValueLabel);
     this.infoGroupBox.Controls.Add(this.yValueLabel);
     this.infoGroupBox.Location = new System.Drawing.Point(12, 144);
     this.infoGroupBox.Name = "infoGroupBox";
     this.infoGroupBox.Size = new System.Drawing.Size(138, 45);
     this.infoGroupBox.TabIndex = 6;
     this.infoGroupBox.TabStop = false;
     this.infoGroupBox.Text = "Info";
     //
     // InfoForm
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(194, 195);
     this.Controls.Add(this.infoGroupBox);
     this.Controls.Add(this.panel);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.Name = "InfoForm";
     this.ShowInTaskbar = false;
     this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
     this.Text = "Information";
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.InfoForm_FormClosing);
     ((System.ComponentModel.ISupportInitialize)(this.surfaceControl)).EndInit();
     this.panel.ResumeLayout(false);
     this.infoGroupBox.ResumeLayout(false);
     this.infoGroupBox.PerformLayout();
     this.ResumeLayout(false);
 }