mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
move localization to ctor and fix minor themeing issue
This commit is contained in:
@@ -3,7 +3,7 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
public partial class ErrorAndInfoWindow
|
||||
{
|
||||
internal System.Windows.Forms.PictureBox pbError;
|
||||
internal Controls.Base.NGPictureBox pbError;
|
||||
internal System.Windows.Forms.ListView lvErrorCollector;
|
||||
internal System.Windows.Forms.ColumnHeader clmMessage;
|
||||
internal Controls.Base.NGTextBox txtMsgText;
|
||||
@@ -16,7 +16,7 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.txtMsgText = new mRemoteNG.UI.Controls.Base.NGTextBox();
|
||||
this.pbError = new System.Windows.Forms.PictureBox();
|
||||
this.pbError = new Controls.Base.NGPictureBox();
|
||||
this.lvErrorCollector = new System.Windows.Forms.ListView();
|
||||
this.clmMessage = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.cMenMC = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
|
||||
@@ -36,12 +36,12 @@ namespace mRemoteNG.UI.Window
|
||||
_themeManager.ThemeChanged += ApplyTheme;
|
||||
LayoutVertical();
|
||||
FillImageList();
|
||||
ApplyLanguage();
|
||||
}
|
||||
|
||||
#region Form Stuff
|
||||
private void ErrorsAndInfos_Load(object sender, EventArgs e)
|
||||
{
|
||||
ApplyLanguage();
|
||||
}
|
||||
|
||||
private void ApplyLanguage()
|
||||
@@ -60,6 +60,13 @@ namespace mRemoteNG.UI.Window
|
||||
if (!_themeManager.ThemingActive) return;
|
||||
lvErrorCollector.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background");
|
||||
lvErrorCollector.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground");
|
||||
|
||||
pnlErrorMsg.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
|
||||
pnlErrorMsg.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
|
||||
txtMsgText.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background");
|
||||
txtMsgText.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Foreground");
|
||||
lblMsgDate.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
|
||||
lblMsgDate.ForeColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Foreground");
|
||||
}
|
||||
|
||||
private void FillImageList()
|
||||
@@ -143,11 +150,11 @@ namespace mRemoteNG.UI.Window
|
||||
{
|
||||
try
|
||||
{
|
||||
pnlErrorMsg.BackColor = Color.FromKnownColor(KnownColor.Control);
|
||||
pbError.Image = null;
|
||||
txtMsgText.BackColor = Color.FromKnownColor(KnownColor.Control);
|
||||
txtMsgText.Text = "";
|
||||
lblMsgDate.BackColor = Color.FromKnownColor(KnownColor.Control);
|
||||
pnlErrorMsg.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
|
||||
pbError.Image = null;
|
||||
txtMsgText.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("TextBox_Background");
|
||||
txtMsgText.Text = "";
|
||||
lblMsgDate.BackColor = _themeManager.ActiveTheme.ExtendedPalette.getColor("Dialog_Background");
|
||||
lblMsgDate.Text = "";
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user