This commit is contained in:
Alexander 2022-05-22 11:07:48 +03:00
parent 9f1c7de776
commit fd24d61401
No known key found for this signature in database
GPG key ID: F68D8C9B429E6FF6
7 changed files with 78 additions and 6 deletions

View file

@ -199,6 +199,8 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\clock--plus.png" />
<None Include="Resources\clock_add.png" />
<None Include="Resources\clipboard-text.png" />
<None Include="Resources\Updater.exe" />
<None Include="Resources\application.png" />

View file

@ -59,6 +59,7 @@ public void InitializeComponent()
this.clearClipboardMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.wordWrapMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.readOnlyMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.insertDateTimeMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.mainMenuSeparator7 = new System.Windows.Forms.ToolStripSeparator();
this.clearMainMenu = new System.Windows.Forms.ToolStripMenuItem();
this.toolsMainMenu = new System.Windows.Forms.ToolStripMenuItem();
@ -314,6 +315,7 @@ public void InitializeComponent()
this.clearClipboardMainMenu,
this.wordWrapMainMenu,
this.readOnlyMainMenu,
this.insertDateTimeMainMenu,
this.mainMenuSeparator7,
this.clearMainMenu});
this.editMainMenu.ForeColor = System.Drawing.SystemColors.ControlText;
@ -434,6 +436,14 @@ public void InitializeComponent()
this.readOnlyMainMenu.Text = "Readonly";
this.readOnlyMainMenu.Click += new System.EventHandler(this.ReadOnlyMainMenu_Click);
//
// insertDateTimeMainMenu
//
this.insertDateTimeMainMenu.Name = "insertDateTimeMainMenu";
this.insertDateTimeMainMenu.ShortcutKeys = System.Windows.Forms.Keys.F5;
this.insertDateTimeMainMenu.Size = new System.Drawing.Size(198, 22);
this.insertDateTimeMainMenu.Text = "Insert Date Time";
this.insertDateTimeMainMenu.Click += new System.EventHandler(this.InsertDateTimeMainMenu_Click);
//
// mainMenuSeparator7
//
this.mainMenuSeparator7.Name = "mainMenuSeparator7";
@ -1548,5 +1558,6 @@ public void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem pasteBoardMainMenu;
private System.Windows.Forms.Timer pasteBoardTimer;
protected internal System.Windows.Forms.ToolStripStatusLabel statusPanelPasteboardLabel;
private System.Windows.Forms.ToolStripMenuItem insertDateTimeMainMenu;
}
}

View file

