|
|
|
@ -204,12 +204,7 @@ namespace ICSharpCode.SharpDevelop.Gui
@@ -204,12 +204,7 @@ namespace ICSharpCode.SharpDevelop.Gui
|
|
|
|
|
return; |
|
|
|
|
Busy = true; |
|
|
|
|
try { |
|
|
|
|
bool isPlainLayout = LayoutConfiguration.CurrentLayoutName == "Plain"; |
|
|
|
|
if (File.Exists(LayoutConfiguration.CurrentLayoutFileName)) { |
|
|
|
|
LoadLayout(LayoutConfiguration.CurrentLayoutFileName, isPlainLayout); |
|
|
|
|
} else if (File.Exists(LayoutConfiguration.CurrentLayoutTemplateFileName)) { |
|
|
|
|
LoadLayout(LayoutConfiguration.CurrentLayoutTemplateFileName, isPlainLayout); |
|
|
|
|
} |
|
|
|
|
TryLoadConfiguration(); |
|
|
|
|
} catch (Exception ex) { |
|
|
|
|
MessageService.ShowException(ex); |
|
|
|
|
// ignore errors loading configuration
|
|
|
|
@ -221,6 +216,22 @@ namespace ICSharpCode.SharpDevelop.Gui
@@ -221,6 +216,22 @@ namespace ICSharpCode.SharpDevelop.Gui
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void TryLoadConfiguration() |
|
|
|
|
{ |
|
|
|
|
bool isPlainLayout = LayoutConfiguration.CurrentLayoutName == "Plain"; |
|
|
|
|
if (File.Exists(LayoutConfiguration.CurrentLayoutFileName)) { |
|
|
|
|
try { |
|
|
|
|
LoadLayout(LayoutConfiguration.CurrentLayoutFileName, isPlainLayout); |
|
|
|
|
return; |
|
|
|
|
} catch (FileFormatException) { |
|
|
|
|
// error when version of AvalonDock has changed: ignore and load template instead
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (File.Exists(LayoutConfiguration.CurrentLayoutTemplateFileName)) { |
|
|
|
|
LoadLayout(LayoutConfiguration.CurrentLayoutTemplateFileName, isPlainLayout); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void LoadLayout(string fileName, bool hideAllLostPads) |
|
|
|
|
{ |
|
|
|
|
LoggingService.Info("Loading layout file: " + fileName + ", hideAllLostPads=" + hideAllLostPads); |
|
|
|
|