Example #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);
 }
Example #2
0
        private void openProjectToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                if (openFileDialog1.ShowDialog(this) == DialogResult.OK && Path.GetExtension(openFileDialog1.FileName) == ".bytpr")
                {
                    Directory.SetCurrentDirectory(Path.GetDirectoryName(openFileDialog1.FileName));
                    ByterProject newProject = new ByterProject();
                    newProject.LoadFiles(openFileDialog1.FileName);
                    OpenedProject = newProject;
                    projectExplorerBox.Items.Clear();
                    codeTabControl.TabPages.Clear();
                    foreach (var k in OpenedProject.FileNames)
                        projectExplorerBox.Items.Add("Module " + k.Key);

                }
            }
            catch (Exception x)
            {
                MessageBox.Show(x.Message);
            }
        }