mirror of
https://github.com/terrymacdonald/DisplayMagician.git
synced 2024-08-30 18:32:20 +00:00
Added Video card mode image to Edit Shortcut form
Now it looks much prettier.
This commit is contained in:
parent
63479cae82
commit
85d4a04795
18
DisplayMagician/UIForms/ShortcutForm.Designer.cs
generated
18
DisplayMagician/UIForms/ShortcutForm.Designer.cs
generated
@ -38,6 +38,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.dialog_open = new System.Windows.Forms.OpenFileDialog();
|
this.dialog_open = new System.Windows.Forms.OpenFileDialog();
|
||||||
this.tabc_shortcut = new System.Windows.Forms.TabControl();
|
this.tabc_shortcut = new System.Windows.Forms.TabControl();
|
||||||
this.tabp_display = new System.Windows.Forms.TabPage();
|
this.tabp_display = new System.Windows.Forms.TabPage();
|
||||||
|
this.pbLogo = new System.Windows.Forms.PictureBox();
|
||||||
this.lbl_profile_shown_subtitle = new System.Windows.Forms.Label();
|
this.lbl_profile_shown_subtitle = new System.Windows.Forms.Label();
|
||||||
this.lbl_profile_shown = new System.Windows.Forms.Label();
|
this.lbl_profile_shown = new System.Windows.Forms.Label();
|
||||||
this.ilv_saved_profiles = new Manina.Windows.Forms.ImageListView();
|
this.ilv_saved_profiles = new Manina.Windows.Forms.ImageListView();
|
||||||
@ -123,6 +124,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.lbl_hotkey_assigned = new System.Windows.Forms.Label();
|
this.lbl_hotkey_assigned = new System.Windows.Forms.Label();
|
||||||
this.tabc_shortcut.SuspendLayout();
|
this.tabc_shortcut.SuspendLayout();
|
||||||
this.tabp_display.SuspendLayout();
|
this.tabp_display.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit();
|
||||||
this.tabp_audio.SuspendLayout();
|
this.tabp_audio.SuspendLayout();
|
||||||
this.gb_capture_settings.SuspendLayout();
|
this.gb_capture_settings.SuspendLayout();
|
||||||
this.gb_capture_volume.SuspendLayout();
|
this.gb_capture_volume.SuspendLayout();
|
||||||
@ -214,6 +216,7 @@ namespace DisplayMagician.UIForms
|
|||||||
// tabp_display
|
// tabp_display
|
||||||
//
|
//
|
||||||
this.tabp_display.BackColor = System.Drawing.Color.Black;
|
this.tabp_display.BackColor = System.Drawing.Color.Black;
|
||||||
|
this.tabp_display.Controls.Add(this.pbLogo);
|
||||||
this.tabp_display.Controls.Add(this.lbl_profile_shown_subtitle);
|
this.tabp_display.Controls.Add(this.lbl_profile_shown_subtitle);
|
||||||
this.tabp_display.Controls.Add(this.lbl_profile_shown);
|
this.tabp_display.Controls.Add(this.lbl_profile_shown);
|
||||||
this.tabp_display.Controls.Add(this.ilv_saved_profiles);
|
this.tabp_display.Controls.Add(this.ilv_saved_profiles);
|
||||||
@ -228,6 +231,17 @@ namespace DisplayMagician.UIForms
|
|||||||
this.tabp_display.Text = "1. Choose Display Profile";
|
this.tabp_display.Text = "1. Choose Display Profile";
|
||||||
this.tabp_display.ToolTipText = "Choose which previously saved Display Profile you will use with this shortcut.";
|
this.tabp_display.ToolTipText = "Choose which previously saved Display Profile you will use with this shortcut.";
|
||||||
//
|
//
|
||||||
|
// pbLogo
|
||||||
|
//
|
||||||
|
this.pbLogo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.pbLogo.BackColor = System.Drawing.Color.DimGray;
|
||||||
|
this.pbLogo.Location = new System.Drawing.Point(953, 20);
|
||||||
|
this.pbLogo.Name = "pbLogo";
|
||||||
|
this.pbLogo.Size = new System.Drawing.Size(100, 49);
|
||||||
|
this.pbLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||||
|
this.pbLogo.TabIndex = 38;
|
||||||
|
this.pbLogo.TabStop = false;
|
||||||
|
//
|
||||||
// lbl_profile_shown_subtitle
|
// lbl_profile_shown_subtitle
|
||||||
//
|
//
|
||||||
this.lbl_profile_shown_subtitle.AutoSize = true;
|
this.lbl_profile_shown_subtitle.AutoSize = true;
|
||||||
@ -266,7 +280,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.ilv_saved_profiles.Name = "ilv_saved_profiles";
|
this.ilv_saved_profiles.Name = "ilv_saved_profiles";
|
||||||
this.ilv_saved_profiles.PersistentCacheDirectory = "";
|
this.ilv_saved_profiles.PersistentCacheDirectory = "";
|
||||||
this.ilv_saved_profiles.PersistentCacheSize = ((long)(100));
|
this.ilv_saved_profiles.PersistentCacheSize = ((long)(100));
|
||||||
this.ilv_saved_profiles.Size = new System.Drawing.Size(1086, 156);
|
this.ilv_saved_profiles.Size = new System.Drawing.Size(1086, 184);
|
||||||
this.ilv_saved_profiles.TabIndex = 24;
|
this.ilv_saved_profiles.TabIndex = 24;
|
||||||
this.ilv_saved_profiles.UseWIC = true;
|
this.ilv_saved_profiles.UseWIC = true;
|
||||||
this.ilv_saved_profiles.View = Manina.Windows.Forms.View.HorizontalStrip;
|
this.ilv_saved_profiles.View = Manina.Windows.Forms.View.HorizontalStrip;
|
||||||
@ -1368,6 +1382,7 @@ namespace DisplayMagician.UIForms
|
|||||||
this.tabc_shortcut.ResumeLayout(false);
|
this.tabc_shortcut.ResumeLayout(false);
|
||||||
this.tabp_display.ResumeLayout(false);
|
this.tabp_display.ResumeLayout(false);
|
||||||
this.tabp_display.PerformLayout();
|
this.tabp_display.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).EndInit();
|
||||||
this.tabp_audio.ResumeLayout(false);
|
this.tabp_audio.ResumeLayout(false);
|
||||||
this.tabp_audio.PerformLayout();
|
this.tabp_audio.PerformLayout();
|
||||||
this.gb_capture_settings.ResumeLayout(false);
|
this.gb_capture_settings.ResumeLayout(false);
|
||||||
@ -1492,5 +1507,6 @@ namespace DisplayMagician.UIForms
|
|||||||
private System.Windows.Forms.Label lbl_game_library;
|
private System.Windows.Forms.Label lbl_game_library;
|
||||||
private System.Windows.Forms.ComboBox cbx_game_priority;
|
private System.Windows.Forms.ComboBox cbx_game_priority;
|
||||||
private System.Windows.Forms.Label lbl_game_priority;
|
private System.Windows.Forms.Label lbl_game_priority;
|
||||||
|
private System.Windows.Forms.PictureBox pbLogo;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1458,6 +1458,20 @@ namespace DisplayMagician.UIForms
|
|||||||
// And we need to update the actual selected profile too!
|
// And we need to update the actual selected profile too!
|
||||||
_profileToUse = profile;
|
_profileToUse = profile;
|
||||||
|
|
||||||
|
// And show the logo for the driver
|
||||||
|
if (_profileToUse.VideoMode == VIDEO_MODE.NVIDIA)
|
||||||
|
{
|
||||||
|
pbLogo.Image = PickBitmapBasedOnBgColour(BackColor, Properties.Resources.nvidiablack, Properties.Resources.nvidiawhite);
|
||||||
|
}
|
||||||
|
else if (_profileToUse.VideoMode == VIDEO_MODE.AMD)
|
||||||
|
{
|
||||||
|
pbLogo.Image = PickBitmapBasedOnBgColour(BackColor, Properties.Resources.amdblack, Properties.Resources.amdwhite);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pbLogo.Image = PickBitmapBasedOnBgColour(BackColor, Properties.Resources.winblack, Properties.Resources.winwhite);
|
||||||
|
}
|
||||||
|
|
||||||
// We also need to load the saved profile name to show the user
|
// We also need to load the saved profile name to show the user
|
||||||
lbl_profile_shown.Text = _profileToUse.Name;
|
lbl_profile_shown.Text = _profileToUse.Name;
|
||||||
|
|
||||||
@ -2318,6 +2332,18 @@ namespace DisplayMagician.UIForms
|
|||||||
string targetURL = @"https://github.com/terrymacdonald/DisplayMagician/wiki/Main-Game-and-Application-Examples";
|
string targetURL = @"https://github.com/terrymacdonald/DisplayMagician/wiki/Main-Game-and-Application-Examples";
|
||||||
System.Diagnostics.Process.Start(targetURL);
|
System.Diagnostics.Process.Start(targetURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Bitmap PickBitmapBasedOnBgColour(Color bgColour, Bitmap lightBitmap, Bitmap darkBitmap)
|
||||||
|
{
|
||||||
|
if ((bgColour.R * 0.299 + bgColour.G * 0.587 + bgColour.B * 0.114) > 186)
|
||||||
|
{
|
||||||
|
return darkBitmap;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return lightBitmap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Class used to populate combo boxes
|
// Class used to populate combo boxes
|
||||||
|
Loading…
Reference in New Issue
Block a user