Beispiel #1
0
    ///根据当前装备,重新计算属性值
    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);
            }
        });
    }
Beispiel #2
0
 //------------------------------------------------------------------//
 // 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);
 }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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;
            }
        }
Beispiel #5
0
    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);
    }
Beispiel #6
0
 public FormMenuDataMnt(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #7
0
 public FormOsPayment(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #8
0
 public FormMenuEstPlan(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #9
0
 public FormTaskNoConfList(HumanProperty hp)
 {
     this.hp = hp;
     InitializeComponent();
 }
Beispiel #10
0
 public FormReview(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #11
0
 public FormExportCostMaster(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #12
0
        public FormTaskList(HumanProperty hp)
        {
            InitializeComponent();

            this.hp = hp;
        }
Beispiel #13
0
 public FormCostInformation(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #14
0
 //----------------------------------------------------------------------
 //     Contructor
 //----------------------------------------------------------------------
 public FormVolumeBook(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #15
0
 public FormExportTask(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #16
0
 public FormReview(HumanProperty hp, string SetYear)
 {
     InitializeComponent();
     this.hp    = hp;
     YearPeriod = SetYear;
 }
Beispiel #17
0
 public FormClosingProc(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #18
0
 public FormInputCostData(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #19
0
 public FormImpMWorkItems(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #20
0
 public FormOsWkReportSetup(HumanProperty hp)
 {
     InitializeComponent();
     this.hp = hp;
 }
Beispiel #21
0
 public FormContractCostSummary(HumanProperty hp)
 {
     this.hp = hp;
     InitializeComponent();
 }
Beispiel #22
0
        public FormMenuCostVol(HumanProperty hp)
        {
            InitializeComponent();

            this.hp = hp;
        }
Beispiel #23
0
        public FormMenuOutsource(HumanProperty hp)
        {
            InitializeComponent();

            this.hp = hp;
        }