Example #1
0
        private void Dispose(bool disposing)
        {
            if (!this.__bDisposed)
            {
                __bDisposed = true;
                if (disposing)
                {
                    __bBusy = true;
                    if (__cInstrument != null)
                    {
                        __cInstrument.ClearResetEvent(onReset);
                    }

                    __cContext.Paint      -= context_onPaint;
                    __cContext.Resize     -= context_onResize;
                    __cContext.KeyUp      -= Context_onKeyUp;
                    __cContext.KeyDown    -= Context_onKeyDown;
                    __cContext.MouseUp    -= context_onMouseUp;
                    __cContext.MouseDown  -= context_onMouseDown;
                    __cContext.MouseMove  -= context_onMouseMove;
                    __cContext.MouseWheel -= context_onMouseWheel;

                    int iCount = __cLayers.Count;
                    for (int i = 0; i < iCount; i++)
                    {
                        __cLayers[i].Dispose();
                    }

                    __cPainter.Dispose();
                }
            }
        }
Example #2
0
        /// <summary>
        ///   釋放腳本資源
        /// </summary>
        /// <param name="disposing">是否正在處理資源中</param>
        protected override void Dispose(bool disposing)
        {
            if (!this.__bDisposed)
            {
                __bDisposed = true;

                if (disposing)
                {
                    __cBars.ClearResetEvent(SeriesSymbolData_onReset);

                    base.Dispose();
                }
            }
        }