protected virtual void ApplyLayout(string strLayoutName) { _views.SaveLayout(this); if (_strLayoutName != strLayoutName) { _strLayoutName = strLayoutName; _views.LoadLayout(this); } }
private void columnsContextMenu_Click(object sender, EventArgs eventArgs) { try { var column = _columnContextMenu.Tag as DataGridViewColumn; if (column != null) { var item = (ToolStripItem)sender; column.AutoSizeMode = (DataGridViewAutoSizeColumnMode)item.Tag; } /////////////////////////////////////////////////////////////////////////////// _columnContextMenu.Tag = null; _views.SaveLayout(_view); } catch (Exception ex) { MainForm.ShowExceptionMessage(ex); } }