Corrected export bug, removed transparency

This commit is contained in:
Agustín Gimenez 2022-11-26 23:56:25 +01:00
parent bbc4d8e03b
commit 99b6e7f629
2 changed files with 16 additions and 6 deletions

View File

@ -6,10 +6,11 @@
mc:Ignorable="d" d:DesignWidth="1024" d:DesignHeight="800" mc:Ignorable="d" d:DesignWidth="1024" d:DesignHeight="800"
x:Class="LogicAnalyzer.MainWindow" x:Class="LogicAnalyzer.MainWindow"
Title="LogicAnalyzer - Multiplatform version" Title="LogicAnalyzer - Multiplatform version"
TransparencyLevelHint="AcrylicBlur" Icon="/Assets/window.ico" Icon="/Assets/window.ico"
Background="Transparent" MinWidth="1024" MinHeight="800" Width="1024" Height="800" WindowStartupLocation="CenterScreen"> Background="Black" MinWidth="1024" MinHeight="800" Width="1024" Height="800" WindowStartupLocation="CenterScreen">
<DockPanel VerticalAlignment="Stretch"> <DockPanel VerticalAlignment="Stretch">
<!--
<ExperimentalAcrylicBorder IsHitTestVisible="False"> <ExperimentalAcrylicBorder IsHitTestVisible="False">
<ExperimentalAcrylicBorder.Material> <ExperimentalAcrylicBorder.Material>
<ExperimentalAcrylicMaterial <ExperimentalAcrylicMaterial
@ -18,7 +19,7 @@
TintOpacity="1" TintOpacity="1"
MaterialOpacity="0.65" /> MaterialOpacity="0.65" />
</ExperimentalAcrylicBorder.Material> </ExperimentalAcrylicBorder.Material>
</ExperimentalAcrylicBorder> </ExperimentalAcrylicBorder>-->
<Menu DockPanel.Dock="Top" Background="#f0202020"> <Menu DockPanel.Dock="Top" Background="#f0202020">
<MenuItem Header="_File"> <MenuItem Header="_File">

View File

@ -62,6 +62,7 @@ namespace LogicAnalyzer
var sf = new SaveFileDialog(); var sf = new SaveFileDialog();
{ {
sf.Filters.Add(new FileDialogFilter { Name = "Comma-separated values file", Extensions = new System.Collections.Generic.List<string> { "csv" } }); sf.Filters.Add(new FileDialogFilter { Name = "Comma-separated values file", Extensions = new System.Collections.Generic.List<string> { "csv" } });
var file = await sf.ShowAsync(this); var file = await sf.ShowAsync(this);
if (string.IsNullOrWhiteSpace(file)) if (string.IsNullOrWhiteSpace(file))
@ -69,10 +70,18 @@ namespace LogicAnalyzer
StreamWriter sw = new StreamWriter(File.Create(file)); 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(); 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++) for (int sample = 0; sample < sampleViewer.Samples.Length; sample++)
{ {
sb.Clear(); sb.Clear();