Пример #1
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);
            }
        }