void Initialize(long recordCount, long wordsPerRecord, OpenStreamCallback openStream, CalculateBytePositionCallback calculateBytePosition, ReadWordsCallback readWords, WriteWordsCallback writeWords, CalculateRecordCountCallback calculateRecordCount) { if (mInitialized) { throw new InvalidOperationException("FileDeviceEditor has already been initialized"); } mDeviceWordsPerRecord = wordsPerRecord; mOpenStream = openStream; mCalculateBytePosition = calculateBytePosition; mReadWords = readWords; mWriteWords = writeWords; mCalculateRecordCount = calculateRecordCount; mRecordUpDown.Minimum = 0; mRecordTrackBar.Minimum = 0; SetDeviceRecordCount(recordCount); mFirstWordTextBox.ClearZero = false; mFirstWordTextBox.MinValue = 0L; mFirstWordTextBox.MaxValue = mDeviceWordsPerRecord - 1; mRecordReadWords = new IFullWord[mDeviceWordsPerRecord]; mRecordEditWords = new IFullWord[mDeviceWordsPerRecord]; for (int i = 0; i < mDeviceWordsPerRecord; i++) { mRecordEditWords[i] = new FullWord(); } mWordEditorList.MaxIndex = (int)mDeviceWordsPerRecord - 1; mWordEditorList.CreateEditor = CreateWordEditor; mWordEditorList.LoadEditor = LoadWordEditor; mChangesPending = false; mLoadRecordRetryCount = 0; ProcessSupportsAppending(); ProcessVisibility(); }
public void Initialize(CalculateRecordCountCallback calculateRecordCount, long wordsPerRecord, OpenStreamCallback openStream, CalculateBytePositionCallback calculateBytePosition, ReadWordsCallback readWords, WriteWordsCallback writeWords) { Initialize(1, wordsPerRecord, openStream, calculateBytePosition, readWords, writeWords, calculateRecordCount); }