@ -681,6 +681,7 @@ public void MenuIcons(bool menuIcons)
clearClipboardMainMenu.Image = Resources.clipboard_minus;
wordWrapMainMenu.Image = Resources.wrap_option;
readOnlyMainMenu.Image = Resources.document_pencil;
insertDateTimeMainMenu.Image = Resources.clock_plus;
clearMainMenu.Image = Resources.document;
changePasswordMainMenu.Image = Resources.key;
lockMainMenu.Image = Resources.lock_warning;
@ -788,6 +789,7 @@ public void ToolbarIcons(bool oldIcons)
pasteToolbarButton.Image = Resources.old_paste_plain;
changePasswordToolbarButton.Image = Resources.old_page_white_key;
lockToolbarButton.Image = Resources.old_lock;
insertDateTimeMainMenu.Image = Resources.old_clock_add;
tryToDecryptToolbarButton.Image = Resources.old_lock_edit;
settingsToolbarButton.Image = Resources.old_setting_tools;
alwaysOnTopToolbarButton.Image = Resources.old_application_double;
@ -804,6 +806,7 @@ public void ToolbarIcons(bool oldIcons)
pasteToolbarButton.Image = Resources.clipboard;
changePasswordToolbarButton.Image = Resources.key;
lockToolbarButton.Image = Resources.lock_warning;
insertDateTimeMainMenu.Image = Resources.clock_plus;
tryToDecryptToolbarButton.Image = Resources.lock_pencil;
settingsToolbarButton.Image = Resources.gear;
alwaysOnTopToolbarButton.Image = Resources.applications_blue;
@ -836,6 +839,18 @@ private void RichTextBox_ModifiedChanged(object sender, EventArgs e)
Text = Text.Replace("*", string.Empty);
}
}
//if (richTextBox.Modified == true)
//{
// if (!Text.Contains("*"))
// {
// Text = Text.Insert(0, "*");
// if (string.IsNullOrEmpty(PublicVar.openFileName) & richTextBox.TextLength > 0)
// {
// Text = "Unnamed.cnp" + " " + PublicVar.appName;
// Text = Text.Insert(0, "*");
// }
// }
//}
}
private void StatusPanel_VisibleChanged(object sender, EventArgs e)
{
@ -1144,7 +1159,7 @@ private void RichTextBox_DragDrop(object sender, DragEventArgs e)
private void RichTextBox_TextChanged(object sender, EventArgs e)
{
statusPanelTimer.Start();
statusPanelTimer.Start();
if (richTextBox.Modified)
{
if (!Text.Contains("*"))
@ -1610,6 +1625,24 @@ private void ReadOnlyMainMenu_Click(object sender, EventArgs e)
statusPanelReadonlyLabel.Text = "Readonly: " + readOnlyMainMenu.Checked.ToString();
}
private void InsertDateTimeMainMenu_Click(object sender, EventArgs e)
{
DateTime now = DateTime.Now;
richTextBox.Text += now.ToString();
richTextBox.SelectionStart = richTextBox.Text.Length;
richTextBox.ScrollToCaret();
richTextBox.Modified = true;
if (!Text.Contains("*"))
{
Text = Text.Insert(0, "*");
if (string.IsNullOrEmpty(PublicVar.openFileName) & richTextBox.TextLength > 0)
{
Text = "Unnamed.cnp" + " " + PublicVar.appName;
Text = Text.Insert(0, "*");
}
}
}
private void WordWrapMainMenu_Click(object sender, EventArgs e)
{
richTextBox.WordWrap = wordWrapMainMenu.Checked;
@ -2292,10 +2325,10 @@ private void VariablesMainMenu_Click(object sender, EventArgs e)
#endregion
}
}

View file

@ -19,7 +19,7 @@ namespace Crypto_Notepad.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@ -160,6 +160,16 @@ internal static System.Drawing.Bitmap clipboard_text {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap clock_plus {
get {
object obj = ResourceManager.GetObject("clock_plus", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
@ -420,6 +430,16 @@ internal static System.Drawing.Bitmap old_application_double {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap old_clock_add {
get {
object obj = ResourceManager.GetObject("old_clock_add", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View file

@ -827,7 +827,7 @@
XTesb3QPLh88M+QwdP6m681Lt7xuXbu94vbgcOjwnZHokdE77DtTd1PuvriXeW/h/sYH6AdFD6UeVjxS
fNTws+7PbaOWo6fHXMf6Hwc/vj/OGn/2S8Yv7ycKnpCfVEyqTDZPmU2dmnafvvF05dOJZ+nPFmYKf5X+
tfa5zvMffnP8rX82YnbiBf/Fp99LXsq/PPRq2aueuYC5R69TXy/MF72Rf3P4LeNt37vwd5MLWe+x7ys/
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEwAACxMBAJqcGAAALoFJREFUeF7t3X3o7Vd1
6H7o/ujz8cGn1E+f/gUDmPP8usTo0wAAAAlwSFlzAAALEgAACxIB0t1+/AAALoFJREFUeF7t3X3o7Vd1
53FBEAIFoSAUAoLgXwUf8nSdTOzMoNQRUiyVDmFSBgYEO/EpNU18aDSJSWgkbaY6qTJ2Ok2JWELFpo5W
+zBRR8fU0IzWmNZMklGTjq0mmsbEufGa3/l9Z6277k3vPfdz9v2e81tnf8/e3/eCF5XV3LPO75y9v9/P
73E/axgGAAAwM7IJAAD6JpsAAKBvsgkAAPommwAAoG+yCQAA+iabAACgb7IJAAD6JpsAAKBvsgkAAPom
@ -1126,4 +1126,10 @@
<data name="clipboard_text" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clipboard-text.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="clock_plus" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clock--plus.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="old_clock_add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\clock_add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B