Exemplo n.º 1
0
        public static void Load()
        {
            if (!File.Exists(_defaultCfgFile))
            {
                _current = new DxRendererOption();
            }
            else
            {
                _current = ObjectXMLSerializer <DxRendererOption> .Load(_defaultCfgFile);

                if (_current == null)
                {
                    _current = new DxRendererOption();
                }
            }
        }
Exemplo n.º 2
0
        private void LoadOptions()
        {
            DxRendererOptionCfg.Load();
            if (DxRendererOptionCfg.Current == null)
            {
                return;
            }

            DxRendererOption op = DxRendererOptionCfg.Current;

            grdView.OptionsCustomization.AllowFilter = op.AllowFilter;
            grdView.OptionsView.GroupDrawMode        = op.GroupDrawMode;
            grdView.OptionsView.ShowAutoFilterRow    = op.ShowAutoFilterRow;
            grdView.OptionsView.ShowFilterPanel      = op.ShowFilterPanel;
            grdView.OptionsView.ShowGroupPanel       = op.ShowGroupPanel;
            grdView.OptionsView.ColumnAutoWidth      = op.ColumnAutoWidth;
            grdView.OptionsView.RowAutoHeight        = op.RowAutoHeight;
            grd.UseEmbeddedNavigator = op.ShowNavigationBar;

            _loadingStyles    = true;
            cmbGridStyle.Text = op.CurrentStyleSchema;
            _loadingStyles    = false;
        }