Ejemplo n.º 1
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));
    }
Ejemplo n.º 2
0
        // Use this for initialization
        private void Start()
        {
            //
            m_Indicators = this.GetComponentsInChildren<Indicator>();

            //
            if( m_Indicators == null || m_Indicators.Length <= 0 )
            {
                Debug.LogError( "There's not any Component:'Indicator'.", this );
                return;
            }

            //
            m_TweenAlphas = this.GetComponentsInChildren<TweenAlpha>();

            //
            if( m_TweenAlphas == null || m_TweenAlphas.Length <= 0 )
            {
                Debug.LogError( "There's not any Component:'TweenAlphas'.", this );
                return;
            }

            //
            if( m_Diffuse == null )
            {
                Debug.LogError( "The Diffuse has not assigned.", this );
                return;
            }

            //
            if( m_TransparentDiffuse == null )
            {
                Debug.LogError( "The TransparentDiffuse has not assigned.", this );
                return;
            }

            StartCoroutine( DelayInit() );
        }