// ------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------- public DialogSystemColors(SystemColor color) { InitializeComponent(); Control = new DialogSystemColorControl(color); ViewModelBindingSource.DataSource = Control; panelColor.BackColor = color.GetWinformsColor(); textBoxName.Select(); InitializeDataBindings(); }
// ------------------------------------------------------------------- // Constructor // ------------------------------------------------------------------- public SystemDatas(string gameName) { // Game name and langages GameName = new Dictionary <string, string>(); Langs = new List <string>(new string[] { "eng" }); for (int i = 0; i < Langs.Count; i++) { GameName[Langs[i]] = gameName; } // Path RTP PathRTP = Path.Combine(WANOK.ExcecutablePathDir, "RTP"); // Get defaults lists Colors = SystemColor.GetDefaultColors(); // Switches for (int i = 1; i <= 500; i++) { Switches.Add(new SuperListItemNameWithoutLang(i)); } }
// ------------------------------------------------------------------- // GetMonogameColor // ------------------------------------------------------------------- public static Microsoft.Xna.Framework.Color GetMonogameColor(SystemColor c) { return(new Microsoft.Xna.Framework.Color(c.Color[0], c.Color[1], c.Color[2])); }
// ------------------------------------------------------------------- // GetColor // ------------------------------------------------------------------- public static Color GetColor(int id) { return(SystemColor.GetMonogameColor(Game.System.GetColorById(id))); }
// ------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------- public DialogSystemColorControl(SystemColor color) { Model = color; }