public RacersEntryViewModel() { _race = Container.Resolve <Race>(); _application = Container.Resolve <Application>(); StartRaceCommand = new NavigateToCommand <RacersEntryViewModel, RaceView>(this); AddRacerCommand = new AddRacerCommand(this); RemoveRacerCommand = new RemoveRacerCommand(this); }
public ApplicationViewModel() { _application = Container.Resolve <Application>(); NavigateToFreePracticeCommand = new NavigateToCommand <ApplicationViewModel, FreePracticeView>(this); NavigateToTrackConnectionCommand = new NavigateToCommand <ApplicationViewModel, TrackConnectionView>(this); NavigateToRaceSetupCommand = new NavigateToCommand <ApplicationViewModel, RaceConfigurationView>(this); NavigateToResultsCommand = new NavigateToCommand <ApplicationViewModel, RaceResultsView>(this); DisconnectCommand = new DisconnectCommand(this); }
private void UpdateVersions() { TextBlock.Blocks.Clear(); if (ConflictVersionInfo == null) { return; } var para = new Paragraph(); var navigateCommand = new NavigateToCommand(); var count = 1; foreach (var version in ConflictVersionInfo) { var versionId = version.Value <string>("Id"); var sourceId = version.Value <string>("SourceId"); ReplicationSourceInfo sourceInfo = null; if (ReplicationSourcesLookup != null) { ReplicationSourcesLookup.TryGetValue(sourceId, out sourceInfo); } var hyperlink = new InlineUIContainer() { Child = new HyperlinkButton() { Content = count.ToString() + (sourceInfo != null ? " (" + sourceInfo.Name + ")" : ""), Command = navigateCommand, CommandParameter = "/edit?id=" + versionId } }; if (sourceInfo != null) { var toolTip = CreateToolTip(versionId, sourceInfo); ToolTipService.SetToolTip(hyperlink.Child, toolTip); } para.Inlines.Add(hyperlink); para.Inlines.Add(" "); count++; } TextBlock.Blocks.Add(para); }
private void UpdateVersions() { TextBlock.Blocks.Clear(); if (ConflictVersionInfo == null) { return; } var para = new Paragraph(); var navigateCommand = new NavigateToCommand(); var count = 1; foreach (var version in ConflictVersionInfo) { var versionId = version.Value<string>("Id"); var sourceId = version.Value<string>("SourceId"); ReplicationSourceInfo sourceInfo = null; if (ReplicationSourcesLookup != null) { ReplicationSourcesLookup.TryGetValue(sourceId, out sourceInfo); } var hyperlink = new InlineUIContainer() { Child = new HyperlinkButton() { Content = count.ToString() + (sourceInfo != null ? " (" + sourceInfo.Name + ")" : ""), Command = navigateCommand, CommandParameter = "/edit?id=" + versionId } }; if (sourceInfo != null) { var toolTip = CreateToolTip(versionId, sourceInfo); ToolTipService.SetToolTip(hyperlink.Child, toolTip); } para.Inlines.Add(hyperlink); para.Inlines.Add(" "); count++; } TextBlock.Blocks.Add(para); }
public MainWindowViewModel() { OpenFolderCommand = new OpenFolderCommand(this); NavigateToCommand = new NavigateToCommand(this); CloseFolderCommand = new CloseFolderCommand(this); }