This commit is contained in:
Alexander 2019-09-28 22:27:05 +03:00
parent 5f433088ff
commit e43b503b69
5 changed files with 1755 additions and 1167 deletions

View file

@ -26,39 +26,26 @@ public static Settings Default {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Consolas")]
public string RichTextFont {
[global::System.Configuration.DefaultSettingValueAttribute("Black")]
public global::System.Drawing.Color editroFontColor {
get {
return ((string)(this["RichTextFont"]));
return ((global::System.Drawing.Color)(this["editroFontColor"]));
}
set {
this["RichTextFont"] = value;
this["editroFontColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("228, 228, 228")]
public global::System.Drawing.Color RichForeColor {
[global::System.Configuration.DefaultSettingValueAttribute("White")]
public global::System.Drawing.Color editorBackColor {
get {
return ((global::System.Drawing.Color)(this["RichForeColor"]));
return ((global::System.Drawing.Color)(this["editorBackColor"]));
}
set {
this["RichForeColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("56, 56, 56")]
public global::System.Drawing.Color RichBackColor {
get {
return ((global::System.Drawing.Color)(this["RichBackColor"]));
}
set {
this["RichBackColor"] = value;
this["editorBackColor"] = value;
}
}
@ -66,12 +53,12 @@ public string RichTextFont {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool MenuWrap {
public bool menuWrap {
get {
return ((bool)(this["MenuWrap"]));
return ((bool)(this["menuWrap"]));
}
set {
this["MenuWrap"] = value;
this["menuWrap"] = value;
}
}
@ -79,25 +66,12 @@ public bool MenuWrap {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool RichWrap {
public bool editorWrap {
get {
return ((bool)(this["RichWrap"]));
return ((bool)(this["editorWrap"]));
}
set {
this["RichWrap"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("11")]
public int RichTextSize {
get {
return ((int)(this["RichTextSize"]));
}
set {
this["RichTextSize"] = value;
this["editorWrap"] = value;
}
}
@ -105,12 +79,12 @@ public int RichTextSize {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool AssociateCheck {
public bool explorerAssociate {
get {
return ((bool)(this["AssociateCheck"]));
return ((bool)(this["explorerAssociate"]));
}
set {
this["AssociateCheck"] = value;
this["explorerAssociate"] = value;
}
}
@ -131,35 +105,22 @@ public string HashAlgorithm {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("256")]
public int KeySize {
public string KeySize {
get {
return ((int)(this["KeySize"]));
return ((string)(this["KeySize"]));
}
set {
this["KeySize"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string TheSalt {
get {
return ((string)(this["TheSalt"]));
}
set {
this["TheSalt"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("1000")]
public int PasswordIterations {
public string PasswordIterations {
get {
return ((int)(this["PasswordIterations"]));
return ((string)(this["PasswordIterations"]));
}
set {
this["PasswordIterations"] = value;
@ -169,13 +130,13 @@ public int PasswordIterations {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool FirstLaunch {
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool showToolbar {
get {
return ((bool)(this["FirstLaunch"]));
return ((bool)(this["showToolbar"]));
}
set {
this["FirstLaunch"] = value;
this["showToolbar"] = value;
}
}
@ -183,38 +144,12 @@ public bool FirstLaunch {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool WarningMsg {
public bool autoCheckUpdate {
get {
return ((bool)(this["WarningMsg"]));
return ((bool)(this["autoCheckUpdate"]));
}
set {
this["WarningMsg"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool ShowToolbar {
get {
return ((bool)(this["ShowToolbar"]));
}
set {
this["ShowToolbar"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool AutoCheckUpdate {
get {
return ((bool)(this["AutoCheckUpdate"]));
}
set {
this["AutoCheckUpdate"] = value;
this["autoCheckUpdate"] = value;
}
}
@ -222,24 +157,25 @@ public bool AutoCheckUpdate {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool AutoLock {
public bool autoLock {
get {
return ((bool)(this["AutoLock"]));
return ((bool)(this["autoLock"]));
}
set {
this["AutoLock"] = value;
this["autoLock"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public global::System.Drawing.Point WindowLocation {
[global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
public global::System.Drawing.Point windowLocation {
get {
return ((global::System.Drawing.Point)(this["WindowLocation"]));
return ((global::System.Drawing.Point)(this["windowLocation"]));
}
set {
this["WindowLocation"] = value;
this["windowLocation"] = value;
}
}
@ -247,12 +183,12 @@ public bool AutoLock {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("645, 460")]
public global::System.Drawing.Size WindowSize {
public global::System.Drawing.Size windowSize {
get {
return ((global::System.Drawing.Size)(this["WindowSize"]));
return ((global::System.Drawing.Size)(this["windowSize"]));
}
set {
this["WindowSize"] = value;
this["windowSize"] = value;
}
}
@ -260,25 +196,12 @@ public bool AutoLock {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Normal")]
public global::System.Windows.Forms.FormWindowState WindowState {
public global::System.Windows.Forms.FormWindowState windowState {
get {
return ((global::System.Windows.Forms.FormWindowState)(this["WindowState"]));
return ((global::System.Windows.Forms.FormWindowState)(this["windowState"]));
}
set {
this["WindowState"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool AutoSave {
get {
return ((bool)(this["AutoSave"]));
}
set {
this["AutoSave"] = value;
this["windowState"] = value;
}
}
@ -286,12 +209,12 @@ public bool AutoSave {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool SendTo {
public bool sendTo {
get {
return ((bool)(this["SendTo"]));
return ((bool)(this["sendTo"]));
}
set {
this["SendTo"] = value;
this["sendTo"] = value;
}
}
@ -299,12 +222,12 @@ public bool SendTo {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool MenuIntegrate {
public bool explorerIntegrate {
get {
return ((bool)(this["MenuIntegrate"]));
return ((bool)(this["explorerIntegrate"]));
}
set {
this["MenuIntegrate"] = value;
this["explorerIntegrate"] = value;
}
}
@ -312,12 +235,12 @@ public bool MenuIntegrate {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool MenuIcons {
public bool menuIcons {
get {
return ((bool)(this["MenuIcons"]));
return ((bool)(this["menuIcons"]));
}
set {
this["MenuIcons"] = value;
this["menuIcons"] = value;
}
}
@ -325,38 +248,25 @@ public bool MenuIcons {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool ColoredToolbar {
public string lnVisible {
get {
return ((bool)(this["ColoredToolbar"]));
return ((string)(this["lnVisible"]));
}
set {
this["ColoredToolbar"] = value;
this["lnVisible"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public string LNVisible {
[global::System.Configuration.DefaultSettingValueAttribute("240, 240, 240")]
public global::System.Drawing.Color lnBackColor {
get {
return ((string)(this["LNVisible"]));
return ((global::System.Drawing.Color)(this["lnBackColor"]));
}
set {
this["LNVisible"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("53, 53, 53")]
public global::System.Drawing.Color LNBackgroundColor {
get {
return ((global::System.Drawing.Color)(this["LNBackgroundColor"]));
}
set {
this["LNBackgroundColor"] = value;
this["lnBackColor"] = value;
}
}
@ -364,12 +274,12 @@ public string LNVisible {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("164, 164, 164")]
public global::System.Drawing.Color LNFontColorPanel {
public global::System.Drawing.Color lnFontColor {
get {
return ((global::System.Drawing.Color)(this["LNFontColorPanel"]));
return ((global::System.Drawing.Color)(this["lnFontColor"]));
}
set {
this["LNFontColorPanel"] = value;
this["lnFontColor"] = value;
}
}
@ -377,12 +287,12 @@ public string LNVisible {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public string BLShow {
public string blShow {
get {
return ((string)(this["BLShow"]));
return ((string)(this["blShow"]));
}
set {
this["BLShow"] = value;
this["blShow"] = value;
}
}
@ -390,12 +300,12 @@ public string BLShow {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("164, 164, 164")]
public global::System.Drawing.Color BLColor {
public global::System.Drawing.Color blColor {
get {
return ((global::System.Drawing.Color)(this["BLColor"]));
return ((global::System.Drawing.Color)(this["blColor"]));
}
set {
this["BLColor"] = value;
this["blColor"] = value;
}
}
@ -403,12 +313,12 @@ public string BLShow {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Solid")]
public global::System.Drawing.Drawing2D.DashStyle BLStyle {
public string blStyle {
get {
return ((global::System.Drawing.Drawing2D.DashStyle)(this["BLStyle"]));
return ((string)(this["blStyle"]));
}
set {
this["BLStyle"] = value;
this["blStyle"] = value;
}
}
@ -416,12 +326,12 @@ public string BLShow {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public string GLShow {
public string glShow {
get {
return ((string)(this["GLShow"]));
return ((string)(this["glShow"]));
}
set {
this["GLShow"] = value;
this["glShow"] = value;
}
}
@ -429,12 +339,12 @@ public string GLShow {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("164, 164, 164")]
public global::System.Drawing.Color GLColor {
public global::System.Drawing.Color glColor {
get {
return ((global::System.Drawing.Color)(this["GLColor"]));
return ((global::System.Drawing.Color)(this["glColor"]));
}
set {
this["GLColor"] = value;
this["glColor"] = value;
}
}
@ -442,12 +352,12 @@ public string GLShow {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Solid")]
public global::System.Drawing.Drawing2D.DashStyle GLStyle {
public string glStyle {
get {
return ((global::System.Drawing.Drawing2D.DashStyle)(this["GLStyle"]));
return ((string)(this["glStyle"]));
}
set {
this["GLStyle"] = value;
this["glStyle"] = value;
}
}
@ -455,25 +365,182 @@ public string GLShow {
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Enable")]
public string InserKey {
public string insKey {
get {
return ((string)(this["InserKey"]));
return ((string)(this["insKey"]));
}
set {
this["InserKey"] = value;
this["insKey"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("0")]
public string CustomColor {
[global::System.Configuration.DefaultSettingValueAttribute("16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;" +
"16777215;16777215;16777215;16777215;16777215;16777215;16777215")]
public string customColor {
get {
return ((string)(this["CustomColor"]));
return ((string)(this["customColor"]));
}
set {
this["CustomColor"] = value;
this["customColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("5")]
public string editorPaddingLeft {
get {
return ((string)(this["editorPaddingLeft"]));
}
set {
this["editorPaddingLeft"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool editorRightToLeft {
get {
return ((bool)(this["editorRightToLeft"]));
}
set {
this["editorRightToLeft"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Microsoft Sans Serif, 10pt")]
public global::System.Drawing.Font editorFont {
get {
return ((global::System.Drawing.Font)(this["editorFont"]));
}
set {
this["editorFont"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool statusPanel {
get {
return ((bool)(this["statusPanel"]));
}
set {
this["statusPanel"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("240, 240, 240")]
public global::System.Drawing.Color statusPanelBackColor {
get {
return ((global::System.Drawing.Color)(this["statusPanelBackColor"]));
}
set {
this["statusPanelBackColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Black")]
public global::System.Drawing.Color statusPanelFontColor {
get {
return ((global::System.Drawing.Color)(this["statusPanelFontColor"]));
}
set {
this["statusPanelFontColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("240, 240, 240")]
public global::System.Drawing.Color toolbarBackColor {
get {
return ((global::System.Drawing.Color)(this["toolbarBackColor"]));
}
set {
this["toolbarBackColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool toolbarBorder {
get {
return ((bool)(this["toolbarBorder"]));
}
set {
this["toolbarBorder"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("Black")]
public global::System.Drawing.Color searchPanelFontColor {
get {
return ((global::System.Drawing.Color)(this["searchPanelFontColor"]));
}
set {
this["searchPanelFontColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("240, 240, 240")]
public global::System.Drawing.Color searchPanelBackColor {
get {
return ((global::System.Drawing.Color)(this["searchPanelBackColor"]));
}
set {
this["searchPanelBackColor"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("LMB Click")]
public string openLinks {
get {
return ((string)(this["openLinks"]));
}
set {
this["openLinks"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool mainMenu {
get {
return ((bool)(this["mainMenu"]));
}
set {
this["mainMenu"] = value;
}
}
}

View file

@ -2,110 +2,125 @@
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Crypto_Notepad.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="RichTextFont" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">Consolas</Value>
<Setting Name="editroFontColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Black</Value>
</Setting>
<Setting Name="RichForeColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">228, 228, 228</Value>
<Setting Name="editorBackColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">White</Value>
</Setting>
<Setting Name="RichBackColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">56, 56, 56</Value>
</Setting>
<Setting Name="MenuWrap" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Setting Name="menuWrap" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="RichWrap" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Setting Name="editorWrap" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="RichTextSize" Provider="PortableSettingsProvider" Type="System.Int32" Scope="User">
<Value Profile="(Default)">11</Value>
</Setting>
<Setting Name="AssociateCheck" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Setting Name="explorerAssociate" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="HashAlgorithm" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">SHA1</Value>
</Setting>
<Setting Name="KeySize" Provider="PortableSettingsProvider" Type="System.Int32" Scope="User">
<Setting Name="KeySize" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">256</Value>
</Setting>
<Setting Name="TheSalt" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="PasswordIterations" Provider="PortableSettingsProvider" Type="System.Int32" Scope="User">
<Setting Name="PasswordIterations" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">1000</Value>
</Setting>
<Setting Name="FirstLaunch" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Setting Name="showToolbar" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="autoCheckUpdate" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="autoLock" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="WarningMsg" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
<Setting Name="windowLocation" Provider="PortableSettingsProvider" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)">0, 0</Value>
</Setting>
<Setting Name="ShowToolbar" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AutoCheckUpdate" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="AutoLock" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="WindowLocation" Provider="PortableSettingsProvider" Type="System.Drawing.Point" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="WindowSize" Provider="PortableSettingsProvider" Type="System.Drawing.Size" Scope="User">
<Setting Name="windowSize" Provider="PortableSettingsProvider" Type="System.Drawing.Size" Scope="User">
<Value Profile="(Default)">645, 460</Value>
</Setting>
<Setting Name="WindowState" Provider="PortableSettingsProvider" Type="System.Windows.Forms.FormWindowState" Scope="User">
<Setting Name="windowState" Provider="PortableSettingsProvider" Type="System.Windows.Forms.FormWindowState" Scope="User">
<Value Profile="(Default)">Normal</Value>
</Setting>
<Setting Name="AutoSave" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="SendTo" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Setting Name="sendTo" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="MenuIntegrate" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Setting Name="explorerIntegrate" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="MenuIcons" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Setting Name="menuIcons" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="ColoredToolbar" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Setting Name="lnVisible" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="LNVisible" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">True</Value>
<Setting Name="lnBackColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">240, 240, 240</Value>
</Setting>
<Setting Name="LNBackgroundColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">53, 53, 53</Value>
</Setting>
<Setting Name="LNFontColorPanel" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Setting Name="lnFontColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">164, 164, 164</Value>
</Setting>
<Setting Name="BLShow" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Setting Name="blShow" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="BLColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Setting Name="blColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">164, 164, 164</Value>
</Setting>
<Setting Name="BLStyle" Provider="PortableSettingsProvider" Type="System.Drawing.Drawing2D.DashStyle" Scope="User">
<Setting Name="blStyle" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">Solid</Value>
</Setting>
<Setting Name="GLShow" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Setting Name="glShow" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="GLColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Setting Name="glColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">164, 164, 164</Value>
</Setting>
<Setting Name="GLStyle" Provider="PortableSettingsProvider" Type="System.Drawing.Drawing2D.DashStyle" Scope="User">
<Setting Name="glStyle" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">Solid</Value>
</Setting>
<Setting Name="InserKey" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Setting Name="insKey" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">Enable</Value>
</Setting>
<Setting Name="CustomColor" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">0</Value>
<Setting Name="customColor" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215;16777215</Value>
</Setting>
<Setting Name="editorPaddingLeft" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">5</Value>
</Setting>
<Setting Name="editorRightToLeft" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="editorFont" Provider="PortableSettingsProvider" Type="System.Drawing.Font" Scope="User">
<Value Profile="(Default)">Microsoft Sans Serif, 10pt</Value>
</Setting>
<Setting Name="statusPanel" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="statusPanelBackColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">240, 240, 240</Value>
</Setting>
<Setting Name="statusPanelFontColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Black</Value>
</Setting>
<Setting Name="toolbarBackColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">240, 240, 240</Value>
</Setting>
<Setting Name="toolbarBorder" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="searchPanelFontColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Black</Value>
</Setting>
<Setting Name="searchPanelBackColor" Provider="PortableSettingsProvider" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">240, 240, 240</Value>
</Setting>
<Setting Name="openLinks" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">LMB Click</Value>
</Setting>
<Setting Name="mainMenu" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,9 @@
using Microsoft.Win32;
using IWshRuntimeLibrary;
using Microsoft.Win32;
using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Windows.Forms;
@ -10,130 +12,14 @@ namespace Crypto_Notepad
{
public partial class SettingsForm : Form
{
Properties.Settings ps = Properties.Settings.Default;
Properties.Settings settings = Properties.Settings.Default;
public SettingsForm()
{
InitializeComponent();
}
/*Functions*/
private void SetSettings(string value)
{
if (value == "save")
{
if (AssociateCheckBox.Checked)
{
AssociateExtension(Assembly.GetEntryAssembly().Location, "cnp");
}
else
{
DissociateExtension(Assembly.GetEntryAssembly().Location, "cnp");
}
if (IntegrateCheckBox.Checked)
{
MenuIntegrate("enable");
}
else
{
MenuIntegrate("disable");
}
ps.RichForeColor = FontColorPanel.BackColor;
ps.RichBackColor = BackgroundColorPanel.BackColor;
ps.RichTextFont = FontNameComboBox.Text;
ps.RichTextSize = Convert.ToInt32(FontSizeComboBox.Text.ToString());
ps.AssociateCheck = AssociateCheckBox.Checked;
ps.HashAlgorithm = HashComboBox.Text;
ps.KeySize = Convert.ToInt32(KeySizeComboBox.Text.ToString());
ps.TheSalt = SaltTextBox.Text;
ps.PasswordIterations = Convert.ToInt32(PwdIterationsTextBox.Text.ToString());
ps.ShowToolbar = ToolbarCheckBox.Checked;
ps.AutoCheckUpdate = UpdatesCheckBox.Checked;
ps.AutoLock = AutoLockCheckBox.Checked;
ps.AutoSave = AutoSaveCheckBox.Checked;
ps.SendTo = SendToCheckBox.Checked;
ps.MenuIntegrate = IntegrateCheckBox.Checked;
ps.MenuIcons = MenuIconsCheckBox.Checked;
ps.ColoredToolbar = ToolbarColorCheckBox.Checked;
ps.LNVisible = LNVisibleComboBox.Text;
ps.LNBackgroundColor = LNBackgroundColorPanel.BackColor;
ps.LNFontColorPanel = LNFontColorPanel.BackColor;
ps.BLColor = BLColorPanel.BackColor;
ps.BLShow = BLShowСomboBox.Text;
ps.GLColor = GLColorPanel.BackColor;
ps.GLShow = GLShowComboBox.Text;
ps.InserKey = InserKeyComboBox.Text;
switch (BLStyleComboBox.Text)
{
case "Solid":
ps.BLStyle = DashStyle.Solid;
break;
case "Dash":
ps.BLStyle = DashStyle.Dash;
break;
case "Dot":
ps.BLStyle = DashStyle.Dot;
break;
case "DashDot":
ps.BLStyle = DashStyle.DashDot;
break;
case "DashDotDot":
ps.BLStyle = DashStyle.DashDotDot;
break;
}
switch (GLStyleComboBox.Text)
{
case "Solid":
ps.GLStyle = DashStyle.Solid;
break;
case "Dash":
ps.GLStyle = DashStyle.Dash;
break;
case "Dot":
ps.GLStyle = DashStyle.Dot;
break;
case "DashDot":
ps.GLStyle = DashStyle.DashDot;
break;
case "DashDotDot":
ps.GLStyle = DashStyle.DashDotDot;
break;
}
ps.Save();
PublicVar.settingsChanged = true;
Close();
}
if (value == "default")
{
FontColorPanel.BackColor = Color.FromArgb(228, 228, 228);
BackgroundColorPanel.BackColor = Color.FromArgb(56, 56, 56);
FontNameComboBox.Text = "Consolas";
FontSizeComboBox.Text = 11.ToString();
AssociateCheckBox.Checked = false;
UpdatesCheckBox.Checked = true;
ToolbarCheckBox.Checked = true;
AutoLockCheckBox.Checked = false;
AutoSaveCheckBox.Checked = true;
SendToCheckBox.Checked = false;
IntegrateCheckBox.Checked = false;
MenuIconsCheckBox.Checked = false;
ToolbarColorCheckBox.Checked = false;
LNVisibleComboBox.Text = "True";
LNBackgroundColorPanel.BackColor = Color.FromArgb(53, 53, 53);
LNFontColorPanel.BackColor = Color.FromArgb(164, 164, 164);
BLShowСomboBox.Text = "False";
BLColorPanel.BackColor = Color.FromArgb(164, 164, 164);
BLStyleComboBox.Text = "Solid";
InserKeyComboBox.Text = "Enable";
}
}
/*Functions*/
private static void AssociateExtension(string applicationExecutablePath, string extension)
{
try
@ -200,164 +86,531 @@ private static void MenuIntegrate(string action)
}
catch { }
}
private void SendToShortcut()
{
string shortcutPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\SendTo";
string shortcutName = PublicVar.appName + ".lnk";
string shortcutLocation = Path.Combine(shortcutPath, shortcutName);
string targetFileLocation = Assembly.GetEntryAssembly().Location;
WshShell shell = new WshShell();
IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutLocation);
shortcut.Description = PublicVar.appName;
shortcut.IconLocation = targetFileLocation;
shortcut.TargetPath = targetFileLocation;
shortcut.Arguments = "/s";
shortcut.Save();
}
/*Functions*/
/*Form Events*/
private void SettingsForm_Load(object sender, EventArgs e)
{
foreach (FontFamily fonts in FontFamily.Families)
{
FontNameComboBox.Items.Add(fonts.Name);
}
FontNameComboBox.Text = ps.RichTextFont;
FontSizeComboBox.Text = ps.RichTextSize.ToString();
HashComboBox.Text = ps.HashAlgorithm;
KeySizeComboBox.Text = ps.KeySize.ToString();
SaltTextBox.Text = ps.TheSalt;
PwdIterationsTextBox.Text = ps.PasswordIterations.ToString();
FontColorPanel.BackColor = ps.RichForeColor;
BackgroundColorPanel.BackColor = ps.RichBackColor;
AssociateCheckBox.Checked = ps.AssociateCheck;
UpdatesCheckBox.Checked = ps.AutoCheckUpdate;
ToolbarCheckBox.Checked = ps.ShowToolbar;
AutoLockCheckBox.Checked = ps.AutoLock;
AutoSaveCheckBox.Checked = ps.AutoSave;
SendToCheckBox.Checked = ps.SendTo;
IntegrateCheckBox.Checked = ps.MenuIntegrate;
MenuIconsCheckBox.Checked = ps.MenuIcons;
ToolbarColorCheckBox.Checked = ps.ColoredToolbar;
LNVisibleComboBox.Text = ps.LNVisible;
LNBackgroundColorPanel.BackColor = ps.LNBackgroundColor;
LNFontColorPanel.BackColor = ps.LNFontColorPanel;
BLShowСomboBox.Text = ps.BLShow;
BLColorPanel.BackColor = ps.BLColor;
BLStyleComboBox.Text = ps.BLStyle.ToString();
GLShowComboBox.Text = ps.GLShow;
GLColorPanel.BackColor = ps.GLColor;
GLStyleComboBox.Text = ps.GLStyle.ToString();
InserKeyComboBox.Text = ps.InserKey;
if (!ps.ShowToolbar)
{
ToolbarColorCheckBox.Enabled = false;
}
if (ps.TheSalt != "")
{
SaltTextBox.Visible = true;
SaltLabel.Visible = true;
}
string custom_colors = ps.CustomColor;
string custom_colors = settings.customColor;
int[] array_of_colors = custom_colors.Split(';').Select(n => Convert.ToInt32(n)).ToArray();
colorDialog.CustomColors = array_of_colors;
}
/*Form Events*/
/*Buttons*/
private void ResetSettingsButton_Click(object sender, EventArgs e)
{
using (new CenterWinDialog(this))
{
DialogResult result = MessageBox.Show("Reset app settings to default?", "Settings", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
SetSettings("default");
}
}
settingsTabControl.Appearance = TabAppearance.FlatButtons;
settingsTabControl.ItemSize = new Size(0, 1);
settingsTabControl.SizeMode = TabSizeMode.Fixed;
settingsNav.SelectedIndex = 0;
}
private void SaveSettingsButton_Click(object sender, EventArgs e)
private void PaddingLeftTextBox_Click(object sender, EventArgs e)
{
SetSettings("save");
}
/*Buttons*/
/*Settings Section*/
private void FontColorPanel_Click_1(object sender, EventArgs e)
{
colorDialog.Color = FontColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog.ShowDialog();
}
FontColorPanel.BackColor = colorDialog.Color;
}
private void BackgroundColorPanel_Click(object sender, EventArgs e)
{
colorDialog.Color = BackgroundColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog.ShowDialog();
}
BackgroundColorPanel.BackColor = colorDialog.Color;
}
private void ToolbarCheckBox_CheckedChanged(object sender, EventArgs e)
{
if (!ToolbarCheckBox.Checked)
{
ToolbarColorCheckBox.Enabled = false;
}
else
{
ToolbarColorCheckBox.Enabled = true;
}
}
private void LNBackgroundColorPanel_Click(object sender, EventArgs e)
{
colorDialog.Color = LNBackgroundColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog.ShowDialog();
}
LNBackgroundColorPanel.BackColor = colorDialog.Color;
}
private void LNFontColorPanel_Click(object sender, EventArgs e)
{
colorDialog.Color = LNFontColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog.ShowDialog();
}
LNFontColorPanel.BackColor = colorDialog.Color;
}
private void BLColorPanel_Click(object sender, EventArgs e)
{
colorDialog.Color = BLColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog.ShowDialog();
}
BLColorPanel.BackColor = colorDialog.Color;
}
private void GLColorPanel_Click(object sender, EventArgs e)
{
colorDialog.Color = GLColorPanel.BackColor;
using (new CenterWinDialog(this))
{
colorDialog.ShowDialog();
}
GLColorPanel.BackColor = colorDialog.Color;
paddingLeftTextBox.SelectAll();
}
private void SettingsForm_FormClosed(object sender, FormClosedEventArgs e)
{
string result = string.Join(";", colorDialog.CustomColors);
ps.CustomColor = result;
ps.Save();
MainForm main = Owner as MainForm;
string customColor = string.Join(";", colorDialog.CustomColors);
settings.customColor = customColor;
if (string.IsNullOrWhiteSpace(settings.PasswordIterations))
{
settings.PasswordIterations = "1";
}
if (string.IsNullOrWhiteSpace(paddingLeftTextBox.Text))
{
settings.editorPaddingLeft = "0";
main.richTextBox.SetInnerMargins(Convert.ToInt32(settings.editorPaddingLeft), 0, 0, 0);
}
settings.Save();
}
/*Form Events*/
/*Settings Section*/
private void EditorFontColor_Click(object sender, EventArgs e)
{
colorDialog.Color = editorFontColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.richTextBox.ForeColor = colorDialog.Color;
main.richTextBox.SetInnerMargins(Convert.ToInt32(settings.editorPaddingLeft), 0, 0, 0);
}
}
}
private void EditorBGColor_Click(object sender, EventArgs e)
{
colorDialog.Color = editorBGColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.richTextBox.BackColor = colorDialog.Color;
main.BackColor = colorDialog.Color;
}
}
}
private void LNBackColor_Click(object sender, EventArgs e)
{
colorDialog.Color = LNBackColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.RTBLineNumbers.BackColor = colorDialog.Color;
}
}
LNBackColor.BackColor = colorDialog.Color;
}
private void LNFontColor_Click(object sender, EventArgs e)
{
colorDialog.Color = LNFontColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.RTBLineNumbers.ForeColor = colorDialog.Color;
}
}
LNFontColor.BackColor = colorDialog.Color;
}
private void BLColor_Click(object sender, EventArgs e)
{
colorDialog.Color = BLColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.RTBLineNumbers.BorderLines_Color = colorDialog.Color;
}
}
BLColor.BackColor = colorDialog.Color;
}
private void GLColor_Click(object sender, EventArgs e)
{
colorDialog.Color = GLColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.RTBLineNumbers.GridLines_Color = colorDialog.Color;
}
}
GLColor.BackColor = colorDialog.Color;
}
private void SettingsNav_Click(object sender, EventArgs e)
{
switch (settingsNav.SelectedIndex)
{
case 0:
settingsTabControl.SelectedTab = editorTabPage;
break;
case 1:
settingsTabControl.SelectedTab = lineNumbersTabPage;
break;
case 2:
settingsTabControl.SelectedTab = statusPanelTabPage;
break;
case 3:
settingsTabControl.SelectedTab = toolbarTabPage;
break;
case 4:
settingsTabControl.SelectedTab = applicationTabPage;
break;
case 5:
settingsTabControl.SelectedTab = searchPanelTabPage;
break;
case 6:
settingsTabControl.SelectedTab = integrationTabPage;
break;
case 7:
settingsTabControl.SelectedTab = encryptionTabPage;
break;
}
}
private void SettingsTabControl_SelectedIndexChanged(object sender, EventArgs e)
{
settingsTabControl.Focus();
}
private void ToolbarVisible_Click(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (main != null)
{
if (toolbarVisible.Checked)
{
main.toolbarPanel.Visible = true;
main.RTBLineNumbers.Height = 1;
}
else
{
main.toolbarPanel.Visible = false;
}
main.richTextBox.SetInnerMargins(Convert.ToInt32(settings.editorPaddingLeft), 0, 0, 0);
}
}
private void AssociateCheckBox_Click(object sender, EventArgs e)
{
if (associateCheckBox.Checked)
{
AssociateExtension(Assembly.GetEntryAssembly().Location, "cnp");
}
else
{
DissociateExtension(Assembly.GetEntryAssembly().Location, "cnp");
}
}
private void IntegrateCheckBox_Click(object sender, EventArgs e)
{
if (integrateCheckBox.Checked)
{
MenuIntegrate("enable");
}
else
{
MenuIntegrate("disable");
}
}
private void PaddingLeftTextBox_TextChanged(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (paddingLeftTextBox.Text.Length >= 1)
{
if (settings.editorPaddingLeft != paddingLeftTextBox.Text)
{
main.richTextBox.SetInnerMargins(Convert.ToInt32(paddingLeftTextBox.Text), 0, 0, 0);
main.richTextBox.Refresh();
}
}
}
private void SendToCheckBox_Click(object sender, EventArgs e)
{
if (sendToCheckBox.Checked)
{
SendToShortcut();
}
else
{
string shortcutPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\SendTo\Crypto Notepad.lnk";
if (System.IO.File.Exists(shortcutPath))
{
System.IO.File.Delete(shortcutPath);
}
}
}
private void InsKeyComboBox_DropDownClosed(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (insKeyComboBox.Text == "Disable")
{
main.insMainMenu.ShortcutKeys = Keys.Insert;
}
else
{
main.insMainMenu.ShortcutKeys = Keys.None;
}
}
private void MenuIconsCheckBox_Click(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
main.MenuIcons();
}
private void FontButton_Click(object sender, EventArgs e)
{
using (new CenterWinDialog(this))
{
if (fontDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.richTextBox.Font = fontDialog.Font;
main.RTBLineNumbers.Font = fontDialog.Font;
main.richTextBox.SetInnerMargins(Convert.ToInt32(settings.editorPaddingLeft), 0, 0, 0);
}
}
}
private void LNVisibleComboBox_DropDownClosed(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (settings.lnVisible != LNVisibleComboBox.Text)
{
settings.lnVisible = LNVisibleComboBox.Text;
main.RTBLineNumbers.Visible = bool.Parse(settings.lnVisible);
main.RTBLineNumbers.Height = 1;
}
}
private void BLShowСomboBox_DropDownClosed(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (settings.blShow != BLShowСomboBox.Text)
{
settings.blShow = BLShowСomboBox.Text;
main.RTBLineNumbers.Show_BorderLines = bool.Parse(settings.blShow);
}
}
private void BLStyleComboBox_DropDownClosed(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (settings.blStyle != BLStyleComboBox.Text)
{
switch (BLStyleComboBox.Text)
{
case "Solid":
settings.blStyle = DashStyle.Solid.ToString();
break;
case "Dash":
settings.blStyle = DashStyle.Dash.ToString();
break;
case "Dot":
settings.blStyle = DashStyle.Dot.ToString();
break;
case "DashDot":
settings.blStyle = DashStyle.DashDot.ToString();
break;
case "DashDotDot":
settings.blStyle = DashStyle.DashDotDot.ToString();
break;
}
main.RTBLineNumbers.BorderLines_Style = (DashStyle)Enum.Parse(typeof(DashStyle), settings.blStyle);
}
}
private void GLShowComboBox_DropDownClosed(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (settings.glShow != GLShowComboBox.Text)
{
settings.glShow = GLShowComboBox.Text;
main.RTBLineNumbers.Show_GridLines = bool.Parse(settings.glShow);
}
}
private void GLStyleComboBox_DropDownClosed(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (settings.glStyle.ToString() != GLStyleComboBox.Text)
{
switch (GLStyleComboBox.Text)
{
case "Solid":
settings.glStyle = DashStyle.Solid.ToString(); ;
break;
case "Dash":
settings.glStyle = DashStyle.Dash.ToString();
break;
case "Dot":
settings.glStyle = DashStyle.Dot.ToString();
break;
case "DashDot":
settings.glStyle = DashStyle.DashDot.ToString();
break;
case "DashDotDot":
settings.glStyle = DashStyle.DashDotDot.ToString();
break;
}
main.RTBLineNumbers.GridLines_Style = (DashStyle)Enum.Parse(typeof(DashStyle), settings.glStyle);
}
}
private void PwdIterationsTextBox_Leave(object sender, EventArgs e)
{
if (pwdIterationsTextBox.Text != settings.PasswordIterations.ToString())
{
settings.PasswordIterations = pwdIterationsTextBox.Text;
}
}
private void KeySizeComboBox_DropDownClosed(object sender, EventArgs e)
{
if (keySizeComboBox.Text != settings.KeySize.ToString())
{
settings.KeySize = keySizeComboBox.Text;
}
}
private void HashComboBox_DropDownClosed(object sender, EventArgs e)
{
if (hashComboBox.Text != settings.HashAlgorithm)
{
settings.HashAlgorithm = hashComboBox.Text;
}
}
private void PaddingLeftTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
{
e.Handled = true;
}
}
private void PwdIterationsTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (!char.IsControl(e.KeyChar) && !char.IsDigit(e.KeyChar))
{
e.Handled = true;
}
}
private void FontDialog_Apply(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
main.richTextBox.Font = fontDialog.Font;
main.RTBLineNumbers.Font = fontDialog.Font;
main.richTextBox.SetInnerMargins(Convert.ToInt32(settings.editorPaddingLeft), 0, 0, 0);
}
private void StatusPanelVisible_Click(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (statusPanelVisible.Checked)
{
main.statusPanel.Visible = true;
}
else
{
main.statusPanel.Visible = false;
}
main.richTextBox.SetInnerMargins(Convert.ToInt32(paddingLeftTextBox.Text), 0, 0, 0);
}
private void StatusBackColor_Click(object sender, EventArgs e)
{
colorDialog.Color = statusBackColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.statusPanel.BackColor = colorDialog.Color;
}
}
}
private void StatusFontColor_Click(object sender, EventArgs e)
{
colorDialog.Color = statusFontColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.statusPanel.ForeColor = colorDialog.Color;
main.richTextBox.SetInnerMargins(Convert.ToInt32(settings.editorPaddingLeft), 0, 0, 0);
}
}
}
private void ToolbarBackColor_Click(object sender, EventArgs e)
{
colorDialog.Color = toolbarBackColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.toolbarPanel.BackColor = colorDialog.Color;
}
}
}
private void ToolbarBorder_Click(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (toolbarBorder.Checked)
{
main.toolbarPanel.BorderStyle = BorderStyle.FixedSingle;
settings.toolbarBorder = true;
}
else
{
main.toolbarPanel.BorderStyle = BorderStyle.None;
settings.toolbarBorder = false;
}
}
private void SearchBackColor_Click(object sender, EventArgs e)
{
colorDialog.Color = searchBackColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.searchPanel.BackColor = colorDialog.Color;
main.searchTextBox.BackColor = colorDialog.Color;
}
}
}
private void SearchFontColor_Click(object sender, EventArgs e)
{
colorDialog.Color = searchFontColor.BackColor;
using (new CenterWinDialog(this))
{
if (colorDialog.ShowDialog() == DialogResult.OK)
{
MainForm main = Owner as MainForm;
main.searchTextBox.ForeColor = colorDialog.Color;
main.caseSensitiveCheckBox.ForeColor = colorDialog.Color;
main.wholeWordCheckBox.ForeColor = colorDialog.Color;
main.findNextButton.ForeColor = colorDialog.Color;
}
}
}
private void MainMenuCheckBox_Click(object sender, EventArgs e)
{
MainForm main = Owner as MainForm;
if (mainMenuCheckBox.Checked)
{
main.mainMenu.Visible = true;
}
else
{
main.mainMenu.Visible = false;
}
}
/*Settings Section*/
}
}
}

View file

@ -120,6 +120,12 @@
<metadata name="colorDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="fontDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>115, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>76</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>