Ejemplo n.º 1
0
    public MindFire(string[] args)
    {
        Application.Init();
        Glade.XML gxml = new Glade.XML(null, "gui.glade", "mindFire", null);
        gxml.Autoconnect(this);

        playButtonPixbuf       = new Gdk.Pixbuf(null, "media-play.png");
        playButtonImage        = new Gtk.Image();
        playButtonImage.Pixbuf = playButtonPixbuf;
        startButton.Add(playButtonImage);
        startButton.Sensitive = false;
        startButton.Clicked  += new EventHandler(StartRsvp);
        startButton.ShowAll();

        stopButtonPixbuf       = new Gdk.Pixbuf(null, "media-stop.png");
        stopButtonImage        = new Gtk.Image();
        stopButtonImage.Pixbuf = stopButtonPixbuf;
        stopButton.Add(stopButtonImage);
        stopButton.Sensitive = false;
        stopButton.Clicked  += new EventHandler(StopRsvp);
        stopButton.ShowAll();

        prevButtonPixbuf       = new Gdk.Pixbuf(null, "media-prev.png");
        prevButtonImage        = new Gtk.Image();
        prevButtonImage.Pixbuf = prevButtonPixbuf;
        prevButton.Add(prevButtonImage);
        prevButton.Sensitive = false;
        prevButton.Clicked  += new EventHandler(PreviousWord);
        prevButton.ShowAll();

        nextButtonPixbuf       = new Gdk.Pixbuf(null, "media-next.png");
        nextButtonImage        = new Gtk.Image();
        nextButtonImage.Pixbuf = nextButtonPixbuf;
        nextButton.Add(nextButtonImage);
        nextButton.Sensitive = false;
        nextButton.Clicked  += new EventHandler(NextWord);
        nextButton.ShowAll();

        speedUp.Clicked   += new EventHandler(SpeedUp);
        speedDown.Clicked += new EventHandler(SpeedDown);

        startMenuItem.Sensitive = false;
        stopMenuItem.Sensitive  = false;
        slider.ValueChanged    += new EventHandler(SliderMoved);
        noteBook.SwitchPage    += new SwitchPageHandler(NoteBookChanged);
        icon          = new Gdk.Pixbuf(null, "mindFireMonkey.png");
        mindFire.Icon = icon;

        dateTime = System.DateTime.Now;

        config = new Config();

        noteBook.SetTabLabelPacking(noteBook.GetNthPage(0), true, true, Gtk.PackType.Start);
        ftLabel.ModifyFg(Gtk.StateType.Active, new Gdk.Color(127, 127, 127));
        riLabel.ModifyFg(Gtk.StateType.Active, new Gdk.Color(127, 127, 127));
        sgLabel.ModifyFg(Gtk.StateType.Active, new Gdk.Color(127, 127, 127));
        mlLabel.ModifyFg(Gtk.StateType.Active, new Gdk.Color(127, 127, 127));

        statusBar.Push(0, "Ready");
        ShowWord(curWord);
        Application.Run();
    }