public MainUIWindow() { Glade.XML app = new Glade.XML("./gtksharptest.glade", "window1", ""); app.Autoconnect(this); raiselower.Activate(); commandqueue = UICommandQueue.GetInstance(); }
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)); } }
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)); } }
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)); }
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)); }
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)); }
SlopeMapPersistence() { KeyFilterConfigMappingsFactory.GetInstance().RegisterCommand("saveslopemap", new KeyCommandHandler(SaveHandler)); UICommandQueue.GetInstance().RegisterConsumer(typeof(CmdExportSlopeMap), new UICommandQueue.UICommandHandler(ExportSlopeMapHandler)); }
public MainUIWindow() { Glade.XML app = new Glade.XML("./gtksharptest.glade", "window1", ""); app.Autoconnect(this); raiselower.Activate(); commandqueue = UICommandQueue.GetInstance(); }