void ExportMdbToCsvExecuted(object sender, ExecutedRoutedEventArgs e) { var files = TwFile.GetMdbLogFiles(Properties.Settings.Default.DirectoryLog); if (files != null && files.Length > 0) { var list = new List <string>(); for (int i = 0; i < files.Length; i++) { list.Add(files[i]); } var countFilesSaved = TwServices.ExportMdbToCsv(list); MessageBox.Show(countFilesSaved + " CSV file(s) were created.", TwAssembly.TitleTraceWizard()); } }
void ExportLogToTwdbExecuted(object sender, ExecutedRoutedEventArgs e) { var files = TwFile.GetLogFilesIncludingZipped(Properties.Settings.Default.DirectoryLog); if (files != null && files.Count > 0) { var list = new List <string>(); for (int i = 0; i < files.Count; i++) { list.Add(files[i]); } var countFilesSaved = TwServices.ExportLogToTwdb(list, new Tw4PostTrickleMergeMidnightSplitDisaggregator()); MessageBox.Show(countFilesSaved + " TWDB file(s) were created.", TwAssembly.TitleTraceWizard()); } }
void ButtonAppend_Click(object sender, RoutedEventArgs e) { double percentElapsed = (StyledEventsViewerUpper.EventsViewer.ScrollViewer.HorizontalOffset / StyledEventsViewerUpper.EventsViewer.LinedEventsCanvas.Width); int secondsOffset = (int)(percentElapsed * AnalysisUpper.Events.Duration.TotalSeconds); var dateTimeUpperToStartCopyingAt = GetEndTimeView(StyledEventsViewerUpper, AnalysisUpper); var dateTimeLowerToEndCopyingAt = GetEndTimeView(StyledEventsViewerLower, AnalysisLower); if (Events.HasEventInProgress(AnalysisUpper.Events, dateTimeUpperToStartCopyingAt) || Events.HasEventInProgress(AnalysisLower.Events, dateTimeLowerToEndCopyingAt)) { MessageBox.Show("In order to append, please scroll the upper and lower graphs such that no event is in progress at the end of the view shown.", TwAssembly.TitleTraceWizard(), MessageBoxButton.OK, MessageBoxImage.Warning); } else { var analysisAppended = Analysis.Append(AnalysisLower, AnalysisUpper, dateTimeLowerToEndCopyingAt, dateTimeUpperToStartCopyingAt); string fileName = analysisAppended.KeyCode; Mouse.OverrideCursor = Cursors.Wait; MainTwWindow mainWindow = (MainTwWindow)Application.Current.MainWindow; var analysisPanel = mainWindow.CreateAnalysisPanel(analysisAppended, fileName, false); mainWindow.AddTab(analysisPanel, fileName); Mouse.OverrideCursor = null; } }
void ExportLow() { var analysisAdapterTarget = new ArffAnalysisAdapter(); analysisAdapterTarget.Attributes = attributes; this.Total = analysisFiles.Count; foreach (string analysisFile in analysisFiles) { if (this._isCancelationPending == true) { break; } ++this.Current; this.KeyCode = GetKeyCode(analysisFile); Analysis analysis = Services.TwServices.CreateAnalysis(analysisFile); EventsArff events = analysisAdapterTarget.Load(analysis.Events); analysisAdapterTarget.Save(arffFile, new Analysis(events, analysis.KeyCode), false); } if (launchTextEditor) { TwFile.LaunchNotepad(arffFile); } else { MessageBox.Show("Export file successfully created: \r\n\r\n" + arffFile, TwAssembly.TitleTraceWizard()); } }