public override void ExecuteCommand(string name, CommandArguments args) { //If the view was set when the command was //received, it won't be loaded yet. if (loader == null) { Dispatcher.BeginInvoke(new Action <string, CommandArguments>(ExecuteCommand), DispatcherPriority.Loaded, name, args); return; } switch (name) { case InformAutoTimerCommand: hasRemoteAutoTimer = args.ReadParameter <bool>(); // Regardless of the setting, stop our timer. Whichever view started // the timer (which may be this instance) will start its timer after // broadcasting the command. autoTimer.Stop(); break; case NavigateCommand: DoNavigateTo(args.ReadParameter <int>()); break; case ShowHighlightCommand: DoNavigateTo(args.ReadParameter <int>()); DoShowHighlight(args.ReadParameter <double>(), args.ReadParameter <double>()); break; default: MessageBox.Show("Unknown command: " + name); break; } }
public override void ExecuteCommand(string name, CommandArguments parameters) { switch (name) { case SetStateCommand: VideoIndex = parameters.ReadParameter <int>(); Position = TimeSpan.FromTicks(parameters.ReadParameter <long>()); IsPlaying = parameters.ReadParameter <bool>(); UpdateTrackBar(); break; default: MessageBox.Show("Unknown command: " + name); break; } }
public override void ExecuteCommand(string name, CommandArguments parameters) { switch (name) { case SetMessageCommand: DoSetMessage(parameters.ReadParameter<string>()); break; default: MessageBox.Show("Unknown command: " + name); break; } }
public override void ExecuteCommand(string name, CommandArguments parameters) { switch (name) { case SetMessageCommand: DoSetMessage(parameters.ReadParameter <string>()); break; default: MessageBox.Show("Unknown command: " + name); break; } }
public override void ExecuteCommand(string name, CommandArguments args) { //If the view was set when the command was //received, it won't be loaded yet. if (loader == null) { Dispatcher.BeginInvoke(new Action<string, CommandArguments>(ExecuteCommand), DispatcherPriority.Loaded, name, args); return; } switch (name) { case InformAutoTimerCommand: hasRemoteAutoTimer = args.ReadParameter<bool>(); // Regardless of the setting, stop our timer. Whichever view started // the timer (which may be this instance) will start its timer after // broadcasting the command. autoTimer.Stop(); break; case NavigateCommand: DoNavigateTo(args.ReadParameter<int>()); break; case ShowHighlightCommand: DoNavigateTo(args.ReadParameter<int>()); DoShowHighlight(args.ReadParameter<double>(), args.ReadParameter<double>()); break; default: MessageBox.Show("Unknown command: " + name); break; } }