Beispiel #1
0
		private void BasicBot_Load(object sender, EventArgs e)
		{
			int starty = 0;
			int accumulatedy = 0;
			int lineHeight = 30;
			int marginLeft = 15;
			foreach (var button in Emulator.ControllerDefinition.BoolButtons)
			{
				var control = new BotControlsRow
				{
					ButtonName = button,
					Probability = 0.0,
					Location = new Point(marginLeft, starty + accumulatedy)
				};

				ControlProbabilityPanel.Controls.Add(control);
				accumulatedy += lineHeight;
			}
		}
Beispiel #2
0
        private void SetupControlsAndProperties()
        {
            MaximizeAddressBox.SetHexProperties(_currentDomain.Size);
            TieBreaker1Box.SetHexProperties(_currentDomain.Size);
            TieBreaker2Box.SetHexProperties(_currentDomain.Size);
            TieBreaker3Box.SetHexProperties(_currentDomain.Size);

            StartFromSlotBox.SelectedIndex = 0;

            const int starty       = 0;
            const int lineHeight   = 30;
            const int marginLeft   = 15;
            int       accumulatedy = 0;
            int       count        = 0;

            ControlProbabilityPanel.SuspendLayout();
            ControlProbabilityPanel.Controls.Clear();
            foreach (var button in Emulator.ControllerDefinition.BoolButtons)
            {
                var control = new BotControlsRow
                {
                    ButtonName  = button,
                    Probability = 0.0,
                    Location    = new Point(marginLeft, starty + accumulatedy),
                    TabIndex    = count + 1,
                    ProbabilityChangedCallback = AssessRunButtonStatus
                };
                control.Scale(UIHelper.AutoScaleFactor);

                ControlProbabilityPanel.Controls.Add(control);
                accumulatedy += lineHeight;
                count++;
            }
            ControlProbabilityPanel.ResumeLayout();

            if (Settings.RecentBotFiles.AutoLoad)
            {
                LoadFileFromRecent(Settings.RecentBotFiles.MostRecent);
            }

            UpdateBotStatusIcon();
        }
Beispiel #3
0
        private void BasicBot_Load(object sender, EventArgs e)
        {
            int starty       = 0;
            int accumulatedy = 0;
            int lineHeight   = 30;
            int marginLeft   = 15;

            foreach (var button in Emulator.ControllerDefinition.BoolButtons)
            {
                var control = new BotControlsRow
                {
                    ButtonName  = button,
                    Probability = 0.0,
                    Location    = new Point(marginLeft, starty + accumulatedy)
                };

                ControlProbabilityPanel.Controls.Add(control);
                accumulatedy += lineHeight;
            }
        }
Beispiel #4
0
		private void SetupControlsAndProperties()
		{
			MaximizeAddressBox.SetHexProperties(MemoryDomains.MainMemory.Size);
			TieBreaker1Box.SetHexProperties(MemoryDomains.MainMemory.Size);
			TieBreaker2Box.SetHexProperties(MemoryDomains.MainMemory.Size);
			TieBreaker3Box.SetHexProperties(MemoryDomains.MainMemory.Size);

			StartFromSlotBox.SelectedIndex = 0;

			int starty = 0;
			int accumulatedy = 0;
			int lineHeight = 30;
			int marginLeft = 15;
			int count = 0;

			ControlProbabilityPanel.Controls.Clear();

			foreach (var button in Emulator.ControllerDefinition.BoolButtons)
			{
				var control = new BotControlsRow
				{
					ButtonName = button,
					Probability = 0.0,
					Location = new Point(marginLeft, starty + accumulatedy),
					TabIndex = count + 1,
					ProbabilityChangedCallback = AssessRunButtonStatus
				};

				ControlProbabilityPanel.Controls.Add(control);
				accumulatedy += lineHeight;
				count++;
			}

			if (Settings.RecentBotFiles.AutoLoad)
			{
				LoadFileFromRecent(Settings.RecentBotFiles.MostRecent);
			}

			UpdateBotStatusIcon();
		}