Beispiel #1
0
 public void EnablePictureBox(bool isEnable)
 {
     if (ThinkingPictureBox.InvokeRequired)
     {
         ThinkingPictureBox.BeginInvoke((MethodInvoker) delegate
         {
             if (isEnable)
             {
                 new JAnimate().Start(EmoticionsPictureBox, 10, Effect.FadeOut, jPictureDisable);
             }
             else
             {
                 new JAnimate().Start(EmoticionsPictureBox, 10, Effect.FadeIn, jPictureBox1enable);
             }
         });
         return;
     }
     if (isEnable)
     {
         new JAnimate().Start(EmoticionsPictureBox, 10, Effect.FadeOut, jPictureDisable);
     }
     else
     {
         new JAnimate().Start(EmoticionsPictureBox, 10, Effect.FadeIn, jPictureBox1enable);
     }
 }
Beispiel #2
0
        public void EnableAnimation(bool isEnable)
        {
            Debug.WriteLine("AnimationChangedStatus:" + isEnable);
            if (ThinkingPictureBox.InvokeRequired)
            {
                ThinkingPictureBox.BeginInvoke((MethodInvoker) delegate
                {
                    EnablePictureBox(isEnable);
                    ThinkingPictureBox.Visible = isEnable;
                    ThinkingPictureBox.Enabled = isEnable;
                    if (isEnable)
                    {
                        playShowSound2();
                    }
                });
                return;
            }
            if (isEnable)
            {
                playShowSound2();
            }

            EnablePictureBox(isEnable);
            ThinkingPictureBox.Visible = isEnable;
            ThinkingPictureBox.Enabled = isEnable;
        }