Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1642 for trunk/sources


Ignore:
Timestamp:
04/23/09 17:40:51 (16 years ago)
Author:
epitzer
Message:

suspend layout during dynamic GUI generation (#548)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence.GUI/3.3/PersistenceConfigurationForm.cs

    r1611 r1642  
    1010using HeuristicLab.Persistence.Default.Decomposers;
    1111using HeuristicLab.PluginInfrastructure;
     12using HeuristicLab.Persistence.Default.Decomposers.Storable;
    1213
    1314namespace HeuristicLab.Persistence.GUI {
     
    7475
    7576    private void UpdateDecomposerList(ListView decomposerList, Configuration config) {
     77      decomposerList.SuspendLayout();
    7678      decomposerList.Items.Clear();
    7779      var availableDecomposers = new Dictionary<string, IDecomposer>();
     
    9092        item.Tag = pair.Value;
    9193      }
     94      decomposerList.ResumeLayout();
    9295    }
    9396
    9497    private void UpdateFromConfigurationService() {
     98      configurationTabs.SuspendLayout();
    9599      foreach (IFormat format in ConfigurationService.Instance.Formats) {
    96100        Configuration config = ConfigurationService.Instance.GetConfiguration(format);
     
    102106          config);
    103107      }
     108      configurationTabs.ResumeLayout();
    104109    }
    105110
    106111    private void initializeConfigPages() {
     112      configurationTabs.SuspendLayout();
    107113      configurationTabs.TabPages.Clear();
    108114      foreach (IFormat format in ConfigurationService.Instance.Formats) {
     
    112118          Tag = format,
    113119        };
     120        page.SuspendLayout();
    114121        configurationTabs.TabPages.Add(page);
    115122        SplitContainer verticalSplit = new SplitContainer {
     
    118125          BorderStyle = BorderStyle.Fixed3D,
    119126        };
     127        verticalSplit.SuspendLayout();
    120128        page.Controls.Add(verticalSplit);
    121129        SplitContainer horizontalSplit = new SplitContainer {
     
    124132          BorderStyle = BorderStyle.Fixed3D,
    125133        };
     134        horizontalSplit.SuspendLayout();
    126135        verticalSplit.Panel1.Controls.Add(horizontalSplit);
    127136        ListView decomposerList = createDecomposerList();
     
    135144        };
    136145        horizontalSplit.Panel2.Controls.Add(checkBox);
    137       }
     146        horizontalSplit.ResumeLayout();
     147        verticalSplit.ResumeLayout();
     148        page.ResumeLayout();
     149      }
     150      configurationTabs.ResumeLayout();
    138151    }
    139152
     
    150163        AllowUserToOrderColumns = true,
    151164      };
     165      gridView.SuspendLayout();
    152166      gridView.CellValueChanged += gridView_CellValueChanged;
    153167      gridView.Columns.Add(new DataGridViewTextBoxColumn {
     
    163177        AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
    164178      });
     179      gridView.ResumeLayout();
    165180      return gridView;
    166181    }
     
    179194        View = View.Details
    180195      };
     196      decomposerList.SuspendLayout();
    181197      decomposerList.Resize += decomposerList_Resize;
    182198      decomposerList.ItemChecked += decomposerList_ItemChecked;
     
    193209        item.Tag = decomposer;
    194210      }
     211      decomposerList.ResumeLayout();
    195212      return decomposerList;
    196213    }
    197214
    198215    private void fillDataGrid(DataGridView gridView, IEnumerable<IFormatter> formatters) {
     216      gridView.SuspendLayout();
    199217      Dictionary<string, List<string>> formatterMap = createFormatterMap(formatters);
    200218      foreach (var formatterMapping in formatterMap) {
     
    214232        }
    215233      }
     234      gridView.ResumeLayout();
    216235    }
    217236
     
    270289        return;
    271290      ListBox checkBox = (ListBox)GetActiveControl("CheckBox");
     291      checkBox.SuspendLayout();
    272292      IFormat activeFormat = (IFormat)configurationTabs.SelectedTab.Tag;
    273293      if (activeFormat != null && checkBox != null) {
     
    280300          checkBox.Items.Add(decomposer.GetType().Name + " (D)");
    281301      }
     302      checkBox.ResumeLayout();
    282303    }
    283304
Note: See TracChangeset for help on using the changeset viewer.