Exemplo n.º 1
0
        protected MainWindow(Gtk.Builder builder, IntPtr handle) : base(handle)
        {
            builder.Autoconnect(this);

            this.Icon = new Gdk.Pixbuf(null, "Booru.Resources.Pixbufs.icon.png");

            DeleteEvent += OnDeleteEvent;

            this.MainNotebook.AppendPage(MainTab.Create(), BigTabLabel.Create("Start"));
            this.MainNotebook.AppendPage(ImagesTab.Create(), BigTabLabel.Create("Images"));
            this.MainNotebook.AppendPage(VoteTab.Create(), BigTabLabel.Create("Vote"));
            this.MainNotebook.AppendPage(TagListTab.Create(), BigTabLabel.Create("Tags"));
            this.MainNotebook.AppendPage(ImportTab.Create(), BigTabLabel.Create("Import"));
            this.MainNotebook.AppendPage(ConfigTab.Create(), BigTabLabel.Create("Settings"));

            // when a search is to be executed, select images tab
            BooruApp.BooruApplication.EventCenter.ImageSearchRequested += (arg) => {
                this.MainNotebook.CurrentPage = 1;
            };

            this.KeyPressEvent += (o, args) => {
                if (args.Event.Key == Gdk.Key.F5)
                {
                    this.ToggleFullscreen();
                }
            };

            BooruApp.BooruApplication.EventCenter.Fullscreen(this.IsFullscreen);
        }
Exemplo n.º 2
0
 SimilarTagWidget Init(TagListTab parentTab)
 {
     this.parent = parentTab;
     return(this);
 }
Exemplo n.º 3
0
 public static SimilarTagWidget Create(TagListTab parentTab)
 {
     return(LoadableWidget.Create <SimilarTagWidget> ().Init(parentTab));
 }