Beispiel #1
0
        public AcceleratorKey DetermineAccelerator(Keys Key, Types.StudioState State)
        {
            if (!Accelerators.ContainsKey(Key))
            {
                return(null);
            }

            Types.FunctionStudioState functionMask = 0;
            switch (State)
            {
            case C64Studio.Types.StudioState.NORMAL:
                functionMask |= C64Studio.Types.FunctionStudioState.NORMAL;
                break;

            case C64Studio.Types.StudioState.COMPILE:
            case C64Studio.Types.StudioState.BUILD:
            case C64Studio.Types.StudioState.BUILD_AND_DEBUG:
            case C64Studio.Types.StudioState.BUILD_AND_RUN:
                functionMask |= C64Studio.Types.FunctionStudioState.BUILDING;
                break;

            case C64Studio.Types.StudioState.DEBUGGING_BROKEN:
                functionMask |= C64Studio.Types.FunctionStudioState.DEBUGGER_BROKEN;
                break;

            case C64Studio.Types.StudioState.DEBUGGING_RUN:
                functionMask |= C64Studio.Types.FunctionStudioState.DEBUGGER_RUNNING;
                break;
            }

            List <AcceleratorKey> possibleKeys = Accelerators.GetValues(Key, true);

            if (possibleKeys == null)
            {
                return(null);
            }
            foreach (AcceleratorKey key in possibleKeys)
            {
                if ((functionMask & Functions[key.Function].State) != 0)
                {
                    return(key);
                }
            }
            return(null);
        }
        private void comboSymbols_SelectedIndexChanged(object sender, EventArgs e)
        {
            if ((comboSymbols.SelectedIndex == -1) ||
                (m_TokenInfos == null))
            {
                return;
            }
            string key = (string)comboSymbols.SelectedItem;

            if (m_TokenInfos.ContainsKey(key))
            {
                List <SymbolInfo> tokens = m_TokenInfos.GetValues(key, false);
                if (tokens == null)
                {
                    return;
                }
                editBPAddress.Text = tokens[0].AddressOrValue.ToString("x");
            }
        }
Beispiel #3
0
        private void RemoveBreakpoint(Breakpoint bp)
        {
            var bpList = Breakpoints.GetValues((ushort)bp.Address, true);

            bpList.Remove(bp);
        }