当前位置: 首页>>代码示例>>C#>>正文


C# Gear.WeaponBonusDamage方法代码示例

本文整理汇总了C#中Gear.WeaponBonusDamage方法的典型用法代码示例。如果您正苦于以下问题:C# Gear.WeaponBonusDamage方法的具体用法?C# Gear.WeaponBonusDamage怎么用?C# Gear.WeaponBonusDamage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gear的用法示例。


在下文中一共展示了Gear.WeaponBonusDamage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RefreshSelectedGear


//.........这里部分代码省略.........
                    cboGearSleaze.Visible = false;
                    cboGearDataProcessing.Visible = false;
                    cboGearFirewall.Visible = false;
                    lblGearAttackLabel.Visible = false;
                    lblGearSleazeLabel.Visible = false;
                    lblGearDataProcessingLabel.Visible = false;
                    lblGearFirewallLabel.Visible = false;
                }

                if (objGear.MaxRating > 0)
                {
                    _blnSkipRefresh = true;
                    if (objGear.MinRating > 0)
                        nudGearRating.Minimum = objGear.MinRating;
                    else if (objGear.MinRating == 0 && objGear.Name.Contains("Credstick,"))
                        nudGearRating.Minimum = 0;
                    else
                        nudGearRating.Minimum = 1;
                    nudGearRating.Maximum = objGear.MaxRating;
                    nudGearRating.Value = objGear.Rating;
                    if (nudGearRating.Minimum == nudGearRating.Maximum)
                        nudGearRating.Enabled = false;
                    else
                        nudGearRating.Enabled = true;
                    _blnSkipRefresh = false;
                }
                else
                {
                    _blnSkipRefresh = true;
                    nudGearRating.Minimum = 0;
                    nudGearRating.Maximum = 0;
                    nudGearRating.Enabled = false;
                    _blnSkipRefresh = false;
                }

                try
                {
                    _blnSkipRefresh = true;
                    chkGearBlackMarketDiscount.Checked = objGear.DiscountCost;
                    //nudGearQty.Minimum = objGear.CostFor;
                    nudGearQty.Increment = objGear.CostFor;
                    nudGearQty.Value = objGear.Quantity;
                    _blnSkipRefresh = false;
                }
                catch
                {
                }

                if (treGear.SelectedNode.Level == 1)
                {
                    _blnSkipRefresh = true;
                    nudGearQty.Enabled = true;
                    nudGearQty.Increment = objGear.CostFor;
                    //nudGearQty.Minimum = objGear.CostFor;
                    chkGearEquipped.Visible = true;
                    chkGearEquipped.Checked = objGear.Equipped;
                    _blnSkipRefresh = false;
                }
                else
                {
                    nudGearQty.Enabled = false;
                    _blnSkipRefresh = true;
                    chkGearEquipped.Visible = true;
                    chkGearEquipped.Checked = objGear.Equipped;

                    // If this is a Program, determine if its parent Gear (if any) is a Commlink. If so, show the Equipped checkbox.
                    if (objGear.IsProgram && _objOptions.CalculateCommlinkResponse)
                    {
                        Gear objParent = new Gear(_objCharacter);
                        objParent = objGear.Parent;
                        if (objParent.Category != string.Empty)
                        {
                            if (objParent.Category == "Commlinks" || objParent.Category == "Cyberdecks" || objParent.Category == "Nexus")
                                chkGearEquipped.Text = LanguageManager.Instance.GetString("Checkbox_SoftwareRunning");
                        }
                    }
                    _blnSkipRefresh = false;
                }

                // Show the Weapon Bonus information if it's available.
                if (objGear.WeaponBonus != null)
                {
                    lblGearDamageLabel.Visible = true;
                    lblGearDamage.Visible = true;
                    lblGearAPLabel.Visible = true;
                    lblGearAP.Visible = true;
                    lblGearDamage.Text = objGear.WeaponBonusDamage();
                    lblGearAP.Text = objGear.WeaponBonusAP;
                }
                else
                {
                    lblGearDamageLabel.Visible = false;
                    lblGearDamage.Visible = false;
                    lblGearAPLabel.Visible = false;
                    lblGearAP.Visible = false;
                }

                treGear.SelectedNode.Text = objGear.DisplayName;
            }
        }
