Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mRemoteNG/mRemoteNG.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitrij <kvarkas@gmail.com>2022-04-03 16:38:06 +0300
committerDimitrij <kvarkas@gmail.com>2022-04-03 16:38:06 +0300
commit943d36e23e9d2e33dbee46875c0d8a024e551a58 (patch)
tree8d10c6f3131504d346d4260fb6af7ee9236d8773
parentb563ac6e0c825b367a8536a4b278a6fc90142d89 (diff)
add rbac to hide menu page + lang updates
-rw-r--r--mRemoteNG/Language/Language.Designer.cs21
-rw-r--r--mRemoteNG/Language/Language.resx6
-rw-r--r--mRemoteNG/Properties/OptionsBackupPage.Designer.cs12
-rw-r--r--mRemoteNG/Properties/OptionsBackupPage.settings3
-rw-r--r--mRemoteNG/Properties/rbac.Designer.cs2
-rw-r--r--mRemoteNG/Properties/rbac.settings2
-rw-r--r--mRemoteNG/UI/Forms/OptionsPages/BackupPage.Designer.cs128
-rw-r--r--mRemoteNG/UI/Forms/OptionsPages/BackupPage.cs12
-rw-r--r--mRemoteNG/UI/Forms/frmOptions.cs15
9 files changed, 154 insertions, 47 deletions
diff --git a/mRemoteNG/Language/Language.Designer.cs b/mRemoteNG/Language/Language.Designer.cs
index f895b23e..9fc86917 100644
--- a/mRemoteNG/Language/Language.Designer.cs
+++ b/mRemoteNG/Language/Language.Designer.cs
@@ -6489,5 +6489,26 @@ namespace mRemoteNG.Resources.Language {
return ResourceManager.GetString("lblConnectionsBackupPath", resourceCulture);
}
}
+
+ /// <summary>
+ /// Looks up a localized string similar to PageСontrolInOptionsMenu.
+ /// </summary>
+ internal static string PageСontrolInOptionsMenu
+ {
+ get
+ {
+ return ResourceManager.GetString("PageСontrolInOptionsMenu", resourceCulture);
+ }
+ }
+ /// <summary>
+ /// Looks up a localized string similar to ShowForUser.
+ /// </summary>
+ internal static string ShowForUser
+ {
+ get
+ {
+ return ResourceManager.GetString("ShowForUser", resourceCulture);
+ }
+ }
}
}
diff --git a/mRemoteNG/Language/Language.resx b/mRemoteNG/Language/Language.resx
index 5bcb40a1..5c987e0e 100644
--- a/mRemoteNG/Language/Language.resx
+++ b/mRemoteNG/Language/Language.resx
@@ -2259,4 +2259,10 @@ Nightly Channel includes Alphas, Betas &amp; Release Candidates.</value>
<data name="lblConnectionsBackupMaxCount" xml:space="preserve">
<value>Maximum number of backups</value>
</data>
+ <data name="PageСontrolInOptionsMenu" xml:space="preserve">
+ <value>Page control in Options menu</value>
+ </data>
+ <data name="ShowForUser" xml:space="preserve">
+ <value>Show for user</value>
+ </data>
</root> \ No newline at end of file
diff --git a/mRemoteNG/Properties/OptionsBackupPage.Designer.cs b/mRemoteNG/Properties/OptionsBackupPage.Designer.cs
index 5e05ba55..9e121e38 100644
--- a/mRemoteNG/Properties/OptionsBackupPage.Designer.cs
+++ b/mRemoteNG/Properties/OptionsBackupPage.Designer.cs
@@ -202,5 +202,17 @@ namespace mRemoteNG.Properties {
this["cbBackupLocationACL"] = value;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("False")]
+ public bool cbBacupPageInOptionMenu {
+ get {
+ return ((bool)(this["cbBacupPageInOptionMenu"]));
+ }
+ set {
+ this["cbBacupPageInOptionMenu"] = value;
+ }
+ }
}
}
diff --git a/mRemoteNG/Properties/OptionsBackupPage.settings b/mRemoteNG/Properties/OptionsBackupPage.settings
index c7bd591a..00d139ee 100644
--- a/mRemoteNG/Properties/OptionsBackupPage.settings
+++ b/mRemoteNG/Properties/OptionsBackupPage.settings
@@ -47,5 +47,8 @@
<Setting Name="cbBackupLocationACL" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
+ <Setting Name="cbBacupPageInOptionMenu" Type="System.Boolean" Scope="User">
+ <Value Profile="(Default)">False</Value>
+ </Setting>
</Settings>
</SettingsFile> \ No newline at end of file
diff --git a/mRemoteNG/Properties/rbac.Designer.cs b/mRemoteNG/Properties/rbac.Designer.cs
index 00cfec9c..3f4892b0 100644
--- a/mRemoteNG/Properties/rbac.Designer.cs
+++ b/mRemoteNG/Properties/rbac.Designer.cs
@@ -25,7 +25,7 @@ namespace mRemoteNG.Properties {
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("AdminRole")]
+ [global::System.Configuration.DefaultSettingValueAttribute("UserRole")]
public string ActiveRole {
get {
return ((string)(this["ActiveRole"]));
diff --git a/mRemoteNG/Properties/rbac.settings b/mRemoteNG/Properties/rbac.settings
index 05b3569e..4e11b6d5 100644
--- a/mRemoteNG/Properties/rbac.settings
+++ b/mRemoteNG/Properties/rbac.settings
@@ -3,7 +3,7 @@
<Profiles />
<Settings>
<Setting Name="ActiveRole" Type="System.String" Scope="User">
- <Value Profile="(Default)">AdminRole</Value>
+ <Value Profile="(Default)">UserRole</Value>
</Setting>
<Setting Name="AdminRolePassword" Type="System.String" Scope="User">
<Value Profile="(Default)">mR3m0t3NG!</Value>
diff --git a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.Designer.cs b/mRemoteNG/UI/Forms/OptionsPages/BackupPage.Designer.cs
index b8ef62bf..6a211f04 100644
--- a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.Designer.cs
+++ b/mRemoteNG/UI/Forms/OptionsPages/BackupPage.Designer.cs
@@ -32,7 +32,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages
{
this.tableLayoutPanelBackupFile = new System.Windows.Forms.TableLayoutPanel();
this.lblBackupType = new System.Windows.Forms.Label();
- this.lblACL = new System.Windows.Forms.Label();
this.lblBackupEnable = new System.Windows.Forms.Label();
this.lblConnectionsBackupFrequency = new System.Windows.Forms.Label();
this.cbConnectionBackupFrequency = new System.Windows.Forms.ComboBox();
@@ -55,10 +54,15 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.btnBrowsePath = new System.Windows.Forms.Button();
this.lblBackupNameFormat = new System.Windows.Forms.Label();
this.txtBackupNameFormat = new System.Windows.Forms.TextBox();
+ this.lblBacupPageShowInOptionsMenu = new System.Windows.Forms.Label();
+ this.pnlShowForUser = new System.Windows.Forms.Panel();
+ this.cbBacupPageInOptionMenu = new System.Windows.Forms.CheckBox();
+ this.lblACL = new System.Windows.Forms.Label();
this.tableLayoutPanelBackupFile.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numMaxBackups)).BeginInit();
this.pnlBackupEnable.SuspendLayout();
this.pnlBackupType.SuspendLayout();
+ this.pnlShowForUser.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanelBackupFile
@@ -70,7 +74,6 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.tableLayoutPanelBackupFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanelBackupFile.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanelBackupFile.Controls.Add(this.lblBackupType, 1, 2);
- this.tableLayoutPanelBackupFile.Controls.Add(this.lblACL, 0, 0);
this.tableLayoutPanelBackupFile.Controls.Add(this.lblBackupEnable, 1, 1);
this.tableLayoutPanelBackupFile.Controls.Add(this.lblConnectionsBackupFrequency, 1, 3);
this.tableLayoutPanelBackupFile.Controls.Add(this.cbConnectionBackupFrequency, 2, 3);
@@ -89,6 +92,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.tableLayoutPanelBackupFile.Controls.Add(this.btnBrowsePath, 3, 6);
this.tableLayoutPanelBackupFile.Controls.Add(this.lblBackupNameFormat, 1, 5);
this.tableLayoutPanelBackupFile.Controls.Add(this.txtBackupNameFormat, 2, 5);
+ this.tableLayoutPanelBackupFile.Controls.Add(this.lblBacupPageShowInOptionsMenu, 1, 0);
+ this.tableLayoutPanelBackupFile.Controls.Add(this.pnlShowForUser, 2, 0);
+ this.tableLayoutPanelBackupFile.Controls.Add(this.lblACL, 0, 0);
this.tableLayoutPanelBackupFile.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanelBackupFile.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize;
this.tableLayoutPanelBackupFile.Location = new System.Drawing.Point(0, 0);
@@ -109,32 +115,20 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
this.lblBackupType.AutoSize = true;
this.lblBackupType.Dock = System.Windows.Forms.DockStyle.Fill;
- this.lblBackupType.Location = new System.Drawing.Point(92, 42);
+ this.lblBackupType.Location = new System.Drawing.Point(92, 60);
this.lblBackupType.Name = "lblBackupType";
- this.lblBackupType.Size = new System.Drawing.Size(163, 27);
+ this.lblBackupType.Size = new System.Drawing.Size(171, 27);
this.lblBackupType.TabIndex = 20;
this.lblBackupType.Text = "Backup type";
this.lblBackupType.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
- // lblACL
- //
- this.lblACL.AutoSize = true;
- this.lblACL.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
- this.lblACL.Location = new System.Drawing.Point(3, 0);
- this.lblACL.Name = "lblACL";
- this.lblACL.Size = new System.Drawing.Size(72, 15);
- this.lblACL.TabIndex = 17;
- this.lblACL.Text = "ACL for user";
- this.lblACL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- this.lblACL.Visible = false;
- //
// lblBackupEnable
//
this.lblBackupEnable.AutoSize = true;
this.lblBackupEnable.Dock = System.Windows.Forms.DockStyle.Fill;
- this.lblBackupEnable.Location = new System.Drawing.Point(92, 15);
+ this.lblBackupEnable.Location = new System.Drawing.Point(92, 33);
this.lblBackupEnable.Name = "lblBackupEnable";
- this.lblBackupEnable.Size = new System.Drawing.Size(163, 27);
+ this.lblBackupEnable.Size = new System.Drawing.Size(171, 27);
this.lblBackupEnable.TabIndex = 18;
this.lblBackupEnable.Text = "Backups for connection data";
this.lblBackupEnable.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -143,9 +137,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
this.lblConnectionsBackupFrequency.AutoSize = true;
this.lblConnectionsBackupFrequency.Dock = System.Windows.Forms.DockStyle.Fill;
- this.lblConnectionsBackupFrequency.Location = new System.Drawing.Point(92, 69);
+ this.lblConnectionsBackupFrequency.Location = new System.Drawing.Point(92, 87);
this.lblConnectionsBackupFrequency.Name = "lblConnectionsBackupFrequency";
- this.lblConnectionsBackupFrequency.Size = new System.Drawing.Size(163, 27);
+ this.lblConnectionsBackupFrequency.Size = new System.Drawing.Size(171, 29);
this.lblConnectionsBackupFrequency.TabIndex = 14;
this.lblConnectionsBackupFrequency.Text = "Connection Backup Frequency";
this.lblConnectionsBackupFrequency.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -155,7 +149,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.cbConnectionBackupFrequency.Dock = System.Windows.Forms.DockStyle.Fill;
this.cbConnectionBackupFrequency.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbConnectionBackupFrequency.FormattingEnabled = true;
- this.cbConnectionBackupFrequency.Location = new System.Drawing.Point(261, 72);
+ this.cbConnectionBackupFrequency.Location = new System.Drawing.Point(269, 92);
+ this.cbConnectionBackupFrequency.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
this.cbConnectionBackupFrequency.Name = "cbConnectionBackupFrequency";
this.cbConnectionBackupFrequency.Size = new System.Drawing.Size(208, 21);
this.cbConnectionBackupFrequency.TabIndex = 13;
@@ -164,16 +159,16 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
this.lblConnectionsBackupMaxCount.AutoSize = true;
this.lblConnectionsBackupMaxCount.Dock = System.Windows.Forms.DockStyle.Fill;
- this.lblConnectionsBackupMaxCount.Location = new System.Drawing.Point(92, 96);
+ this.lblConnectionsBackupMaxCount.Location = new System.Drawing.Point(92, 116);
this.lblConnectionsBackupMaxCount.Name = "lblConnectionsBackupMaxCount";
- this.lblConnectionsBackupMaxCount.Size = new System.Drawing.Size(163, 28);
+ this.lblConnectionsBackupMaxCount.Size = new System.Drawing.Size(171, 28);
this.lblConnectionsBackupMaxCount.TabIndex = 13;
this.lblConnectionsBackupMaxCount.Text = "Maximum number of backups";
this.lblConnectionsBackupMaxCount.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// numMaxBackups
//
- this.numMaxBackups.Location = new System.Drawing.Point(261, 99);
+ this.numMaxBackups.Location = new System.Drawing.Point(269, 119);
this.numMaxBackups.Name = "numMaxBackups";
this.numMaxBackups.Size = new System.Drawing.Size(34, 22);
this.numMaxBackups.TabIndex = 16;
@@ -185,7 +180,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.cbBackupEnableACL.Dock = System.Windows.Forms.DockStyle.Fill;
this.cbBackupEnableACL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbBackupEnableACL.FormattingEnabled = true;
- this.cbBackupEnableACL.Location = new System.Drawing.Point(3, 18);
+ this.cbBackupEnableACL.Location = new System.Drawing.Point(3, 36);
this.cbBackupEnableACL.MaxDropDownItems = 3;
this.cbBackupEnableACL.Name = "cbBackupEnableACL";
this.cbBackupEnableACL.Size = new System.Drawing.Size(83, 21);
@@ -197,7 +192,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.pnlBackupEnable.Controls.Add(this.rbBackupEnableEnable);
this.pnlBackupEnable.Controls.Add(this.rbBackupEnableDisable);
this.pnlBackupEnable.Dock = System.Windows.Forms.DockStyle.Fill;
- this.pnlBackupEnable.Location = new System.Drawing.Point(261, 18);
+ this.pnlBackupEnable.Location = new System.Drawing.Point(269, 36);
this.pnlBackupEnable.Name = "pnlBackupEnable";
this.pnlBackupEnable.Size = new System.Drawing.Size(208, 21);
this.pnlBackupEnable.TabIndex = 26;
@@ -230,7 +225,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.pnlBackupType.Controls.Add(this.radioButton1);
this.pnlBackupType.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlBackupType.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.pnlBackupType.Location = new System.Drawing.Point(261, 45);
+ this.pnlBackupType.Location = new System.Drawing.Point(269, 63);
this.pnlBackupType.Name = "pnlBackupType";
this.pnlBackupType.Size = new System.Drawing.Size(208, 21);
this.pnlBackupType.TabIndex = 27;
@@ -264,7 +259,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.cbBackupFrequencyACL.Dock = System.Windows.Forms.DockStyle.Fill;
this.cbBackupFrequencyACL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbBackupFrequencyACL.FormattingEnabled = true;
- this.cbBackupFrequencyACL.Location = new System.Drawing.Point(3, 72);
+ this.cbBackupFrequencyACL.Location = new System.Drawing.Point(3, 90);
this.cbBackupFrequencyACL.MaxDropDownItems = 3;
this.cbBackupFrequencyACL.Name = "cbBackupFrequencyACL";
this.cbBackupFrequencyACL.Size = new System.Drawing.Size(83, 21);
@@ -277,7 +272,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.cbBackupTypeACL.Dock = System.Windows.Forms.DockStyle.Fill;
this.cbBackupTypeACL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbBackupTypeACL.FormattingEnabled = true;
- this.cbBackupTypeACL.Location = new System.Drawing.Point(3, 45);
+ this.cbBackupTypeACL.Location = new System.Drawing.Point(3, 63);
this.cbBackupTypeACL.MaxDropDownItems = 3;
this.cbBackupTypeACL.Name = "cbBackupTypeACL";
this.cbBackupTypeACL.Size = new System.Drawing.Size(83, 21);
@@ -289,7 +284,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.cbBackupNumberACL.Cursor = System.Windows.Forms.Cursors.Hand;
this.cbBackupNumberACL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbBackupNumberACL.FormattingEnabled = true;
- this.cbBackupNumberACL.Location = new System.Drawing.Point(3, 99);
+ this.cbBackupNumberACL.Location = new System.Drawing.Point(3, 119);
this.cbBackupNumberACL.MaxDropDownItems = 3;
this.cbBackupNumberACL.Name = "cbBackupNumberACL";
this.cbBackupNumberACL.Size = new System.Drawing.Size(83, 21);
@@ -302,7 +297,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.cbBackupNameFormatACL.Dock = System.Windows.Forms.DockStyle.Fill;
this.cbBackupNameFormatACL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbBackupNameFormatACL.FormattingEnabled = true;
- this.cbBackupNameFormatACL.Location = new System.Drawing.Point(3, 127);
+ this.cbBackupNameFormatACL.Location = new System.Drawing.Point(3, 147);
this.cbBackupNameFormatACL.MaxDropDownItems = 3;
this.cbBackupNameFormatACL.Name = "cbBackupNameFormatACL";
this.cbBackupNameFormatACL.Size = new System.Drawing.Size(83, 21);
@@ -315,7 +310,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.cbBackupLocationACL.Dock = System.Windows.Forms.DockStyle.Fill;
this.cbBackupLocationACL.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbBackupLocationACL.FormattingEnabled = true;
- this.cbBackupLocationACL.Location = new System.Drawing.Point(3, 155);
+ this.cbBackupLocationACL.Location = new System.Drawing.Point(3, 177);
this.cbBackupLocationACL.MaxDropDownItems = 3;
this.cbBackupLocationACL.Name = "cbBackupLocationACL";
this.cbBackupLocationACL.Size = new System.Drawing.Size(83, 21);
@@ -326,9 +321,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
this.lblConnectionsBackupPath.AutoSize = true;
this.lblConnectionsBackupPath.Dock = System.Windows.Forms.DockStyle.Fill;
- this.lblConnectionsBackupPath.Location = new System.Drawing.Point(92, 152);
+ this.lblConnectionsBackupPath.Location = new System.Drawing.Point(92, 174);
this.lblConnectionsBackupPath.Name = "lblConnectionsBackupPath";
- this.lblConnectionsBackupPath.Size = new System.Drawing.Size(163, 31);
+ this.lblConnectionsBackupPath.Size = new System.Drawing.Size(171, 31);
this.lblConnectionsBackupPath.TabIndex = 13;
this.lblConnectionsBackupPath.Text = "backup folder";
this.lblConnectionsBackupPath.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -336,7 +331,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
// txtConnectionsBackupPath
//
this.txtConnectionsBackupPath.Dock = System.Windows.Forms.DockStyle.Fill;
- this.txtConnectionsBackupPath.Location = new System.Drawing.Point(261, 155);
+ this.txtConnectionsBackupPath.Location = new System.Drawing.Point(269, 179);
+ this.txtConnectionsBackupPath.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
this.txtConnectionsBackupPath.Name = "txtConnectionsBackupPath";
this.txtConnectionsBackupPath.Size = new System.Drawing.Size(208, 22);
this.txtConnectionsBackupPath.TabIndex = 14;
@@ -344,10 +340,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
// btnBrowsePath
//
this.btnBrowsePath.AutoSize = true;
- this.btnBrowsePath.Dock = System.Windows.Forms.DockStyle.Fill;
- this.btnBrowsePath.Location = new System.Drawing.Point(475, 155);
+ this.btnBrowsePath.Location = new System.Drawing.Point(483, 177);
this.btnBrowsePath.Name = "btnBrowsePath";
- this.btnBrowsePath.Size = new System.Drawing.Size(80, 25);
+ this.btnBrowsePath.Size = new System.Drawing.Size(94, 25);
this.btnBrowsePath.TabIndex = 15;
this.btnBrowsePath.Text = "Browse";
this.btnBrowsePath.UseVisualStyleBackColor = true;
@@ -357,9 +352,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//
this.lblBackupNameFormat.AutoSize = true;
this.lblBackupNameFormat.Dock = System.Windows.Forms.DockStyle.Fill;
- this.lblBackupNameFormat.Location = new System.Drawing.Point(92, 124);
+ this.lblBackupNameFormat.Location = new System.Drawing.Point(92, 144);
this.lblBackupNameFormat.Name = "lblBackupNameFormat";
- this.lblBackupNameFormat.Size = new System.Drawing.Size(163, 28);
+ this.lblBackupNameFormat.Size = new System.Drawing.Size(171, 30);
this.lblBackupNameFormat.TabIndex = 33;
this.lblBackupNameFormat.Text = "Backup file name format";
this.lblBackupNameFormat.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
@@ -367,11 +362,57 @@ namespace mRemoteNG.UI.Forms.OptionsPages
// txtBackupNameFormat
//
this.txtBackupNameFormat.Dock = System.Windows.Forms.DockStyle.Fill;
- this.txtBackupNameFormat.Location = new System.Drawing.Point(261, 127);
+ this.txtBackupNameFormat.Location = new System.Drawing.Point(269, 149);
+ this.txtBackupNameFormat.Margin = new System.Windows.Forms.Padding(3, 5, 3, 3);
this.txtBackupNameFormat.Name = "txtBackupNameFormat";
this.txtBackupNameFormat.Size = new System.Drawing.Size(208, 22);
this.txtBackupNameFormat.TabIndex = 34;
//
+ // lblBacupPageShowInOptionsMenu
+ //
+ this.lblBacupPageShowInOptionsMenu.AutoSize = true;
+ this.lblBacupPageShowInOptionsMenu.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.lblBacupPageShowInOptionsMenu.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.lblBacupPageShowInOptionsMenu.Location = new System.Drawing.Point(92, 0);
+ this.lblBacupPageShowInOptionsMenu.Name = "lblBacupPageShowInOptionsMenu";
+ this.lblBacupPageShowInOptionsMenu.Size = new System.Drawing.Size(171, 33);
+ this.lblBacupPageShowInOptionsMenu.TabIndex = 35;
+ this.lblBacupPageShowInOptionsMenu.Text = "Page control in Options menu";
+ this.lblBacupPageShowInOptionsMenu.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ //
+ // pnlShowForUser
+ //
+ this.pnlShowForUser.Controls.Add(this.cbBacupPageInOptionMenu);
+ this.pnlShowForUser.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.pnlShowForUser.Location = new System.Drawing.Point(269, 3);
+ this.pnlShowForUser.Name = "pnlShowForUser";
+ this.pnlShowForUser.Size = new System.Drawing.Size(208, 27);
+ this.pnlShowForUser.TabIndex = 37;
+ //
+ // cbBacupPageInOptionMenu
+ //
+ this.cbBacupPageInOptionMenu.AutoSize = true;
+ this.cbBacupPageInOptionMenu.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.cbBacupPageInOptionMenu.Location = new System.Drawing.Point(4, 6);
+ this.cbBacupPageInOptionMenu.Name = "cbBacupPageInOptionMenu";
+ this.cbBacupPageInOptionMenu.Size = new System.Drawing.Size(104, 19);
+ this.cbBacupPageInOptionMenu.TabIndex = 36;
+ this.cbBacupPageInOptionMenu.Text = "Show for user";
+ this.cbBacupPageInOptionMenu.UseVisualStyleBackColor = true;
+ //
+ // lblACL
+ //
+ this.lblACL.AutoSize = true;
+ this.lblACL.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.lblACL.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point);
+ this.lblACL.Location = new System.Drawing.Point(3, 0);
+ this.lblACL.Name = "lblACL";
+ this.lblACL.Size = new System.Drawing.Size(83, 33);
+ this.lblACL.TabIndex = 17;
+ this.lblACL.Text = "ACL for user";
+ this.lblACL.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+ this.lblACL.Visible = false;
+ //
// BackupPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
@@ -386,6 +427,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
this.pnlBackupEnable.PerformLayout();
this.pnlBackupType.ResumeLayout(false);
this.pnlBackupType.PerformLayout();
+ this.pnlShowForUser.ResumeLayout(false);
+ this.pnlShowForUser.PerformLayout();
this.ResumeLayout(false);
}
@@ -415,5 +458,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
private System.Windows.Forms.ComboBox cbBackupLocationACL;
private System.Windows.Forms.Label lblBackupNameFormat;
private System.Windows.Forms.TextBox txtBackupNameFormat;
+ private System.Windows.Forms.Label lblBacupPageShowInOptionsMenu;
+ private System.Windows.Forms.CheckBox cbBacupPageInOptionMenu;
+ private System.Windows.Forms.Panel pnlShowForUser;
}
} \ No newline at end of file
diff --git a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.cs b/mRemoteNG/UI/Forms/OptionsPages/BackupPage.cs
index 3f8d64ab..ff6c3fde 100644
--- a/mRemoteNG/UI/Forms/OptionsPages/BackupPage.cs
+++ b/mRemoteNG/UI/Forms/OptionsPages/BackupPage.cs
@@ -37,6 +37,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
if (Properties.rbac.Default.ActiveRole == "AdminRole")
{
lblACL.Visible = true;
+ lblBacupPageShowInOptionsMenu.Visible = true;
+ pnlShowForUser.Visible = true;
+
cbBackupEnableACL.Visible = true;
cbBackupTypeACL.Visible = true;
cbBackupFrequencyACL.Visible = true;
@@ -73,6 +76,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
} else
{
lblACL.Visible = false;
+ lblBacupPageShowInOptionsMenu.Visible = false;
+ pnlShowForUser.Visible = false;
+
cbBackupEnableACL.Visible = false;
cbBackupTypeACL.Visible = false;
cbBackupFrequencyACL.Visible = false;
@@ -153,6 +159,9 @@ namespace mRemoteNG.UI.Forms.OptionsPages
//{ new DropdownList( (int)ConnectionsBackupFrequencyEnum.Custom, Language.ConnectionsBackupFrequencyCustom)}
};
+ lblBacupPageShowInOptionsMenu.Text = Language.PageСontrolInOptionsMenu;
+ cbBacupPageInOptionMenu.Text = Language.ShowForUser;
+
cbBackupEnableACL.BindingContext = new BindingContext();
cbBackupEnableACL.DataSource = _permissionsListing;
cbBackupEnableACL.DisplayMember = "DisplayString";
@@ -213,6 +222,7 @@ namespace mRemoteNG.UI.Forms.OptionsPages
}
}
+ cbBacupPageInOptionMenu.Checked = Properties.OptionsBackupPage.Default.cbBacupPageInOptionMenu;
cbBackupEnableACL.SelectedValue = Properties.OptionsBackupPage.Default.cbBackupEnableACL;
cbBackupTypeACL.SelectedValue = Properties.OptionsBackupPage.Default.cbBackupTypeACL;
cbBackupFrequencyACL.SelectedValue = Properties.OptionsBackupPage.Default.cbBackupFrequencyACL;
@@ -274,6 +284,8 @@ namespace mRemoteNG.UI.Forms.OptionsPages
}
}
+ Properties.OptionsBackupPage.Default.cbBacupPageInOptionMenu = cbBacupPageInOptionMenu.Checked;
+
//Obsolete. Set to false
Properties.OptionsBackupPage.Default.SaveConnectionsAfterEveryEdit = false;
Properties.OptionsBackupPage.Default.SaveConsOnExit = false;
diff --git a/mRemoteNG/UI/Forms/frmOptions.cs b/mRemoteNG/UI/Forms/frmOptions.cs
index 9090ee17..9509d9cb 100644
--- a/mRemoteNG/UI/Forms/frmOptions.cs
+++ b/mRemoteNG/UI/Forms/frmOptions.cs
@@ -44,8 +44,8 @@ namespace mRemoteNG.UI.Forms
btnOK.Text = Language._Ok;
btnCancel.Text = Language._Cancel;
btnApply.Text = Language.Apply;
- ApplyTheme();
- ThemeManager.getInstance().ThemeChanged += ApplyTheme;
+ //ApplyTheme();
+ //ThemeManager.getInstance().ThemeChanged += ApplyTheme;
lstOptionPages.SelectedIndexChanged += LstOptionPages_SelectedIndexChanged;
lstOptionPages.SelectedIndex = 0;
}
@@ -82,9 +82,16 @@ namespace mRemoteNG.UI.Forms
{typeof(ThemePage).Name, new ThemePage {Dock = DockStyle.Fill}},
{typeof(SecurityPage).Name, new SecurityPage {Dock = DockStyle.Fill}},
{typeof(AdvancedPage).Name, new AdvancedPage {Dock = DockStyle.Fill}},
- {typeof(BackupPage).Name, new BackupPage {Dock = DockStyle.Fill}},
- //{typeof(ComponentsPage).Name, new ComponentsPage {Dock = DockStyle.Fill}},
};
+
+ if (Properties.OptionsBackupPage.Default.cbBacupPageInOptionMenu == true || Properties.rbac.Default.ActiveRole == "AdminRole")
+ {
+ _pages.Add(typeof(BackupPage).Name, new BackupPage { Dock = DockStyle.Fill });
+ }
+
+
+ //{typeof(ComponentsPage).Name, new ComponentsPage {Dock = DockStyle.Fill}},
+
}
private void AddOptionsPagesToListView()