[preview pane] Move shared keys into central props file (#17212)

* [preview pane] Move shared keys into central props file

* left overs
This commit is contained in:
CleanCodeDeveloper
2022-03-23 17:31:51 +01:00
committed by GitHub
parent d7617a47d3
commit 53a92215fc
20 changed files with 45 additions and 189 deletions

View File

@@ -3,15 +3,7 @@
<Platforms>x64</Platforms>
<AssemblyTitle>PowerToys.MonacoPreviewHandler</AssemblyTitle>
<AssemblyDescription>PowerToys MonacoPreviewHandler</AssemblyDescription>
<AssemblyCompany>Microsoft Corp.</AssemblyCompany>
<AssemblyCopyright>Copyright (C) 2022 Microsoft Corporation</AssemblyCopyright>
<AssemblyProduct>PowerToys</AssemblyProduct>
<Company>Microsoft Corp.</Company>
<Product>PowerToys</Product>
<NeutralLanguage>en-US</NeutralLanguage>
<Description>PowerToys MonacoPreviewHandler</Description>
<Copyright>Copyright (C) 2022 Microsoft Corporation</Copyright>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\modules\FileExplorerPreview\</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>

View File

@@ -98,12 +98,13 @@ namespace Microsoft.PowerToys.PreviewHandler.Monaco
fileContent = fileReader.ReadToEnd();
fileReader.Close();
}
var base64FileCode = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(fileContent));
string html;
// prepping index html to load in
using(StreamReader htmlFileReader = new StreamReader(new FileStream(Settings.AssemblyDirectory + "\\index.html", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)))
using (StreamReader htmlFileReader = new StreamReader(new FileStream(Settings.AssemblyDirectory + "\\index.html", FileMode.Open, FileAccess.Read, FileShare.ReadWrite)))
{
html = htmlFileReader.ReadToEnd();
htmlFileReader.Close();