示例#1
0
 static void Main(params string[] args)
 {
     if (args.Length != 1 ||  !File.Exists(args[0]))
         return;
     ByterProject project = new ByterProject();
     project.LoadFiles(args[0]);
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     OutputForm outf = new OutputForm();
     DebugForm debug = new DebugForm(project, project.MainMethod, outf);
     debug.IsMain = true;
     Application.Run(debug);
 }
示例#2
0
        static void Main(params string[] args)
        {
            if (args.Length != 1 || !File.Exists(args[0]))
            {
                return;
            }
            ByterProject project = new ByterProject();

            project.LoadFiles(args[0]);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            OutputForm outf  = new OutputForm();
            DebugForm  debug = new DebugForm(project, project.MainMethod, outf);

            debug.IsMain = true;
            Application.Run(debug);
        }
示例#3
0
 public DebugForm(ByterProject project, string methodName, OutputForm output)
 {
     if (project == null || methodName == null || output == null)
         throw new ArgumentNullException("Cannot create debug form for empty procedure.");
     InitializeComponent();
     Project = project;
     CodeTable = new char[16, 16];
     Array.Copy(Project.Sources[methodName], CodeTable, 256);
     Output = output;
     CurrentPosition = new Point(0, 0);
     IsMain = false;
     CurrentDirection = Direction.Right;
     Child = Parent = null;
     dataGridView1.RowCount = 16;
     dataGridView1.ColumnCount = 16;
     RefreshTable();
     for (int i = 0; i < 16; i++)
         dataGridView1.Columns[i].Width = dataGridView1.Rows[i].Height;
     Text += " — " + methodName;
 }
示例#4
0
 public DebugForm(ByterProject project, string methodName, OutputForm output)
 {
     if (project == null || methodName == null || output == null)
     {
         throw new ArgumentNullException("Cannot create debug form for empty procedure.");
     }
     InitializeComponent();
     Project   = project;
     CodeTable = new char[16, 16];
     Array.Copy(Project.Sources[methodName], CodeTable, 256);
     Output                    = output;
     CurrentPosition           = new Point(0, 0);
     IsMain                    = false;
     CurrentDirection          = Direction.Right;
     Child                     = Parent = null;
     dataGridView1.RowCount    = 16;
     dataGridView1.ColumnCount = 16;
     RefreshTable();
     for (int i = 0; i < 16; i++)
     {
         dataGridView1.Columns[i].Width = dataGridView1.Rows[i].Height;
     }
     Text += " — " + methodName;
 }