private void DisplayMp(Int32 playerId, BattleUnit bd) { ValueWidget numberSubModeHud = MP.Array[playerId]; numberSubModeHud.IsActive = true; numberSubModeHud.Value.SetText(bd.CurrentMp.ToString()); numberSubModeHud.MaxValue.SetText(bd.MaximumMp.ToString()); numberSubModeHud.SetColor(CheckMPState(bd) == ParameterStatus.Empty ? FF9TextTool.Yellow : FF9TextTool.White); }
void ResetAggregates(List <Band> bands, ResetEnum resetType) { foreach (Band band in bands) { foreach (BaseWidget widget in band.Items) { ValueWidget vw = widget as ValueWidget; if (vw != null && vw.CalcType != CalcEnum.None && vw.ResetType == resetType) { vw.Reset(); } } } }
void UpdateAggregates(List <Band> bands) { foreach (Band band in bands) { foreach (BaseWidget widget in band.Items) { ValueWidget vw = widget as ValueWidget; if (vw != null && vw.CalcType != CalcEnum.None) { vw.Aggregate(GetColumnValue(vw.ColumnName)); } } } }
void RollbackAggregates(List <Band> bands) { foreach (Band band in bands) { foreach (BaseWidget widget in band.Items) { ValueWidget vw = widget as ValueWidget; if (vw != null && vw.CalcType != CalcEnum.None) { vw.Calc.Rollback(); } } } }
void Reset() { _document = new ClassicReportDocument(_model); //_document._width = _model.PageWidth; _footer = _model.PageFooter; _args.Index = 0; _args.Eof = false; _args.Bof = true; // reset all fields foreach (Band band in _model.Bands) { foreach (BaseWidget widget in band.Items) { ValueWidget vw = widget as ValueWidget; if (vw != null) { vw.Reset(); } } } }
private void DisplayHp(Int32 playerId, BattleUnit bd) { ValueWidget hud = HP.Array[playerId]; hud.IsActive = true; hud.Value.SetText(bd.CurrentHp.ToString()); hud.MaxValue.SetText(bd.MaximumHp.ToString()); switch (CheckHPState(bd)) { case ParameterStatus.Empty: hud.SetColor(FF9TextTool.Red); return; case ParameterStatus.Critical: hud.SetColor(FF9TextTool.Yellow); return; default: hud.SetColor(FF9TextTool.White); return; } }
void Update() { foreach (Band band in _model.Bands) { foreach (BaseWidget widget in band.Items) { ValueWidget vw = widget as ValueWidget; if (vw != null) { object colValue = GetColumnValue(vw.ColumnName); if (vw.CalcType == CalcEnum.None) { vw.SetValue(colValue); } else { vw.Aggregate(colValue); } } } } }
void RenderGroupFooter(int groupIndex) { if (HasGroups()) { for (int index = _model.Groups.Count; index >= groupIndex; index--) { Group group = _model.Groups[index - 1]; if (group.ShowFooter) { List <Band> grpFooterBands = GetGroupFooterBands(index); if (WillOverFlow(grpFooterBands.Count)) { RenderPageFooter(); } foreach (Band band in grpFooterBands) { foreach (BaseWidget widget in band.Items) { widget.Write(_page); ValueWidget vw = widget as ValueWidget; if (vw != null) { if (vw.ResetType == ResetEnum.Default || vw.ResetType == ResetEnum.EndOfGroup) { vw.Reset(); } } } _page.WriteLine(); if (_page.CurrentRow == _footer) { RenderPageFooter(); } } } } } }
void RenderGroupHeader(int groupIndex) { if (HasGroups()) { for (int index = groupIndex; index <= _model.Groups.Count; index++) { Group group = _model.Groups[index - 1]; if (group.ShowHeader) { // loop around each groups bands List <Band> groupHeaderBands = GetGroupHeaderBands(index); if (WillOverFlow(groupHeaderBands.Count)) { RenderPageFooter(); } foreach (Band band in groupHeaderBands) { foreach (BaseWidget widget in band.Items) { widget.Write(_page); ValueWidget vw = widget as ValueWidget; if (vw != null) { vw.Reset(); } } _page.WriteLine(); if (_page.CurrentRow >= _footer) { RenderPageFooter(); } } } } } }