private void SubscribeTextCommands() { // /parse コマンド TextCommandBridge.Instance.Subscribe(new TextCommand( (string logLine, out Match match) => { match = null; if (!logLine.ContainsIgnoreCase(ParseCommand)) { return(false); } match = ParseCommandRegex.Match(logLine); return(match.Success); }, (string logLine, Match match) => { if (match == null || !match.Success) { return; } var charName = match.Groups["characterName"].ToString(); var serverName = match.Groups["serverName"].ToString(); TargetInfoModel.GetFFLogsInfoFromTextCommand( charName, serverName); })); // MyUtilityの登録 MyUtilityOnWipeoutCommand.Instance.Subscribe(); }
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 ActionViewModel( TargetAction config, TargetInfoModel model) { this.config = config ?? Settings.Instance.TargetAction; this.model = model ?? TargetInfoModel.Instance; this.Initialize(); }
public NameViewModel( TargetName config, TargetInfoModel model) { this.config = config ?? Settings.Instance.TargetName; this.model = model ?? TargetInfoModel.Instance; this.Initialize(); }
public DistanceViewModel( TargetDistance config, TargetInfoModel model) { this.config = config ?? Settings.Instance.TargetDistance; this.model = model ?? TargetInfoModel.Instance; this.RaisePropertyChanged(nameof(Config)); this.RaisePropertyChanged(nameof(Model)); 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(); }