2001-06-27 03:58:39 +04:00
|
|
|
|
|
|
|
namespace Silverstone.Manticore.App
|
|
|
|
{
|
|
|
|
using System;
|
|
|
|
using System.ComponentModel;
|
|
|
|
using System.Windows.Forms;
|
|
|
|
using System.Collections;
|
|
|
|
|
|
|
|
using Silverstone.Manticore.BrowserWindow;
|
2001-06-28 04:19:25 +04:00
|
|
|
using Silverstone.Manticore.Preferences;
|
2001-06-27 03:58:39 +04:00
|
|
|
|
|
|
|
public class ManticoreApp
|
|
|
|
{
|
|
|
|
// XXX Need to do something here more similar
|
|
|
|
// to what mozilla does here for parameterized
|
|
|
|
// window types.
|
2001-06-28 04:19:25 +04:00
|
|
|
private Queue mBrowserWindows;
|
|
|
|
private Preferences mPreferences;
|
|
|
|
|
|
|
|
public Preferences Prefs {
|
|
|
|
get {
|
|
|
|
return mPreferences;
|
|
|
|
}
|
|
|
|
}
|
2001-06-27 03:58:39 +04:00
|
|
|
|
|
|
|
public ManticoreApp()
|
|
|
|
{
|
2001-06-28 04:19:25 +04:00
|
|
|
mBrowserWindows = new Queue();
|
|
|
|
|
|
|
|
// Initialize default and user preferences
|
|
|
|
mPreferences = new Preferences();
|
2001-06-28 04:39:40 +04:00
|
|
|
mPreferences.InitializeDefaults("default-prefs.xml");
|
2001-06-28 04:19:25 +04:00
|
|
|
mPreferences.LoadPreferencesFile("user-prefs.xml");
|
2001-06-27 03:58:39 +04:00
|
|
|
|
|
|
|
OpenNewBrowser();
|
|
|
|
|
|
|
|
Application.Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Opens and displays a new browser window
|
|
|
|
public void OpenNewBrowser()
|
|
|
|
{
|
|
|
|
BrowserWindow window = new BrowserWindow(this);
|
2001-06-28 04:19:25 +04:00
|
|
|
mBrowserWindows.Enqueue(window);
|
2001-06-27 03:58:39 +04:00
|
|
|
window.Show();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void Main(string[] args)
|
|
|
|
{
|
|
|
|
ManticoreApp app = new ManticoreApp();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|