Esempio n. 1
0
 /// <summary>
 /// Updates the card test for card Presses if state is set to selecting
 /// </summary>
 /// <param name="mouse">current Mouse object</param>
 /// <param name="timer">current Timer Object</param>
 protected override void OnUpdate(GameCore.Input.Keyboard keyboard, GameCore.Input.Mouse mouse, GameCore.Timing.Timer timer)
 {
     if (status == iconStatus.Concealed)
     {
         if (Released && (StateMain.singleton.currentState == StateMain.singleton.stPlay || StateMain.singleton.currentState == StateMain.singleton.stCredit))
         {
             //if (StateMain.singleton.soundsOn)
             //{
             //    StateMain.singleton.Sounds.iconReveal.Stop(true);
             //    StateMain.singleton.Sounds.iconReveal.Play(false, true);
             //}
             //Reveal();
             //if(!((StPlay)StateMain.singleton.stPlay).autoReveal)
             //StateMain.singleton.saveRecoveryRecord();   //every icon should be updated...
         }
     }
     else if (status == iconStatus.Revealing)
     {
         almCoverAnim.Update(timer.DeltaTimeMS);
         if (almCoverAnim.Check(Alarm.CheckType.RESET))
         {
             coverAnimFrame++;
             if (coverAnimFrame >= Definitions.CoverAnimationFrames)
             {
                 IconsView.singleton.iconsRevealed++;
                 status = iconStatus.Revealed;
             }
         }
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Sets the card to equal another
        /// </summary>
        /// <param name="item"></param>
        protected override void OnSet(GuiItem item)
        {
            //cast.. could throw an exception if item is not a Card
            Icon icon = (Icon)item;

            status = icon.status;
            iconNo = icon.iconNo;
        }
Esempio n. 3
0
 public Icon()
     : base("Card", 0, 0)
 {
     Interactive   = true;
     status        = iconStatus.Concealed;
     bounds.Width  = coverAnim.Width;
     bounds.Height = coverAnim.Height;
     almCoverAnim.Enable();
 }
Esempio n. 4
0
 public void setIconX(iconStatus v)
 {
     if (v == iconStatus.free)
     {
         nicon.Text = title + " V" + Application.ProductVersion + "\r\n状态: 空闲";
         nicon.Icon = Icon = Properties.Resources.icon_small;
         EnableToolStripMenuItem.Enabled     = EnableToolStripMenuItem.Checked = true;
         EnableToolStripMenuItem.Text        = "已启用 (&E)";
         KillCopyThreadStripMenuItem.Enabled = false;
     }
     else if (v == iconStatus.working)
     {
         nicon.Text = title + "\r\n状态: 正在工作,共 " + copyThread.Count + " 个存储设备";
         nicon.Icon = Icon = Properties.Resources.working_small;
         EnableToolStripMenuItem.Text        = "正在工作 (&E)";
         EnableToolStripMenuItem.Enabled     = false;
         KillCopyThreadStripMenuItem.Enabled = true;
     }
 }
Esempio n. 5
0
        public void setIcon(iconStatus v)
        {
            setIconInvoke i = new setIconInvoke(setIconX);

            Invoke(i, v);
        }
Esempio n. 6
0
 public void Reveal()
 {
     playStarted    = true;
     status         = iconStatus.Revealing;
     coverAnimFrame = 0;
 }