private void buttonSource_Click(object sender, EventArgs e) { ResourceLimit limit = new ResourceLimit() { Village = this.CV, Description = this.mui._("lowerlimit"), Limit = this.CV.Market.LowerLimit == null ? new TResAmount(0, 0, 0, 0) : this.CV.Market.LowerLimit, mui = this.mui }; if (limit.ShowDialog() == DialogResult.OK && limit.Return != null) { this.CV.Market.LowerLimit = limit.Return; UpCall.Dirty = true; } }
private void buttonlimit_Click(object sender, EventArgs e) { ResourceLimit limit = new ResourceLimit() { Village = this.CV, Description = this.mui._("TResourceLimit"), Limit = this.CV.Troop.ResLimit == null ? new TResAmount(0, 0, 0, 0) : this.CV.Troop.ResLimit, mui = this.mui }; if (limit.ShowDialog() == DialogResult.OK && limit.Return != null) { this.CV.Troop.ResLimit = limit.Return; TravianData.Dirty = true; } }
private void buttonTarget_Click(object sender, EventArgs e) { if (this.TV == null || this.TV.isBuildingInitialized != 2) { return; } ResourceLimit limit = new ResourceLimit() { Village = this.TV, Description = this.mui._("upperlimit"), Limit = this.TV.Market.UpperLimit == null ? this.TV.ResourceCapacity : this.TV.Market.UpperLimit, mui = this.mui }; if (limit.ShowDialog() == DialogResult.OK && limit.Return != null) { this.TV.Market.UpperLimit = limit.Return; UpCall.Dirty = true; } }
/// <summary> /// Set village resource upper bound for incoming transportation /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CMVUpperLimit_Click(object sender, EventArgs e) { if (!TravianData.Villages.ContainsKey(SelectVillage)) { return; } TVillage village = this.TravianData.Villages[SelectVillage]; if (village.isBuildingInitialized != 2) { return; } ResourceLimit limit = new ResourceLimit() { Village = village, Description = mui._("upperlimit"), Limit = village.Market.UpperLimit == null ? village.ResourceCapacity : village.Market.UpperLimit, mui = this.mui }; if (limit.ShowDialog() == DialogResult.OK) { village.Market.UpperLimit = limit.Return; TravianData.Dirty = true; } }