开发者ID:cormanater,项目名称:chummer5a,代码行数:101,代码来源:frmCreate.cs

示例2: RefreshSelectedGear


//.........这里部分代码省略.........
                    chkActiveCommlink.Visible = false;
                }

                if (objGear.MaxRating > 0)
                {
                    _blnSkipRefresh = true;
                    if (objGear.MinRating > 0)
                        nudGearRating.Minimum = objGear.MinRating;
                    else if (objGear.MinRating == 0 && objGear.Name.Contains("Credstick,"))
                        nudGearRating.Minimum = 0;
                    else
                        nudGearRating.Minimum = 1;
                    nudGearRating.Maximum = objGear.MaxRating;
                    nudGearRating.Value = objGear.Rating;
                    if (nudGearRating.Minimum == nudGearRating.Maximum)
                        nudGearRating.Enabled = false;
                    else
                        nudGearRating.Enabled = true;
                    _blnSkipRefresh = false;
                }
                else
                {
                    _blnSkipRefresh = true;
                    nudGearRating.Minimum = 0;
                    nudGearRating.Maximum = 0;
                    nudGearRating.Enabled = false;
                    _blnSkipRefresh = false;
                }

                try
                {
                    _blnSkipRefresh = true;
                    chkGearBlackMarketDiscount.Checked = objGear.DiscountCost;
                    //nudGearQty.Minimum = objGear.CostFor;
                    nudGearQty.Increment = objGear.CostFor;
                    nudGearQty.Value = objGear.Quantity;
                    _blnSkipRefresh = false;
                }
                catch
                {
                }

                if (treGear.SelectedNode.Level == 1)
                {
                    _blnSkipRefresh = true;
                    nudGearQty.Enabled = true;
                    nudGearQty.Increment = objGear.CostFor;
                    //nudGearQty.Minimum = objGear.CostFor;
                    chkGearEquipped.Visible = true;
                    chkGearEquipped.Checked = objGear.Equipped;
                    _blnSkipRefresh = false;
                }
                else
                {
                    nudGearQty.Enabled = false;
                    _blnSkipRefresh = true;
                    chkGearEquipped.Visible = true;
                    chkGearEquipped.Checked = objGear.Equipped;

                    // If this is a Program, determine if its parent Gear (if any) is a Commlink. If so, show the Equipped checkbox.
                    if (objGear.IsProgram && _objOptions.CalculateCommlinkResponse)
                    {
                        Gear objParent = new Gear(_objCharacter);
                        objParent = objGear.Parent;
                        if (objParent.Category != string.Empty)
                        {
                            if (objParent.Category == "Commlink" || objParent.Category == "Nexus")
                                chkGearEquipped.Text = LanguageManager.Instance.GetString("Checkbox_SoftwareRunning");
                        }
                    }
                    _blnSkipRefresh = false;
                }

                // Show the Weapon Bonus information if it's available.
                if (objGear.WeaponBonus != null)
                {
                    lblGearDamageLabel.Visible = true;
                    lblGearDamage.Visible = true;
                    lblGearAPLabel.Visible = true;
                    lblGearAP.Visible = true;
                    lblGearDamage.Text = objGear.WeaponBonusDamage();
                    lblGearAP.Text = objGear.WeaponBonusAP;
                }
                else
                {
                    lblGearDamageLabel.Visible = false;
                    lblGearDamage.Visible = false;
                    lblGearAPLabel.Visible = false;
                    lblGearAP.Visible = false;
                }

                if ((_objCharacter.Metatype.EndsWith("A.I.") || _objCharacter.MetatypeCategory == "Technocritters" || _objCharacter.MetatypeCategory == "Protosapients") && objGear.GetType() == typeof(Commlink))
                {
                    chkGearHomeNode.Visible = true;
                    chkGearHomeNode.Checked = objGear.HomeNode;
                }

                treGear.SelectedNode.Text = objGear.DisplayName;
            }
        }
