private void LoadLayout() { if (!_layoutManager.LoadLayout()) { SetDefaultLayout(); } }
private void LoadLayout() { _layoutManager = new WindowsLayoutManager(mainContainer, GetStartupPanes()); if (!_layoutManager.LoadLayout()) { SetDefaultLayout(); } }
private void LoadLayout() { var res = _layoutManager.LoadLayout(); if (res == WindowsLayoutManager.LayoutResult.LayoutException) { Factory.GUIController.ShowMessage("Failed to load panel layout: the layout file may be corrupt or contains invalid data. The layout will be reset.", MessageBoxIcon.Error); } if (res != WindowsLayoutManager.LayoutResult.OK) { // Ask layout manager to restore using its own defaults if (!_layoutManager.ResetToDefaults()) { SetDefaultLayout(); // last chance fallback } } }
private void loadLayoutMenuItem_Click(object sender, EventArgs e) { string fileName = Factory.GUIController.ShowOpenFileDialog("Load layout...", XML_FILE_FILTER); if (fileName == null) { return; } if (_layoutManager.LoadLayout(fileName)) { Factory.GUIController.ShowMessage("Done!", MessageBoxIcon.Information); } else { Factory.GUIController.ShowMessage("Failed to load layout!", MessageBoxIcon.Error); } }