Пример #1
0
        public HeatLeakVisualizer(SimulatorStub simulator)
        {
            InitializeComponent();

            this.simulator = simulator;
            this.materials = simulator.GetMaterials();
            this.coolers   = simulator.GetCoolers();

            simulator.SimulationChangedEvent += new EventHandler(simulator_SimulationChangedEvent);
            update();
        }
Пример #2
0
        public CoolerPicker(SimulatorStub simulator)
        {
            InitializeComponent();

            Cooler[] coolers = simulator.GetCoolers();
            coolersListBox.Items.Clear();
            for (int i = 0; i < coolers.Length; i++)
            {
                coolersListBox.Items.Add(coolers[i]);
            }
            coolersListBox.SelectedIndex = 0;

            powerFactorTrackBar.Minimum       = 1;
            powerFactorTrackBar.Maximum       = TRACKBAR_PRECISION;
            powerFactorTrackBar.Value         = TRACKBAR_PRECISION;
            powerFactorTrackBar.TickFrequency = TRACKBAR_PRECISION / 10;

            this.FormClosing += new FormClosingEventHandler(CoolerPicker_FormClosing);
        }