diff --git a/Software/LogicAnalyzer/LogicAnalyzer/MainWindow.axaml b/Software/LogicAnalyzer/LogicAnalyzer/MainWindow.axaml index 8bf5d2e..fa57eb9 100644 --- a/Software/LogicAnalyzer/LogicAnalyzer/MainWindow.axaml +++ b/Software/LogicAnalyzer/LogicAnalyzer/MainWindow.axaml @@ -6,10 +6,11 @@ mc:Ignorable="d" d:DesignWidth="1024" d:DesignHeight="800" x:Class="LogicAnalyzer.MainWindow" Title="LogicAnalyzer - Multiplatform version" - TransparencyLevelHint="AcrylicBlur" Icon="/Assets/window.ico" - Background="Transparent" MinWidth="1024" MinHeight="800" Width="1024" Height="800" WindowStartupLocation="CenterScreen"> + Icon="/Assets/window.ico" + Background="Black" MinWidth="1024" MinHeight="800" Width="1024" Height="800" WindowStartupLocation="CenterScreen"> - + + diff --git a/Software/LogicAnalyzer/LogicAnalyzer/MainWindow.axaml.cs b/Software/LogicAnalyzer/LogicAnalyzer/MainWindow.axaml.cs index 4d76496..e8ced6a 100644 --- a/Software/LogicAnalyzer/LogicAnalyzer/MainWindow.axaml.cs +++ b/Software/LogicAnalyzer/LogicAnalyzer/MainWindow.axaml.cs @@ -62,6 +62,7 @@ namespace LogicAnalyzer var sf = new SaveFileDialog(); { sf.Filters.Add(new FileDialogFilter { Name = "Comma-separated values file", Extensions = new System.Collections.Generic.List { "csv" } }); + var file = await sf.ShowAsync(this); if (string.IsNullOrWhiteSpace(file)) @@ -69,10 +70,18 @@ namespace LogicAnalyzer StreamWriter sw = new StreamWriter(File.Create(file)); - sw.WriteLine(String.Join(',', channelViewer.Channels.Select(c => string.IsNullOrWhiteSpace(channelViewer.ChannelsText[c]) ? $"Channel {c + 1}" : channelViewer.ChannelsText[c]).ToArray())); - StringBuilder sb = new StringBuilder(); + for (int buc = 0; buc < channelViewer.Channels.Length; buc++) + { + sb.Append(string.IsNullOrWhiteSpace(channelViewer.ChannelsText[buc]) ? $"Channel {buc + 1}" : channelViewer.ChannelsText[buc]); + + if (buc < channelViewer.Channels.Length - 1) + sb.Append(","); + } + + sw.WriteLine(sb.ToString()); + for (int sample = 0; sample < sampleViewer.Samples.Length; sample++) { sb.Clear();