mirror of
https://github.com/Stone-Red-Code/ClipCMD.git
synced 2026-09-04 08:56:11 +02:00
Add list command
This commit is contained in:
@@ -21,7 +21,7 @@ public partial class MainWindow : Window
|
|||||||
{
|
{
|
||||||
{ "time", (_) => DateTime.Now.ToShortTimeString() },
|
{ "time", (_) => DateTime.Now.ToShortTimeString() },
|
||||||
{ "date", (_) => DateTime.Now.ToShortDateString() },
|
{ "date", (_) => DateTime.Now.ToShortDateString() },
|
||||||
{ "calc", (math) => new DataTable().Compute(math.Trim()[4..], null)?.ToString() ?? string.Empty }
|
{ "calc", (math) => new DataTable().Compute(math.Trim()[4..], null)?.ToString() ?? string.Empty },
|
||||||
};
|
};
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
@@ -150,6 +150,7 @@ public partial class MainWindow : Window
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
staticCommandsTextBox.Foreground = Brushes.Black;
|
staticCommandsTextBox.Foreground = Brushes.Black;
|
||||||
|
stuffToReplace["list"] = (_) => string.Join(", ", staticCommandsTextBox.Text.Split('\n').Where(x => !string.IsNullOrWhiteSpace(x)).Select(x => x.Split('>').FirstOrDefault()?.Trim()));
|
||||||
File.WriteAllText("cmd.txt", staticCommandsTextBox.Text);
|
File.WriteAllText("cmd.txt", staticCommandsTextBox.Text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user