Beispiel #1
0
        private void SetMemoryDomain(string name)
        {
            _currentDomain = MemoryDomains[name];
            _bigEndian     = MemoryDomains[name].EndianType == MemoryDomain.Endian.Big;

            MaximizeAddressBox.SetHexProperties(_currentDomain.Size);
            TieBreaker1Box.SetHexProperties(_currentDomain.Size);
            TieBreaker2Box.SetHexProperties(_currentDomain.Size);
            TieBreaker3Box.SetHexProperties(_currentDomain.Size);
        }
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();
        }