开发者ID:hollis21,项目名称:Chummer,代码行数:101,代码来源:frmCreate.cs

示例3: RefreshSelectedGear


//.........这里部分代码省略.........
                {
                    lblGearDeviceRating.Text = objGear.DeviceRating.ToString();
                    chkActiveCommlink.Visible = false;
                    lblGearAttack.Visible = false;
                    lblGearSleaze.Visible = false;
                    lblGearDataProcessing.Visible = false;
                    lblGearFirewall.Visible = false;
                    lblGearAttackLabel.Visible = false;
                    lblGearSleazeLabel.Visible = false;
                    lblGearDataProcessingLabel.Visible = false;
                    lblGearFirewallLabel.Visible = false;
                }

                if (objGear.MaxRating > 0)
                    lblGearRating.Text = objGear.Rating.ToString();
                else
                    lblGearRating.Text = "";

                try
                {
                    lblGearQty.Text = objGear.Quantity.ToString();
                }
                catch
                {
                }

                if (treGear.SelectedNode.Level == 1)
                {
                    _blnSkipRefresh = true;
                    lblGearQty.Text = objGear.Quantity.ToString();
                    chkGearEquipped.Visible = true;
                    chkGearEquipped.Checked = objGear.Equipped;

                    _blnSkipRefresh = false;
                }
                else
                {
                    lblGearQty.Text = "1";
                    chkGearEquipped.Visible = true;
                    chkGearEquipped.Checked = objGear.Equipped;

                    // If this is a Program, determine if its parent Gear (if any) is a Commlink. If so, show the Equipped checkbox.
                    if (objGear.IsProgram && _objOptions.CalculateCommlinkResponse)
                    {
                        Gear objParent = new Gear(_objCharacter);
                        objParent = objGear.Parent;
                        if (objParent.Category != string.Empty)
                        {
                            if (objParent.Category == "Commlink" || objParent.Category == "Nexus")
                                chkGearEquipped.Text = LanguageManager.Instance.GetString("Checkbox_SoftwareRunning");
                        }
                    }
                }

                // Show the Weapon Bonus information if it's available.
                if (objGear.WeaponBonus != null)
                {
                    lblGearDamageLabel.Visible = true;
                    lblGearDamage.Visible = true;
                    lblGearAPLabel.Visible = true;
                    lblGearAP.Visible = true;
                    lblGearDamage.Text = objGear.WeaponBonusDamage();
                    lblGearAP.Text = objGear.WeaponBonusAP;
                }
                else
                {
                    lblGearDamageLabel.Visible = false;
                    lblGearDamage.Visible = false;
                    lblGearAPLabel.Visible = false;
                    lblGearAP.Visible = false;
                }

                cmdGearReduceQty.Enabled = true;

                if ((_objCharacter.Metatype.EndsWith("A.I.") || _objCharacter.MetatypeCategory == "Technocritters" || _objCharacter.MetatypeCategory == "Protosapients") && (objGear.GetType() == typeof(Commlink) || objGear.Category == "Nexus"))
                {
                    chkGearHomeNode.Visible = true;
                    chkGearHomeNode.Checked = objGear.HomeNode;
                }

                treGear.SelectedNode.Text = objGear.DisplayName;
            }

            // Enable or disable the Split/Merge buttons as needed.
            if (treGear.SelectedNode.Level == 1)
            {
                cmdGearSplitQty.Enabled = true;
                cmdGearMergeQty.Enabled = true;
                if (_objCharacter.Vehicles.Count > 0)
                    cmdGearMoveToVehicle.Enabled = true;
                else
                    cmdGearMoveToVehicle.Enabled = false;
            }
            else
            {
                cmdGearSplitQty.Enabled = false;
                cmdGearMergeQty.Enabled = false;
                cmdGearMoveToVehicle.Enabled = false;
            }
        }
