public MainWindow(InvoiceDirectory idir_) : base(WindowType.Toplevel) { idir = idir_; SetSizeRequest(500, 500); Title = "Fakturering 2.6"; maingroup = new HBox(false, 0); buttons = new VButtonBox(); scrolledhd = new ScrolledWindow(); create = Button.NewWithLabel("Skapa ny faktura"); edit = Button.NewWithLabel("Redigera faktura"); delete = Button.NewWithLabel("Radera faktura"); showbut = Button.NewWithLabel("Visa faktura"); printbut = Button.NewWithLabel("Skriv ut faktura"); CreateListView(); Add(maingroup); maingroup.PackStart(scrolledhd, true, true, 0); maingroup.PackStart(buttons, false, false, 0); buttons.Layout = ButtonBoxStyle.Start; buttons.PackStart(create, false, false, 0); buttons.PackStart(edit, false, false, 0); buttons.PackStart(showbut, false, false, 0); buttons.PackStart(printbut, false, false, 0); buttons.PackStart(delete, false, false, 0); scrolledhd.AddWithViewport(listview); scrolledhd.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); UpdateHDList(); create.Clicked += new EventHandler(Create); edit.Clicked += new EventHandler(Edit); delete.Clicked += new EventHandler(DeleteInvoice); showbut.Clicked += new EventHandler(ShowInvoice); printbut.Clicked += new EventHandler(PrintInvoice); maingroup.ShowAll(); //Den här måste vara här då storleken inte är känd innan ScrollToEnd(scrolledhd); DeleteEvent += new Gtk.DeleteEventHandler(DeleteWindow); }
public DefaultWorkbench() { Title = BrandingService.ApplicationName; LoggingService.LogInfo ("Creating DefaultWorkbench"); WidthRequest = normalBounds.Width; HeightRequest = normalBounds.Height; DeleteEvent += new Gtk.DeleteEventHandler (OnClosing); SetAppIcons (); IdeApp.CommandService.SetRootWindow (this); }
public DefaultWorkbench() { Title = "MonoDevelop"; LoggingService.LogInfo ("Creating DefaultWorkbench"); WidthRequest = normalBounds.Width; HeightRequest = normalBounds.Height; DeleteEvent += new Gtk.DeleteEventHandler (OnClosing); if (Gtk.IconTheme.Default.HasIcon ("monodevelop")) Gtk.Window.DefaultIconName = "monodevelop"; else this.IconList = new Gdk.Pixbuf[] { ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.MonoDevelop, Gtk.IconSize.Menu), ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.MonoDevelop, Gtk.IconSize.Button), ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.MonoDevelop, Gtk.IconSize.Dnd), ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.MonoDevelop, Gtk.IconSize.Dialog) }; //this.WindowPosition = Gtk.WindowPosition.None; Gtk.Drag.DestSet (this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy); DragDataReceived += new Gtk.DragDataReceivedHandler (onDragDataRec); IdeApp.CommandService.SetRootWindow (this); }
public DefaultWorkbench() { Title = BrandingService.ApplicationName; LoggingService.LogInfo ("Creating DefaultWorkbench"); WidthRequest = normalBounds.Width; HeightRequest = normalBounds.Height; DeleteEvent += new Gtk.DeleteEventHandler (OnClosing); SetAppIcons (); //this.WindowPosition = Gtk.WindowPosition.None; Gtk.Drag.DestSet (this, Gtk.DestDefaults.Motion | Gtk.DestDefaults.Highlight | Gtk.DestDefaults.Drop, targetEntryTypes, Gdk.DragAction.Copy); DragDataReceived += new Gtk.DragDataReceivedHandler (onDragDataRec); IdeApp.CommandService.SetRootWindow (this); }