~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/extensions/manticore/core/ServiceManager.cs

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C#; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 
2
 *
 
3
 * The contents of this file are subject to the Mozilla Public License
 
4
 * Version 1.1 (the "License"); you may not use this file except in
 
5
 * compliance with the License. You may obtain a copy of the License at
 
6
 * http://www.mozilla.org/MPL/ 
 
7
 * 
 
8
 * Software distributed under the License is distributed on an "AS IS" basis,
 
9
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
10
 * for the specific language governing rights and limitations under the
 
11
 * License. 
 
12
 *
 
13
 * The Original Code is Manticore.
 
14
 * 
 
15
 * The Initial Developer of the Original Code is
 
16
 * Silverstone Interactive. Portions created by Silverstone Interactive are
 
17
 * Copyright (C) 2001 Silverstone Interactive. 
 
18
 *
 
19
 * Alternatively, the contents of this file may be used under the
 
20
 * terms of the GNU Public License (the "GPL"), in which case the
 
21
 * provisions of the GPL are applicable instead of those above.
 
22
 * If you wish to allow use of your version of this file only
 
23
 * under the terms of the GPL and not to allow others to use your
 
24
 * version of this file under the MPL, indicate your decision by
 
25
 * deleting the provisions above and replace them with the notice
 
26
 * and other provisions required by the GPL.  If you do not delete
 
27
 * the provisions above, a recipient may use your version of this
 
28
 * file under either the MPL or the GPL.
 
29
 *
 
30
 * Contributor(s):
 
31
 *  Ben Goodger <ben@netscape.com> (Original Author)
 
32
 *
 
33
 */
 
34
 
 
35
namespace Silverstone.Manticore.Core
 
36
{
 
37
  using Silverstone.Manticore.App;
 
38
 
 
39
  /// <summary>
 
40
  /// Access point to application-global services. 
 
41
  /// </summary>
 
42
  public class ServiceManager
 
43
  {
 
44
    private static Silverstone.Manticore.Core.Preferences mPreferences = null;
 
45
    public static Silverstone.Manticore.Core.Preferences Preferences 
 
46
    {
 
47
      get 
 
48
      {
 
49
        // Initialize default and user preferences
 
50
        if (mPreferences == null) 
 
51
        {
 
52
          mPreferences = new Preferences();
 
53
          mPreferences.InitializeDefaults();
 
54
          mPreferences.LoadUserPreferences();
 
55
        }
 
56
        return mPreferences;
 
57
      }
 
58
    }
 
59
 
 
60
    private static Silverstone.Manticore.Bookmarks.Bookmarks mBookmarks = null;
 
61
    public static Silverstone.Manticore.Bookmarks.Bookmarks Bookmarks
 
62
    {
 
63
      get 
 
64
      {
 
65
        // Start the Bookmarks Service if it has not already been initialized
 
66
        if (mBookmarks == null) 
 
67
        {
 
68
          mBookmarks = new Silverstone.Manticore.Bookmarks.Bookmarks();
 
69
          mBookmarks.LoadBookmarks();
 
70
        }
 
71
        return mBookmarks;
 
72
      }
 
73
    }
 
74
 
 
75
    private static Silverstone.Manticore.Core.WindowMediator mWindowMediator = null;
 
76
    public static Silverstone.Manticore.Core.WindowMediator WindowMediator
 
77
    {
 
78
      get 
 
79
      {
 
80
        if (mWindowMediator == null) 
 
81
          mWindowMediator = new Silverstone.Manticore.Core.WindowMediator();
 
82
        return mWindowMediator;
 
83
      }
 
84
    }
 
85
 
 
86
    internal static Silverstone.Manticore.App.ManticoreApp mApp = null;
 
87
    public static Silverstone.Manticore.App.ManticoreApp App
 
88
    {
 
89
      get 
 
90
      {
 
91
        return mApp;
 
92
      }
 
93
    }
 
94
  }
 
95
}
 
 
b'\\ No newline at end of file'