Skip to content

Commit

Permalink
Add auto generated readme.html
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Rogier committed Apr 5, 2023
1 parent a2786f9 commit 687dc75
Show file tree
Hide file tree
Showing 3 changed files with 1,482 additions and 5 deletions.
8 changes: 7 additions & 1 deletion Project/Source/Common/Core/Globals/Globals.Files.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/// You may add additional accurate notices of copyright ownership.
/// </license>
/// <created> 2016-04 </created>
/// <edited> 2022-03 </edited>
/// <edited> 2023-04 </edited>
namespace Ordisoftware.Core;

/// <summary>
Expand Down Expand Up @@ -149,6 +149,12 @@ static public string ApplicationIconFilePath
static public string ApplicationReadmeMDPath
=> Path.Combine(RootFolderPath, "README.md");

/// <summary>
/// Indicates the file path of the application's readme html file.
/// </summary>
static public string ApplicationReadmeHtmlPath
=> Path.Combine(RootFolderPath, "README.html");

/// <summary>
/// Indicates the file path of the help.
/// </summary>
Expand Down
8 changes: 4 additions & 4 deletions Project/Source/Common/Core/WinControls/CommonMenusControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@
/// You may add additional accurate notices of copyright ownership.
/// </license>
/// <created> 2016-04 </created>
/// <edited> 2022-09 </edited>
/// <edited> 2023-04 </edited>
namespace Ordisoftware.Core;

using Markdig;

using TranslationPair = KeyValuePair<string, TranslationsDictionary>;

public sealed partial class CommonMenusControl : UserControl
Expand Down Expand Up @@ -241,6 +239,8 @@ private void ActionOpenWebsiteURL_Click(object sender, EventArgs e)

private void ActionReadme_Click(object sender, EventArgs e)
{
SystemManager.RunShell(Globals.ApplicationReadmeHtmlPath);
/* TODO remove that and markdig
var fileLines = Markdown.ToHtml(File.ReadAllText(Globals.ApplicationReadmeMDPath),
new MarkdownPipelineBuilder().UseAdvancedExtensions().Build());
string filePath = Path.Combine(Path.GetTempPath(), $"{Globals.ApplicationCode}-README.html");
Expand All @@ -253,7 +253,7 @@ private void ActionReadme_Click(object sender, EventArgs e)
SystemManager.TryCatch(() => File.Delete(filePath));
timer.Dispose();
};
timer.Start();
timer.Start();*/
}

private void ActionAbout_Click(object sender, EventArgs e)
Expand Down
Loading

0 comments on commit 687dc75

Please sign in to comment.