private void CaptureActionHandler(CaptureMessage message) { if (message.Type == CaptureMessage.MessageType.CurrentCaptureChanged) { this._captureVm = message.CaptureVm as CaptureVm; } }
private void CaptureMessageHandler(CaptureMessage message) { switch (message.Type) { case CaptureMessage.MessageType.CurrentCaptureChangedById: Task.Factory.StartNew(() => { //todo this.SetCurrentCaptureById(message.CaptureId); if (message.BringToFront) { BringToFrontMessage.SendBringToFrontMessage("CaptureView"); } }); break; case CaptureMessage.MessageType.AddCaptureToExport: Task.Factory.StartNew(() => { var capture = message.CaptureVm as CaptureVm; this.AddCaptureToExport(capture); this.NavigationService.Show(typeof(SelectiveExportVm)); }); break; } }
public static void SendCaptureMessage(object currentCaptureVm, MessageType type, bool bringToFront) { var newCaptureMessage = new CaptureMessage { CaptureVm = currentCaptureVm, Type = type, BringToFront = bringToFront }; AsyncSendMessage(newCaptureMessage); }
private void AddCaptureToExport(RoutedEventArgs e) { var frameworkElement = e.OriginalSource as FrameworkElement; if (frameworkElement == null) { return; } var capture = frameworkElement.DataContext as CaptureVm; var investigationExplorerVm = this.ApplicationOrInvestigationWindsorContainer.Resolve <InvestigationExplorerVm>(); if (investigationExplorerVm.InvestigationVm != null && capture != null) { //investigationExplorerVm.InvestigationVm.AddCaptureToExport(capture); CaptureMessage.SendCaptureMessage(capture, CaptureMessage.MessageType.AddCaptureToExport, true); //ConversationMessage.SendConversationMessage(this.CurrentConversation, ConversationMessage.MessageType.AddConversationToExport, false); } }
public static extern IntPtr SendMessage(IntPtr hWnd, CaptureMessage Msg, IntPtr wParam, IntPtr lParam);