private void LoadStyles() { string fileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\DxRenderer.Appearances.xml"; try { _initializing = true; if (!File.Exists(fileName)) { string errStr = "Can not load style schemes. File not found: " + fileName; cmbGridStyle.BackColor = Color.FromArgb(255, 192, 192); toolTip1.SetToolTip(cmbGridStyle, errStr); HostServicesSingleton.HostServices.MsgService.ErrorMsg(errStr, MethodBase.GetCurrentMethod()); return; } _xApp = new XAppearances(fileName); cmbGridStyle.Items.Clear(); cmbGridStyle.Items.AddRange(_xApp.FormatNames); cmbGridStyle.Text = DxRendererOptionCfg.Current.CurrentStyleSchema; } finally { _initializing = false; } }
private void InitStyleSchemas() { if (!new FileInfo(_xtraGridAppearancesFile).Exists) { return; } var xapp = new XAppearances(_xtraGridAppearancesFile) { ShowNewStylesOnly = true }; cboSchemas.Properties.Items.Clear(); cboSchemas.Properties.Items.AddRange(xapp.FormatNames); }