1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using System.Globalization;
6
using ICSharpCode.Core;
8
namespace ICSharpCode.FormsDesigner.Services
10
sealed class DesignerResourceService : System.ComponentModel.Design.IResourceService
12
readonly ResourceStore store;
14
public DesignerResourceService(ResourceStore store)
17
throw new ArgumentNullException("store");
21
#region System.ComponentModel.Design.IResourceService interface implementation
22
public System.Resources.IResourceWriter GetResourceWriter(CultureInfo info)
25
LoggingService.Debug("ResourceWriter requested for culture: " + info.ToString());
26
return this.store.GetWriter(info);
27
} catch (Exception e) {
28
MessageService.ShowException(e);
33
public System.Resources.IResourceReader GetResourceReader(System.Globalization.CultureInfo info)
36
LoggingService.Debug("ResourceReader requested for culture: "+info.ToString());
37
return this.store.GetReader(info);
38
} catch (Exception e) {
39
MessageService.ShowException(e);