コード例 #1
0
        protected virtual void Dispose(bool disposing)
        {
            Logging.Debug("WebsiteNodeContentControl::Dispose({0}) @{1}", disposing, dispose_count);

            WPFDoEvents.InvokeInUIThread(() =>
            {
                WPFDoEvents.SafeExec(() =>
                {
                    if (dispose_count == 0)
                    {
                        // Get rid of managed resources / get rid of cyclic references:
                        fader?.Dispose();
                    }
                    fader = null;
                });

                WPFDoEvents.SafeExec(() =>
                {
                    website_node_content = null;
                    DataContext          = null;
                });

                ++dispose_count;
            });
        }
コード例 #2
0
        protected virtual void Dispose(bool disposing)
        {
            Logging.Debug("StringNodeContentControl::Dispose({0}) @{1}", disposing, dispose_count);

            try
            {
                if (dispose_count == 0)
                {
                    // Get rid of managed resources / get rid of cyclic references:
                    fader?.Dispose();
                }
                fader = null;

                MouseDoubleClick -= StringNodeContentControl_MouseDoubleClick;
                KeyDown          -= StringNodeContentControl_KeyDown;

                TxtEdit.LostFocus      -= edit_text_box_LostFocus;
                TxtEdit.PreviewKeyDown -= edit_text_box_PreviewKeyDown;

                DataContext = null;
            }
            catch (Exception ex)
            {
                Logging.Error(ex);
            }

            ++dispose_count;
        }
コード例 #3
0
        protected virtual void Dispose(bool disposing)
        {
            Logging.Debug("StringNodeContentControl::Dispose({0}) @{1}", disposing, dispose_count);

            WPFDoEvents.SafeExec(() =>
            {
                if (dispose_count == 0)
                {
                    // Get rid of managed resources / get rid of cyclic references:
                    fader?.Dispose();
                }
                fader = null;
            });

            WPFDoEvents.SafeExec(() =>
            {
                MouseDoubleClick -= StringNodeContentControl_MouseDoubleClick;
                KeyDown          -= StringNodeContentControl_KeyDown;

                TxtEdit.LostFocus      -= edit_text_box_LostFocus;
                TxtEdit.PreviewKeyDown -= edit_text_box_PreviewKeyDown;
            });

            WPFDoEvents.SafeExec(() =>
            {
                DataContext = null;
            });

            ++dispose_count;
        }
コード例 #4
0
        protected virtual void Dispose(bool disposing)
        {
            Logging.Debug("WebsiteNodeContentControl::Dispose({0}) @{1}", disposing, dispose_count);

            try
            {
                if (dispose_count == 0)
                {
                    // Get rid of managed resources / get rid of cyclic references:
                    fader?.Dispose();
                }
                fader = null;

                website_node_content = null;
                DataContext          = null;
            }
            catch (Exception ex)
            {
                Logging.Error(ex);
            }

            ++dispose_count;
        }