コード例 #1
0
        private void _timerAnimate_Tick(object sender, EventArgs e)
        {
            if (_initGenCount != 0)
            {
                Post(() => {
                    Text = _decodeEffect.GenerateNumberRange(Text.Length);
                });
                _initGenCount--;
                return;
            }

            var decodeMode = _showing ? DecodeMode.Show : DecodeMode.Hide;
            var text       = _decodeEffect.Peek(decodeMode);

            if (text == null)
            {
                _timerAnimate.Stop();
            }
            else
            {
                Post(() => {
                    Text = text;
                });
            }

//			Console.WriteLine ("_timerAnimate_Tick executing on thread: " + System.Threading.Thread.CurrentThread.ManagedThreadId);
        }
 public void AnimateText(bool show, string text, int initGenCount)
 {
     _initGenCount = initGenCount;
     _decodeEffect = new TextDecodeEffect(text) { TextVisible = !show };
     Text = _decodeEffect.Peek (DecodeMode.None);
     _showing = show;
     _timerAnimate.Start ();
 }
コード例 #3
0
 public void AnimateText(bool show, string text, int initGenCount)
 {
     _initGenCount = initGenCount;
     _decodeEffect = new TextDecodeEffect(text)
     {
         TextVisible = !show
     };
     Text     = _decodeEffect.Peek(DecodeMode.None);
     _showing = show;
     _timerAnimate.Start();
 }