public MyTabPage(DumpHandle handle, bool IsAutomatic = false) { isDefault = false; this.IsAutomaticTab = IsAutomatic; InitializeComponent(); LoadHandle(handle); }
public DumpHandle GetDefaultHandle() { if (handles[0] == null) { handles[0] = new DumpHandle(Dumps[0]); } return(handles[0]); }
private void LoadHandle(DumpHandle handle) { _handle = handle; hbox.ByteProvider = _handle.Provider; hbox.LineInfoOffset = CurrentDump.start; updateStatusLabels(); // Init PageInfo this.l_prange.Text = $"{CurrentDump.start:X8}-{CurrentDump.end:X8}"; }
private int addTab(DumpHandle handle, bool isAutomatic, long address = -1) { var tab = new MyTabPage(handle, isAutomatic); if (address != -1) { tab.Seek(address); } var idx = appendTab(tab.Tab); _tabs.Add(tab); return(idx); }
public DumpHandle GetDumpHandle(long address) { int i = 0; for (; i < Dumps.Length; i++) { if (Dumps[i].Includes(address)) { break; } } if (i == Dumps.Length) { return(default(DumpHandle)); } if (handles[i] == null) { handles[i] = new DumpHandle(Dumps[i]); } return(handles[i]); }
public DumpManager(string dir, string pattern) { var files = Directory.GetFiles(dir); // パターン生成 if (pattern.IndexOf("${S}") == -1 || pattern.IndexOf("${E}") == -1) { throw new ArgumentException("Pattern is Invalid."); } var reg = new Regex(pattern.Replace("${S}", "([0-9A-Fa-f]+)").Replace("${E}", "([0-9A-Fa-f]+)")); // ソートして格納 Dumps = FileListToDumpUnits(files, dir, reg).OrderBy(x => x).ToArray(); handles = new DumpHandle[Dumps.Length]; for (int i = 0; i < Dumps.Length; i++) { handles[i] = new DumpHandle(Dumps[i]); } if (Dumps.Length == 0) { throw new FileNotFoundException("No files matched the pattern."); } }