Example #1
0
        public void DisplayData()
        {
            DynamicByteProvider dynamicByteProvider;

            dynamicByteProvider = new DynamicByteProvider(programData.m_programData);

            hexBox1.ByteProvider   = dynamicByteProvider;
            hexBox1.LineInfoOffset = programInfo.StartAddress;
            hexBox1.ReadOnly       = true;

            parentForm.programInfoForm.DisplayProgramInformation(programInfo);

            if (showSourceCode)
            {
                // Display the programs sourcecode
                if (programInfo.Format == OricProgram.ProgramFormat.BasicProgram)
                {
                    fastColoredTextBoxSourceCode.Text = programData.ListAsText();
                }
                else if (programInfo.Format == OricProgram.ProgramFormat.CodeFile)
                {
                    fastColoredTextBoxSourceCode.Text = programData.Assembly();
                }
            }

            switch (userControl)
            {
            case MainForm.UserControls.CharacterSetViewer:
                //characterSetViewer.FileInformation = labelDetails;
                characterSetViewer.ProgramInfo = programInfo;
                characterSetViewer.ProgramData = programData;
                characterSetViewer.InitialiseView();
                break;

            case MainForm.UserControls.DataFileViewer:
                //dataFileViewer.FileInformation = labelDetails;
                dataFileViewer.ProgramInfo = programInfo;
                dataFileViewer.ProgramData = programData;
                dataFileViewer.InitialiseView();
                break;

            case MainForm.UserControls.DataViewer:
                //dataViewer.FileInformation = labelDetails;
                dataViewer.ProgramInfo = programInfo;
                dataViewer.ProgramData = programData;
                dataViewer.InitialiseView();
                break;

            case MainForm.UserControls.ScreenViewer:
                //screenViewer.FileInformation = labelDetails;
                screenViewer.ProgramInfo = programInfo;
                screenViewer.ProgramData = programData;
                screenViewer.InitialiseView();
                break;

            case MainForm.UserControls.SequentialFileViewer:
                //sequentialFileViewer.FileInformation = labelDetails;
                sequentialFileViewer.ProgramInfo = programInfo;
                sequentialFileViewer.ProgramData = programData;
                sequentialFileViewer.InitialiseView();
                break;

            case MainForm.UserControls.None:
                break;

            default:
                break;
            }
        }
Example #2
0
        public void DisplayData()
        {
            // Display program name and format in the information panel
            labelProgramName.Text = programInfo.ProgramName;
            labelProgramType.Text = String.Format("{0}", programInfo.FormatToString());
            labelDetails.Text     = "";

            DynamicByteProvider dynamicByteProvider;

            dynamicByteProvider = new DynamicByteProvider(programData.m_programData);

            hexBox1.ByteProvider   = dynamicByteProvider;
            hexBox1.LineInfoOffset = programInfo.StartAddress;
            hexBox1.ReadOnly       = true;

            BuildFileInformation(programInfo);

            if (showSourceCode)
            {
                // Display the programs sourcecode
                if (programInfo.Format == OricProgram.ProgramFormat.BasicProgram)
                {
                    fastColoredTextBoxSourceCode.Text = programData.ListAsText();
                }
                else if (programInfo.Format == OricProgram.ProgramFormat.CodeFile)
                {
                    fastColoredTextBoxSourceCode.Text = programData.Assembly();
                }
            }

            switch (userControl)
            {
            case MainForm.UserControls.CharacterSetViewer:
                characterSetViewer.FileInformation = labelDetails;
                characterSetViewer.ProgramInfo     = programInfo;
                characterSetViewer.ProgramData     = programData;
                characterSetViewer.InitialiseView();
                break;

            case MainForm.UserControls.DataFileViewer:
                dataFileViewer.FileInformation = labelDetails;
                dataFileViewer.ProgramInfo     = programInfo;
                dataFileViewer.ProgramData     = programData;
                dataFileViewer.InitialiseView();
                break;

            case MainForm.UserControls.DataViewer:
                dataViewer.FileInformation = labelDetails;
                dataViewer.ProgramInfo     = programInfo;
                dataViewer.ProgramData     = programData;
                dataViewer.InitialiseView();
                break;

            case MainForm.UserControls.ScreenViewer:
                screenViewer.FileInformation = labelDetails;
                screenViewer.ProgramInfo     = programInfo;
                screenViewer.ProgramData     = programData;
                screenViewer.InitialiseView();
                break;

            case MainForm.UserControls.SequentialFileViewer:
                sequentialFileViewer.FileInformation = labelDetails;
                sequentialFileViewer.ProgramInfo     = programInfo;
                sequentialFileViewer.ProgramData     = programData;
                sequentialFileViewer.InitialiseView();
                break;

            case MainForm.UserControls.None:
                break;

            default:
                break;
            }
        }