///根据当前装备,重新计算属性值 public void refreshProperty() { property = baseProperty.clone(); //加上防具的属性 foreach (var item in equipments.armors.Values) { property.strength += item.attack; property.defense += item.defense; property.speed += item.speed; property.manliness += item.manliness; property.resistance[MMX.AttackProperty.ice] += item.iceResistance; property.resistance[MMX.AttackProperty.fire] += item.fireResistance; property.resistance[MMX.AttackProperty.electric] += item.electricResistance; property.resistance[MMX.AttackProperty.sonic] += item.sonicResistance; property.resistance[MMX.AttackProperty.gas] += item.gasResistance; property.resistance[MMX.AttackProperty.beam] += item.laserResistance; } //应用特效 effects.ForEach(item => { if (item is MMX.HumanAbilityPassiveEffect) { (item as MMX.HumanAbilityPassiveEffect).take(this); } }); }
//------------------------------------------------------------------// // Subroutine // //------------------------------------------------------------------// private bool checedProcess() { if (!loginProcess()) { return(false); } hp = new HumanProperty(); if (!checkMembers()) { return(false); } if (!checkOffice()) { return(false); } if (!checkCommon()) { return(false); } if (!selectNextMenu()) { return(false); } return(true); }
private bool loginProcess() { labelMessage.Text = ""; if (textBoxMemberCode.Text == null || textBoxMemberCode.Text == "") { labelMessage.Text = "社員番号が入力されていません!"; labelMessage.ForeColor = Color.Red; //MessageBox.Show("ログイン名を入力してください"); return(false); } //####################################### // Super User if (textBoxMemberCode.Text == rootUser) { hp = new HumanProperty(); if (formMenuDataMnt == null || formMenuDataMnt.IsDisposed) { hp.MemberName = rootUser; formMenuDataMnt = new FormMenuDataMnt(hp); formMenuDataMnt.Show(); } } //####################################### return(true); }
private void button_Click(object sender, EventArgs e) { if (iniPro) { return; } Button btn = (Button)sender; switch (btn.Name) { case "buttonLogin": if (!loginProcess()) { return; } hp = new HumanProperty(); if (!checkMembers()) { return; } if (!checkOffice()) { return; } if (!checkCommon()) { return; } if (!selectNextMenu()) { return; } //checedProcess(); break; case "buttonCancel": labelMessage.Text = ""; textBoxMemberCode.Text = ""; break; case "buttonEnd": string tempFile = Folder.DefaultLocation() + @"\.~temp.xlsx"; if (File.Exists(tempFile)) { File.Delete(tempFile); } if (hp != null) { Exclusive exclusive = new Exclusive(); exclusive.Unregister(hp.MemberCode); } Application.Exit(); break; default: break; } }
public HumanProperty clone() { var prop = new HumanProperty(); prop.hp = hp; prop.maxHp = maxHp; prop.defense = defense; prop.strength = strength; prop.vitality = vitality; prop.manliness = manliness; prop.speed = speed; prop.resistance = new Dictionary <MMX.AttackProperty, int>(resistance); return(prop); }
public FormMenuDataMnt(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormOsPayment(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormMenuEstPlan(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormTaskNoConfList(HumanProperty hp) { this.hp = hp; InitializeComponent(); }
public FormReview(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormExportCostMaster(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormTaskList(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormCostInformation(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
//---------------------------------------------------------------------- // Contructor //---------------------------------------------------------------------- public FormVolumeBook(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormExportTask(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormReview(HumanProperty hp, string SetYear) { InitializeComponent(); this.hp = hp; YearPeriod = SetYear; }
public FormClosingProc(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormInputCostData(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormImpMWorkItems(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormOsWkReportSetup(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormContractCostSummary(HumanProperty hp) { this.hp = hp; InitializeComponent(); }
public FormMenuCostVol(HumanProperty hp) { InitializeComponent(); this.hp = hp; }
public FormMenuOutsource(HumanProperty hp) { InitializeComponent(); this.hp = hp; }