示例#1
0
		/// <summary>
		///   移除 Instrument 資料
		/// </summary>
		/// <param name="index">資料存放索引值(從 0 起始)</param>
		public void RemoveData(int index) {
			int iCount = __cInstruments.Count;
			if (iCount > 0 && index < iCount) {
				Instrument cInstrument = null;
				lock (__cInstruments) {
					cInstrument = __cInstruments[index];
					if (cInstrument != null) {
						cInstrument.Dispose();
					}

					__cInstruments.RemoveAt(index);
					--__iMaxInstrumentCount;
				}

				if (onRemoveInstrument != null) {
					onRemoveInstrument(this, new InstrumentChangeEvent(cInstrument, index));
				}
			}
		}