show commands with text editor

This commit is contained in:
stax76
2022-03-12 14:26:00 +01:00
parent a0f2e8bd92
commit d60bf050cf
2 changed files with 12 additions and 2 deletions

View File

@@ -2,6 +2,8 @@
- Fix showing incorrect timestamps in About dialog of Store version.
- Fix Store page showing non existant ARM and x86 support.
- Fix opening zip files.
- The list of available input commands is like before shown
by the text editor, so it's like everything else searchable.
5.7.0.0 Stable (2022-03-09)

View File

@@ -67,6 +67,14 @@ namespace mpvnet
}
}
public static void ShowTextWithEditor(string name, string text)
{
string file = Path.Combine(Path.GetTempPath(), name + ".txt");
App.TempFiles.Add(file);
File.WriteAllText(file, BR + text.Trim() + BR);
ProcessHelp.ShellExecute(file);
}
public static void ShowDialog(Type winType)
{
App.InvokeOnMainThread(new Action(() => {
@@ -356,7 +364,7 @@ namespace mpvnet
}
}
Msg.ShowInfo(sb.ToString());
ShowTextWithEditor("command-list", sb.ToString());
}
public static void ScaleWindow(float factor) => Core.RaiseScaleWindow(factor);
@@ -538,7 +546,7 @@ namespace mpvnet
if (propValue.ContainsEx("${"))
propValue += BR2 + Core.Expand(propValue);
App.ShowInfo(prop + ": " + propValue);
App.ShowInfo(prop + "\n\n" + propValue);
}
};