예제 #1
0
        public Startup(Simulator sim)
            : base(Gtk.WindowType.Toplevel)
        {
            this.Build ();

            this.reactor = sim.getReactor();
            this.turbine = sim.getTurbine();
            this.rods = sim.getRods();

            this.spinbutton1.Value = this.reactor.Burnup;
            this.spinbutton2.Value = this.reactor.Boron;
            this.spinbutton8.Value = this.reactor.Flux;
            this.spinbutton6.Value = this.turbine.Power;
        }
예제 #2
0
    public MainWindow(Simulator sim)
        : base(Gtk.WindowType.Toplevel)
    {
        this.reactor = sim.getReactor();
        this.rods = sim.getRods();
        this.turbine = sim.getTurbine();
        Build();

        this.indicators = new Indicator[4] {
            new Indicator(delegate { return this.reactor.Flux; }, 0, 120, this.label28, this.vscale7),
            new Indicator(delegate { return this.turbine.Power; }, 0, 120, this.label30, this.vscale8),
            new Indicator(delegate { return this.reactor.Tavg; }, 280, 320, this.label32, this.vscale9),
            new Indicator(delegate { return this.turbine.Tref; }, 280, 320, this.label34, this.vscale10),
        };
        sim.Refresh();
        this.Refresh();
        GLib.Timeout.Add(1000, new GLib.TimeoutHandler(Refresh));
    }