public FormRenumberBASIC(StudioCore Core, SourceBasicEx Basic) { m_Basic = Basic; m_Core = Core; InitializeComponent(); editStartLine.Text = "10"; editLineStep.Text = "10"; }
public FormRenumberBASIC(StudioCore Core, SourceBasicEx Basic, bool SymbolMode, int FirstLineNumber, int LastLineNumber) { m_Basic = Basic; m_Core = Core; m_SymbolMode = SymbolMode; InitializeComponent(); editStartLine.Text = "10"; editLineStep.Text = "10"; editFirstLineNumber.Text = FirstLineNumber.ToString(); editLastLineNumber.Text = LastLineNumber.ToString(); }
private void ExportToBASIC(Types.FileInfo fileToExport, C64Models.BASIC.Dialect Dialect) { C64Studio.Types.FileInfo fileInfo = null; if (m_Media != null) { fileInfo = m_Media.LoadFile(fileToExport.Filename); } if (fileInfo != null) { if (fileInfo.Data.Length >= 2) { //if ( startAddress == 0x0801 ) { // can only load from that address List <string> lines; // trunc load address var parser = new Parser.BasicFileParser(new Parser.BasicFileParser.ParserSettings()); parser.SetBasicDialect(Dialect); if (parser.Disassemble(fileInfo.Data.SubBuffer(2), out lines)) { var document = new SourceBasicEx(Core); document.ShowHint = DockState.Document; document.Core = Core; document.Show(Core.MainForm.panelMain); document.SetBASICDialect(Dialect); StringBuilder sb = new StringBuilder(); foreach (string line in lines) { sb.AppendLine(line); } document.FillContent(sb.ToString(), false); } } } } }