private void AppendMenuItem_Click(object sender, EventArgs e) { if (_cdl == null) { MessageBox.Show(this, "Cannot append with no CDL loaded!", "Alert"); } else { var file = ToolFormBase.OpenFileDialog( _currentFilename, PathManager.MakeAbsolutePath(Global.Config.PathEntries.LogPathFragment, null), "Code Data Logger Files", "cdl"); if (file != null) { using (var fs = new FileStream(file.FullName, FileMode.Open, FileAccess.Read)) { var newCDL = new CodeDataLog(); newCDL.Load(fs); if (!_cdl.Check(newCDL)) { MessageBox.Show(this, "CDL file does not match emulator's current memory map!"); return; } _cdl.LogicalOrFrom(newCDL); UpdateDisplay(true); } } } }
private void AppendMenuItem_Click(object sender, EventArgs e) { if (_cdl == null) { MessageBox.Show(this, "Cannot append with no CDL loaded!", "Alert"); } else { var file = ToolHelpers.GetCdlFileFromUser(_currentFileName); if (file != null) { using (var fs = new FileStream(file.FullName, FileMode.Open, FileAccess.Read)) { var newCDL = CodeDataLog.Load(fs); _cdl.LogicalOrFrom(newCDL); UpdateDisplay(); } } } }