Exemplo n.º 1
0
        public override void LoadForm()
        {
            base.LoadForm();
            SourceIDInput.Hide();
            SourceLabel.Hide();
            InHouseRadio.Hide();
            OutsourcedRadio.Hide();
            allPartsListDataGrid.DataSource = partsBindingList;
            allPartsListDataGrid.Columns["Price"].DefaultCellStyle.Format = "c";
            allPartsListDataGrid.Columns["Price"].HeaderText    = "Price/Cost Per Unit";
            allPartsListDataGrid.Columns["PartID"].HeaderText   = "Part ID";
            allPartsListDataGrid.Columns["CompanyName"].Visible = false;
            allPartsListDataGrid.Columns["MachineID"].Visible   = false;
            allPartsListDataGrid.Columns["Min"].Visible         = false;
            allPartsListDataGrid.Columns["Max"].Visible         = false;

            associatedPartsDataGrid.DataSource = associatedPartsBindingList;
            associatedPartsDataGrid.Columns["Price"].DefaultCellStyle.Format = "c";
            associatedPartsDataGrid.Columns["Price"].HeaderText    = "Price/Cost Per Unit";
            associatedPartsDataGrid.Columns["PartID"].HeaderText   = "Part ID";
            associatedPartsDataGrid.Columns["CompanyName"].Visible = false;
            associatedPartsDataGrid.Columns["MachineID"].Visible   = false;
            associatedPartsDataGrid.Columns["Min"].Visible         = false;
            associatedPartsDataGrid.Columns["Max"].Visible         = false;
        }
Exemplo n.º 2
0
        private void UpdateSources()
        {
            int count = 0;

            foreach (var source in ServiceManager.SourceManager.Sources)
            {
                if (!ShouldShowSource(source))
                {
                    continue;
                }

                SourceLabel label = null;
                if (count < labels.Count)
                {
                    label = labels[count];
                }
                else
                {
                    labels.Add(label = new SourceLabel());
                    PackStart(label, false, false, 0);
                    label.Show();
                }

                label.Source = source;
                count++;
            }

            for (int i = count; i < labels.Count; i++)
            {
                Remove(labels[i]);
            }

            labels.RemoveRange(count, labels.Count - count);
        }
Exemplo n.º 3
0
        private void UpdateSources()
        {
            int count = 0;

            foreach (var source in ServiceManager.SourceManager.Sources) {
                if (!ShouldShowSource (source)) {
                    continue;
                }

                SourceLabel label = null;
                if (count < labels.Count) {
                    label = labels[count];
                } else {
                    labels.Add (label = new SourceLabel ());
                    PackStart (label, false, false, 0);
                    label.Show ();
                }

                label.Source = source;
                count++;
            }

            for (int i = count; i < labels.Count; i++) {
                Remove (labels[i]);
            }

            labels.RemoveRange (count, labels.Count - count);
        }