mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
properly theme the password dialog
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Security;
|
||||
using System.Windows.Forms;
|
||||
using mRemoteNG.Security;
|
||||
using mRemoteNG.Themes;
|
||||
using mRemoteNG.Tools;
|
||||
|
||||
namespace mRemoteNG.UI.Forms
|
||||
@@ -52,6 +53,7 @@ namespace mRemoteNG.UI.Forms
|
||||
private void frmPassword_Load(object sender, EventArgs e)
|
||||
{
|
||||
ApplyLanguage();
|
||||
ApplyTheme();
|
||||
var display = new DisplayProperties();
|
||||
pbLock.Image = display.ScaleImage(pbLock.Image);
|
||||
Height = tableLayoutPanel1.Height;
|
||||
@@ -103,6 +105,17 @@ namespace mRemoteNG.UI.Forms
|
||||
btnOK.Text = Language.strButtonOK;
|
||||
}
|
||||
|
||||
private void ApplyTheme()
|
||||
{
|
||||
if (!ThemeManager.getInstance().ActiveAndExtended)
|
||||
return;
|
||||
|
||||
var activeTheme = ThemeManager.getInstance().ActiveTheme;
|
||||
|
||||
BackColor = activeTheme.ExtendedPalette.getColor("Dialog_Background");
|
||||
ForeColor = activeTheme.ExtendedPalette.getColor("Dialog_Foreground");
|
||||
}
|
||||
|
||||
// ReSharper disable once UnusedMethodReturnValue.Local
|
||||
private bool VerifyNewPassword()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user