/// <summary>
        /// Opens a New File and saves the old file if needed
        /// </summary>
        /// <returns>True, if a new file is open</returns>
        public bool NewCommandHandler()
        {
            if (!UnsavedHandler())
            {
                return(false);
            }

            CurrentFileName    = string.Empty;
            SyntaxTextBox.Text = "";

            this.Title = "Assembler Code Editor - New unsaved file";
            isSaved    = true;   // After new nothing is to be saved

            processorVM.Reset();
            return(true);
        }
示例#2
0
        /// <summary>
        /// Resets the RAM, the Simulator and all arrays
        /// </summary>
        private void Reset()
        {
            // Reset all Elements
            processorVM.Reset();

            for (int i = 0; i < ramPosToCodeLine.Length; i++)
            {
                ramPosToCodeLine[i] = -1;
            }

            for (int i = 0; i < machineCode.Length; i++)
            {
                machineCode[i] = 0;
            }
        }