public HPViewModel( TargetHP config, TargetInfoModel model) { this.config = config ?? Settings.Instance.TargetHP; this.model = model ?? TargetInfoModel.Instance; this.RaisePropertyChanged(nameof(Config)); this.RaisePropertyChanged(nameof(Model)); if (WPFHelper.IsDesignMode) { this.config = new TargetHP(); this.FontColor = Colors.White; this.FontStrokeColor = Colors.Red; this.CurrentHPText = "123,456,789 / 123,456,789"; this.CurrentHPRateText = "(100.0%)"; this.CurrentHPUpperText = "123,456"; this.CurrentHPBottomText = " ,789"; this.MaxHPUpperText = "123,456"; this.MaxHPBottomText = " ,789"; } this.Initialize(); }
public HPBarViewModel( TargetHP config, TargetInfoModel model) { this.config = config ?? Settings.Instance.TargetHP; this.model = model ?? TargetInfoModel.Instance; if (WPFHelper.IsDesignMode) { this.FontColor = Colors.White; this.FontStrokeColor = Colors.Red; this.CurrentHPText = "123,456,789 / 123,456,789"; this.CurrentHPRateText = "(100.0%)"; } this.Initialize(); }