Skip to content

Commit

Permalink
feat: option for no syntaxhighlighting now on top
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenAssassine committed Sep 9, 2023
1 parent 7f86568 commit a1cb07c
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions Fastedit/Views/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ private void CreateMenubarFromLanguage()
if (CodeLanguageSelector.Items.Count > 1)
return;

var noneItem = new MenuFlyoutItem
{
Text = "None",
Tag = "",
};
noneItem.Click += CodeLanguage_Click;
CodeLanguageSelector.Items.Add(noneItem);

var noneCmdWindowItem = new QuickAccessWindowItem
{
Command = "None",
Tag = "",
};
noneCmdWindowItem.RunCommandWindowItemClicked += CodeLanguage_Click;
RunCommandWindowItem_CodeLanguages.Items.Add(noneCmdWindowItem);

try
{
foreach (var item in TextControlBox.TextControlBox.CodeLanguages)
Expand All @@ -128,26 +144,7 @@ private void CreateMenubarFromLanguage()
RunCommandWindowItem_CodeLanguages.Items.Add(runCommandWindowItem);
}
}
catch
{

}

var noneItem = new MenuFlyoutItem
{
Text = "None",
Tag = "",
};
noneItem.Click += CodeLanguage_Click;
CodeLanguageSelector.Items.Add(noneItem);

var noneCmdWindowItem = new QuickAccessWindowItem
{
Command = "None",
Tag = "",
};
noneCmdWindowItem.RunCommandWindowItemClicked += CodeLanguage_Click;
RunCommandWindowItem_CodeLanguages.Items.Add(noneCmdWindowItem);
catch { }
}
public void UpdateStatubar()
{
Expand Down

0 comments on commit a1cb07c

Please sign in to comment.