示例#1
0
        private void PhysicsProfilerForm_Load(object sender, EventArgs e)
        {
            foreach (IScene scene in m_scenes)
            {
                RegionNameSelector.Items.Add(scene.RegionInfo.RegionName);
            }
            RegionNameSelector.SelectedIndex = 0;
            m_updateStats = new Timer {
                Interval = 10000, Enabled = true
            };
            m_updateStats.Elapsed += m_updateStats_Elapsed;
            m_updateStats.Start();

            InstantUpdatesSet.Hide();
            TimeBetweenUpdates.Hide();
            IULabel.Hide();

            UpdateStatsBars();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            m_useInstantUpdating = !m_useInstantUpdating;
            if (m_useInstantUpdating)
            {
                InstantUpdatesSet.Show();
                TimeBetweenUpdates.Show();
                IULabel.Show();

                button1.Text           = "Switch to Average Updating";
                m_updateStats.Interval = TimeToUpdate;
            }
            else
            {
                InstantUpdatesSet.Hide();
                TimeBetweenUpdates.Hide();
                IULabel.Hide();

                m_updateStats.Interval = 10000;
                button1.Text           = "Switch to Instant Updating";
            }

            UpdateStatsBars();
        }