예제 #1
0
 public MainUIWindow()
 {
     Glade.XML app = new Glade.XML("./gtksharptest.glade", "window1", "");
     app.Autoconnect(this);
     raiselower.Activate();
     commandqueue = UICommandQueue.GetInstance();
 }
예제 #2
0
 void on_raiselower_activate(object o, EventArgs e)
 {
     if (raiselower.Active)
     {
         Console.WriteLine("raiselower clicked" + e.ToString() + " " + ((Gtk.RadioButton)o).Name);
         UICommandQueue.GetInstance().Enqueue(new UICommandBrushEffect(UICommandBrushEffect.BrushEffect.RaiseLower));
     }
 }
예제 #3
0
 void on_flatten_activate(object o, EventArgs e)
 {
     if (flatten.Active)
     {
         Console.WriteLine("flatten clicked" + e.ToString() + " " + ((Gtk.RadioButton)o).Name);
         UICommandQueue.GetInstance().Enqueue(new UICommandBrushEffect(UICommandBrushEffect.BrushEffect.Flatten));
     }
 }
예제 #4
0
 HeightMapPersistence()
 {
     KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveheightmap", new KeyCommandHandler(SaveHandler));
     KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("loadheightmap", new KeyCommandHandler(LoadHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdNewHeightMap), new UICommandQueue.UICommandHandler(NewHeightMapHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdOpenHeightMap), new UICommandQueue.UICommandHandler(OpenHeightMapHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdSaveHeightMap), new UICommandQueue.UICommandHandler(SaveHeightMapHandler));
 }
예제 #5
0
        HeightEditor() // protected constructor to enforce singleton pattern
        {
            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("increaseheight", new KeyCommandHandler(handler_IncreaseHeight));
            KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("decreaseheight", new KeyCommandHandler(handler_DecreaseHeight));
            RendererFactory.GetInstance().Tick += new TickHandler(renderer_Tick);
            brushsize = Config.GetInstance().HeightEditingDefaultBrushSize;
            speed     = Config.GetInstance().HeightEditingSpeed;

            UICommandQueue.GetInstance().RegisterConsumer(typeof(UICommandChangeBrushSize), new UICommandQueue.UICommandHandler(ChangeBrushSize));
            UICommandQueue.GetInstance().RegisterConsumer(typeof(UICommandBrushEffect), new UICommandQueue.UICommandHandler(ChangeBrushEffect));
        }
예제 #6
0
 public void on_brushsize1_move_slider(object o, EventArgs e)
 {
     Console.WriteLine("New brushsize: " + brushsize.Value.ToString());
     UICommandQueue.GetInstance().Enqueue(new UICommandChangeBrushSize((int)brushsize.Value));
 }
예제 #7
0
 SlopeMapPersistence()
 {
     KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveslopemap", new KeyCommandHandler(SaveHandler));
     UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdExportSlopeMap), new UICommandQueue.UICommandHandler(ExportSlopeMapHandler));
 }
예제 #8
0
 public MainUIWindow()
 {
     Glade.XML app = new Glade.XML("./gtksharptest.glade", "window1", "");
     app.Autoconnect(this);
     raiselower.Activate();
     commandqueue = UICommandQueue.GetInstance();
 }