Esempio n. 1
0
        /// <summary>
        ///     Releases unmanaged and - optionally - managed resources.
        /// </summary>
        /// <param name="disposing">
        ///     <c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only
        ///     unmanaged resources.
        /// </param>
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (_MouseCursorReverter != null)
                {
                    _MouseCursorReverter.Dispose();
                }

                _Application.StatusBar.PlayProgressAnimation(false);
                _Application.StatusBar.Message[0] = null;

                IAnimationProgressor animation = _Application.StatusBar.ProgressAnimation;
                animation.Hide();
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Starts the global spinning in ArcMap and updates the message on the status bar.
        /// </summary>
        /// <param name="cursor">The cursor.</param>
        /// <param name="statusMessage">The status message.</param>
        public void Play(MouseCursorImage cursor, string statusMessage)
        {
            if (_MouseCursorReverter != null)
            {
                _MouseCursorReverter.Dispose();
            }

            _MouseCursorReverter = new MouseCursorReverter(cursor);

            IAnimationProgressor animation = _Application.StatusBar.ProgressAnimation;

            animation.Show();

            _Application.StatusBar.PlayProgressAnimation(true);
            _Application.StatusBar.Message[0] = statusMessage;
        }
        private void SetProgress(bool play)
        {
            IStatusBar           statusBar           = ArcMap.Application.StatusBar as IStatusBar;
            IAnimationProgressor animationProgressor = statusBar.ProgressAnimation;

            if (play)
            {
                animationProgressor.Show();
                animationProgressor.Play(0, -1, -1);
                statusBar.set_Message(0, "Processing Related Tables");
            }
            else
            {
                animationProgressor.Stop();
                animationProgressor.Hide();
                statusBar.set_Message(0, null);
            }
        }