/*private void reloadData(Tuple<EditorModule, int, byte[]> Data) { Array.Copy(ROMData, Data.Item2, Data.Item3, 0, Data.Item3.Length); //locked from refreshData }*/ private void openModule(EditorModule opened) { opened.uponOpen(); myModules.Add(opened); this.openEditorList.Items.Add(opened.ToString()); //add name of the object this.openEditorList.ClearSelected(); opened.Show(); }
public void freeAllFrom(EditorModule target) { for (int i = 0; i < accessedData.Count; i++) { if (accessedData[i].Item1 == target) { accessedData.RemoveAt(i); i--; continue; } } }
public byte[] requestData(EditorModule owner, int offset, int length) { byte[] myData = new byte[length]; lock (myLock) { Array.Copy(ROMData, offset, myData, 0, length); } accessedData.Add(Tuple.Create(owner, offset, myData)); return myData; }
public void closeModule(EditorModule closed) { freeAllFrom(closed); for (int i = 0; i < myModules.Count; i++ ) { if (myModules[i]==closed) { myModules.RemoveAt(i); this.openEditorList.Items.RemoveAt(i); break; } } this.openEditorList.ClearSelected(); }