mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
24 lines
552 B
C#
24 lines
552 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Crypto_Notepad
|
|
{
|
|
public static class WinFormsExtensions
|
|
{
|
|
public static void AppendLine(this TextBox source, string value)
|
|
{
|
|
if (source.Text.Length == 0)
|
|
source.Text = value;
|
|
else
|
|
source.AppendText("\r\n" + value);
|
|
}
|
|
|
|
public static void Times(this int count, Action action)
|
|
{
|
|
for (int i = 0; i < count; i++)
|
|
{
|
|
action();
|
|
}
|
|
}
|
|
}
|
|
}
|