Beispiel #1
0
        public PluginManager(PluginCore core, MainWindow window, Type type)
        {
            MainWindow = window;
            PluginCore = core;

            pluginType = type;
            plugin = Activator.CreateInstance(type) as Plugin;
            plugin.Init(this);
        }
Beispiel #2
0
        public PluginManager(PluginCore core, MainWindow window, Type type)
        {
            MainWindow = window;
            PluginCore = core;

            pluginType = type;
            plugin     = Activator.CreateInstance(type) as Plugin;
            plugin.Init(this);
        }
Beispiel #3
0
    internal MainWindow(string directory)
        : base(Gtk.WindowType.Toplevel)
    {
        log.Debug("Beginning Program");

        Build();

        roomeditor1.SetClient(areaviewer1);
        roomeditor1.SetObjectGroupEditor(objectgroupeditor1);
        dungeonMinimap.TileSelectedEvent += delegate(object sender) {
            Room room = dungeonMinimap.GetRoom();
            SetRoom(room);
        };
        worldMinimap.TileSelectedEvent += delegate(object sender) {
            Room room = worldMinimap.GetRoom();
            SetRoom(room);
        };

        areaviewer1.HoverChangedEvent += delegate() {
            if (areaviewer1.HoveringIndex == -1)
                statusbar1.Push(1,
                        "Selected Tile: 0x" + areaviewer1.SelectedIndex.ToString("X2"));
            else
                statusbar1.Push(1,
                        "Hovering Tile: 0x" + areaviewer1.HoveringIndex.ToString("X2"));
        };
        areaviewer1.TileSelectedEvent += delegate(object sender) {
            statusbar1.Push(1,
                    "Selected Tile: 0x" + areaviewer1.SelectedIndex.ToString("X2"));
        };

        roomeditor1.HoverChangedEvent += delegate() {
            if (roomeditor1.HoveringIndex == -1)
                statusbar1.Push(1,
                        "Selected Tile: 0x" + areaviewer1.SelectedIndex.ToString("X2"));
            else
                statusbar1.Push(2,
                        "Hovering Tile: (" + roomeditor1.HoveringX +
                        ", " + roomeditor1.HoveringY + ")");
        };

        worldSpinButton.Adjustment = new Adjustment(0, 0, 5, 1, 0, 0);
        dungeonSpinButton.Adjustment = new Adjustment(0, 0, 15, 1, 0, 0);

        pluginCore = new PluginCore(this);

        LoadPlugins();

        if (directory != "")
            OpenProject(directory);
    }