예제 #1
0
        /// <summary>
        /// Creates a new instance of the <see cref="frmMain"/> form.
        /// </summary>
        public frmMain()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            settings = Settings.Instance();
            controller = new PluginController();
            pluginPaths = new ArrayList();
            controller.AttachLogger(rtblLog);
            controller.PluginStateChanged += new EventHandler(controller_PluginStateChanged);
            memUsage = 0;
            lblVersion.Text = "Version: " + Assembly.GetExecutingAssembly().GetName().Version.ToString();
        }
예제 #2
0
 /// <summary>
 /// Provides a global access point for the single instance of the <see cref="Settings"/>
 /// class.
 /// </summary>
 /// <returns>A reference to the single instance of <see cref="Settings"/>.</returns>
 public static Settings Instance()
 {
     if (instance==null)
     {
         lock(typeof(Settings))
         {
             if( instance == null )
             {
                 instance = new Settings();
             }
         }
     }
     return instance;
 }
 /// <summary>
 /// The constructor is private so that only the class itself can create an instance.
 /// </summary>
 private DBConnectionStringProvider()
 {
     connectionString = String.Empty;
     settings = Settings.Instance();
     LoadSettings();
 }
예제 #4
0
 /// <summary>
 /// The constructor is private so that only the class itself can create an instance.
 /// </summary>
 private GlobalSettingsProvider()
 {
     settings = Settings.Instance();
 }