Skip to content

Commit

Permalink
ui: show badfiles info
Browse files Browse the repository at this point in the history
  • Loading branch information
dobin committed Nov 5, 2023
1 parent 46720d7 commit fb48eaa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
11 changes: 7 additions & 4 deletions waasa/UI/WindowInfo.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@
Title="Wazza - Extension Details" Height="450" Width="800">
<Grid>
<TabControl>

<TabItem Header="Badfile">
<TextBox Text="{Binding BadfileInfo}"></TextBox>
</TabItem>
<TabItem Header="Shlwapi">
<TextBox Text="{Binding Shlwapi}"></TextBox>
</TabItem>
<TabItem Header="Reg HKCR">
<TextBox Text="{Binding ExtensionRegInfo}"></TextBox>
</TabItem>
<TabItem Header="Reg HKCU">
<TextBox Text="{Binding ExtensionObjInfo}"></TextBox>
</TabItem>
<TabItem Header="Shlwapi">
<TextBox Text="{Binding Shlwapi}"></TextBox>
</TabItem>

</TabControl>
</Grid>
</Window>
10 changes: 10 additions & 0 deletions waasa/UI/WindowInfo.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Windows;
using waasa.Services;
using waasa.Models;
using YamlDotNet.Serialization;


namespace waasa
Expand All @@ -15,6 +16,7 @@ public class InfoData
public string ExtensionRegInfo { get; set; } = "";
public string ExtensionObjInfo { get; set; } = "";
public string Shlwapi { get; set; } = "";
public string BadfileInfo { get; set; } = "";
}


Expand All @@ -27,6 +29,14 @@ public WindowInfo(_GatheredData gatheredData, _FileExtension fe)
infoData.ExtensionObjInfo = gatheredData.GetObjidInfo(fe.Extension);
infoData.Shlwapi = gatheredData.GetShlwapiInfo(fe.Extension);

if (fe.InfoExtension.Extension != "") {
var serializer = new SerializerBuilder().Build();
string yamlString = serializer.Serialize(fe.InfoExtension);
infoData.BadfileInfo = yamlString;
} else {
infoData.BadfileInfo = "No data";
}

this.DataContext = infoData;
}
}
Expand Down

0 comments on commit fb48eaa

Please sign in to comment.