开发者ID:Althalusdlg,项目名称:chummer5a,代码行数:101,代码来源:frmCareer.cs

示例4: RefreshSelectedGear


//.........这里部分代码省略.........
						chkGearHomeNode.Checked = objCommlink.HomeNode;
					}
				}
				else
				{
					cboCyberwareGearOverclocker.Visible = _objCharacter.Overclocker;
					lblCyberwareGearOverclocker.Visible = _objCharacter.Overclocker;
					lblGearDeviceRating.Text = objGear.DeviceRating.ToString();
                    chkActiveCommlink.Visible = false;
					cboGearAttack.Visible = false;
					cboGearSleaze.Visible = false;
					cboGearDataProcessing.Visible = false;
					cboGearFirewall.Visible = false;
					lblGearAttackLabel.Visible = false;
                    lblGearSleazeLabel.Visible = false;
                    lblGearDataProcessingLabel.Visible = false;
                    lblGearFirewallLabel.Visible = false;
                }

				if (objGear.MaxRating > 0)
					lblGearRating.Text = objGear.Rating.ToString();
				else
					lblGearRating.Text = "";

				try
				{
					lblGearQty.Text = objGear.Quantity.ToString();
				}
				catch
				{
				}

				if (treGear.SelectedNode.Level == 1)
				{
					_blnSkipRefresh = true;
					lblGearQty.Text = objGear.Quantity.ToString();
					chkGearEquipped.Visible = true;
					chkGearEquipped.Checked = objGear.Equipped;

					_blnSkipRefresh = false;
				}
				else
				{
					lblGearQty.Text = "1";
					chkGearEquipped.Visible = true;
					chkGearEquipped.Checked = objGear.Equipped;

					// If this is a Program, determine if its parent Gear (if any) is a Commlink. If so, show the Equipped checkbox.
					if (objGear.IsProgram && _objOptions.CalculateCommlinkResponse)
					{
						Gear objParent = new Gear(_objCharacter);
						objParent = objGear.Parent;
						if (objParent.Category != string.Empty)
						{
							if (objParent.Category == "Commlink" || objParent.Category == "Nexus")
								chkGearEquipped.Text = LanguageManager.Instance.GetString("Checkbox_SoftwareRunning");
						}
					}
				}

				// Show the Weapon Bonus information if it's available.
				if (objGear.WeaponBonus != null)
				{
					lblGearDamageLabel.Visible = true;
					lblGearDamage.Visible = true;
					lblGearAPLabel.Visible = true;
					lblGearAP.Visible = true;
					lblGearDamage.Text = objGear.WeaponBonusDamage();
					lblGearAP.Text = objGear.WeaponBonusAP;
				}
				else
				{
					lblGearDamageLabel.Visible = false;
					lblGearDamage.Visible = false;
					lblGearAPLabel.Visible = false;
					lblGearAP.Visible = false;
				}

				cmdGearReduceQty.Enabled = true;

				treGear.SelectedNode.Text = objGear.DisplayName;
			}

			// Enable or disable the Split/Merge buttons as needed.
			if (treGear.SelectedNode.Level == 1)
			{
				cmdGearSplitQty.Enabled = true;
				cmdGearMergeQty.Enabled = true;
				if (_objCharacter.Vehicles.Count > 0)
					cmdGearMoveToVehicle.Enabled = true;
				else
					cmdGearMoveToVehicle.Enabled = false;
			}
			else
			{
				cmdGearSplitQty.Enabled = false;
				cmdGearMergeQty.Enabled = false;
				cmdGearMoveToVehicle.Enabled = false;
			}
		}
开发者ID:AMDX9,项目名称:chummer5a,代码行数:101,代码来源:frmCareer.cs


注:本文中的Gear.WeaponBonusDamage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。