void SetProperty(LayoutViewCustomizationForm form, GridControl obj, LayoutViewMode value)
            {
                var grid = GetAll(form.Controls[0], typeof(GridControl)).ElementAt(0);

                if (grid != null)
                {
                    obj = grid as GridControl;
                    (obj.MainView as LayoutView).OptionsView.ViewMode = PreviewLayoutViewMode;
                }
            }
            void SetProperty(LayoutViewCustomizationForm form, XtraTabControl obj, bool value)
            {
                var tab = GetAll(form.Controls[0], typeof(XtraTabControl)).ElementAt(0);

                if (tab != null)
                {
                    obj         = tab as XtraTabControl;
                    obj.Visible = value;
                }
            }
            void SetProperty(LayoutViewCustomizationForm form, NotePanelEx obj, string text, bool visibility)
            {
                var panel = GetAll(form.Controls[0], typeof(NotePanelEx)).ElementAt(0);

                if (panel != null)
                {
                    panel.Text    = text;
                    panel.Visible = visibility;
                }
            }
 public void SetCustomizationFormAppearance(LayoutViewCustomizationForm form)
 {
     form.Text = Text;
     SetProperty(form, "sbPreview", btnShowMoreCardsText, btnShowMoreCardsLocation);
     SetProperty(form, "btnApply", btnApplyText, btnApplyLocation);
     SetProperty(form, "btnOk", btnOkText, btnOkLocation);
     SetProperty(form, "btnCancel", btnCancelText, btnCancelLocation);
     SetProperty(form, new NotePanelEx(), HintPanelText, HintPanelVisible);
     SetProperty(form, new XtraTabPage(), TabPageEnabled);
     SetProperty(form, new XtraTabControl(), TabControlVisible);
     SetProperty(form, new GridControl(), PreviewLayoutViewMode);
 }
 void SetProperty(LayoutViewCustomizationForm form, string name, string value, Point location)
 {
     Control[] controls = form.Controls.Find(name, true);
     if (controls.Length > 0)
     {
         Control btn = controls[0];
         if (btn != null)
         {
             btn.Text     = value;
             btn.Location = location;
         }
     }
 }
Exemplo n.º 6
0
 private void layoutView_HideCustomization(object sender, EventArgs e)
 {
     DeleteButtons();
     if (_selectedColumn != null)
     {
         _selectedColumn.ImageIndex = -1;
     }
     _layoutView.Images = null;
     ((ListBoxControl)ActiveListBox).SelectedValueChanged += columnChooser_SelectedColumnChanged;
     ActiveListBox.KeyDown += ActiveListBox_KeyDown;
     _layoutControl         = null;
     _customizationFormCore = null;
     _selectedColumn        = null;
 }