예제 #1
0
        private void objCareer_DiceRollerOpened(Object sender)
        {
            SkillControl objControl = (SkillControl)sender;

            if (GlobalOptions.Instance.SingleDiceRoller)
            {
                if (_frmRoller == null)
                {
                    frmDiceRoller frmRoller = new frmDiceRoller(this, objControl.SkillObject.CharacterObject.Qualities, objControl.SkillObject.TotalRating);
                    _frmRoller = frmRoller;
                    frmRoller.Show();
                }
                else
                {
                    _frmRoller.Dice      = objControl.SkillObject.TotalRating;
                    _frmRoller.Qualities = objControl.SkillObject.CharacterObject.Qualities;
                    _frmRoller.Focus();
                }
            }
            else
            {
                frmDiceRoller frmRoller = new frmDiceRoller(this, objControl.SkillObject.CharacterObject.Qualities, objControl.SkillObject.TotalRating);
                frmRoller.Show();
            }
        }
예제 #2
0
 private void mnuToolsDiceRoller_Click(object sender, EventArgs e)
 {
     if (GlobalOptions.SingleDiceRoller)
     {
         // Only a single instance of the Dice Roller window is allowed, so either find the existing one and focus on it, or create a new one.
         if (_frmRoller == null)
         {
             _frmRoller = new frmDiceRoller(this);
             _frmRoller.Show();
         }
         else
         {
             _frmRoller.Activate();
         }
     }
     else
     {
         // No limit on the number of Dice Roller windows, so just create a new one.
         frmDiceRoller frmRoller = new frmDiceRoller(this);
         frmRoller.Show();
     }
 }
예제 #3
0
 private void objCareer_DiceRollerOpenedInt(Character objCharacter, int intDice)
 {
     if (GlobalOptions.SingleDiceRoller)
     {
         if (_frmRoller == null)
         {
             _frmRoller = new frmDiceRoller(this, objCharacter.Qualities, intDice);
             _frmRoller.Show();
         }
         else
         {
             _frmRoller.Dice      = intDice;
             _frmRoller.Qualities = objCharacter.Qualities;
             _frmRoller.Activate();
         }
     }
     else
     {
         frmDiceRoller frmRoller = new frmDiceRoller(this, objCharacter.Qualities, intDice);
         frmRoller.Show();
     }
 }
예제 #4
0
파일: frmMain.cs 프로젝트: AMDX9/chummer5a
		private void objCareer_DiceRollerOpenedInt(Character objCharacter, int intDice)
		{
			if (GlobalOptions.Instance.SingleDiceRoller)
			{
				if (_frmRoller == null)
				{
					frmDiceRoller frmRoller = new frmDiceRoller(this, objCharacter.Qualities, intDice);
					_frmRoller = frmRoller;
					frmRoller.Show();
				}
				else
				{
					_frmRoller.Dice = intDice;
					_frmRoller.Qualities = objCharacter.Qualities;
					_frmRoller.Focus();
				}
			}
			else
			{
				frmDiceRoller frmRoller = new frmDiceRoller(this, objCharacter.Qualities, intDice);
				frmRoller.Show();
			}
		}
예제 #5
0
파일: frmMain.cs 프로젝트: AMDX9/chummer5a
		private void objCareer_DiceRollerOpened(Object sender)
		{
			SkillControl objControl = (SkillControl)sender;

			if (GlobalOptions.Instance.SingleDiceRoller)
			{
				if (_frmRoller == null)
				{
					frmDiceRoller frmRoller = new frmDiceRoller(this, objControl.SkillObject.CharacterObject.Qualities, objControl.SkillObject.TotalRating);
					_frmRoller = frmRoller;
					frmRoller.Show();
				}
				else
				{
					_frmRoller.Dice = objControl.SkillObject.TotalRating;
					_frmRoller.Qualities = objControl.SkillObject.CharacterObject.Qualities;
					_frmRoller.Focus();
				}
			}
			else
			{
				frmDiceRoller frmRoller = new frmDiceRoller(this, objControl.SkillObject.CharacterObject.Qualities, objControl.SkillObject.TotalRating);
				frmRoller.Show();
			}
		}
예제 #6
0
파일: frmMain.cs 프로젝트: AMDX9/chummer5a
		private void mnuToolsDiceRoller_Click(object sender, EventArgs e)
		{
			if (GlobalOptions.Instance.SingleDiceRoller)
			{
				// Only a single instance of the Dice Roller window is allowed, so either find the existing one and focus on it, or create a new one.
				if (_frmRoller == null)
				{
					frmDiceRoller frmRoller = new frmDiceRoller(this);
					_frmRoller = frmRoller;
					frmRoller.Show();
				}
				else
				{
					_frmRoller.Focus();
				}
			}
			else
			{
				// No limit on the number of Dice Roller windows, so just create a new one.
				frmDiceRoller frmRoller = new frmDiceRoller(this);
				frmRoller.Show();
			}
		}