Пример #1
0
        void ShowQuantitativeContent()
        {
            dgValues.Columns.Clear();
            tbxUOM.Text     = "";
            gUOM.Visibility = Visibility.Visible;

            DataGridTextColumn Col1 = new DataGridTextColumn();

            Col1.Header  = "Значение";
            Col1.Width   = new DataGridLength(195);
            Col1.Binding = new Binding("name_value");
            dgValues.Columns.Add(Col1);

            DataGridTextColumn Col2 = new DataGridTextColumn();

            Col2.Header     = "Численное выражение";
            Col1.Width      = new DataGridLength(180);
            Col2.IsReadOnly = true;
            Col2.Binding    = new Binding("value");
            dgValues.Columns.Add(Col2);

            lQuantitativeRow = new List <QuantitativeRow>();
            for (int i = 1; i < 6; i++)
            {
                QuantitativeRow Row = new QuantitativeRow(i, i);
                lQuantitativeRow.Add(Row);
            }

            dgValues.ItemsSource = null;
            dgValues.ItemsSource = lQuantitativeRow;
        }
Пример #2
0
        private void ParseCritValue()
        {
            if (Criterions.Criterions.qualit_crit)
            {
                lQualitativeRow = new List <QualitativeRow>();

                string[] ltmpValidValues = Criterions.CritValue.valid_values.Split(new char[] { ';' });
                for (int i = 0; i < 5; i++)
                {
                    QualitativeRow Row = new QualitativeRow(ltmpValidValues[i], i + 1);
                    lQualitativeRow.Add(Row);
                }
            }
            else
            {
                lQuantitativeRow = new List <QuantitativeRow>();

                string[] ltmpValidValues = Criterions.CritValue.valid_values.Split(new char[] { ';' });
                for (int i = 0; i < 5; i++)
                {
                    QuantitativeRow Row = new QuantitativeRow(double.Parse(ltmpValidValues[i]), i + 1);
                    lQuantitativeRow.Add(Row);
                }
                UOM = ltmpValidValues[5];
            }
        }