コード例 #1
0
        /// <summary>
        /// Updates all information about the current lane
        /// </summary>
        private void UpdateTimer_Tick(object sender, EventArgs e)
        {
            db.UpdateBins();
            BinChart.DataBind();

            AssemblyProgress.Value = (int)(db.GetAssemblyProgress() * AssemblyProgress.Maximum);
            RunnerProgress.Value   = (int)(db.GetRunnerProgress() * RunnerProgress.Maximum);

            RunnerSignal.Checked = db.IsRunnerRequired();
        }
コード例 #2
0
        public MainForm()
        {
            try
            {
                db = new Database();
            }catch (Exception e)
            {
                MessageBox.Show("Can not connect to database: " + e.Message);
                return;
            }

            InitializeComponent();

            workstationsBindingSource.DataSource = db.Lanes;

            BinChart.DataSource = db.Bins;
            BinChart.DataBind();

            UpdateTimer.Start();

            db.UpdateLanes();
            LaneSelector.SelectedIndex = 0;
        }