Пример #1
0
 public MeasureRow(ValueRow row, string head = "", string strValue = "", int no = 0, int recNo = 0)
 {
     this.Row      = row;
     this.head     = head;
     this.strValue = strValue;
     this.No       = no;
     this.RecNo    = recNo;
     this.state    = EValueState.None;
 }
Пример #2
0
 public IntegralValue(ValueRow row, float setup = 0, float avg = 0, float dev = 0, int scanTime = 1, int integTime = 60)
 {
     this.row       = row;
     this.setup     = setup;
     this.avg       = avg;
     this.dev       = dev;
     this.scanTime  = scanTime;
     this.integTime = integTime;
     Clear();
 }
Пример #3
0
        public MeasureAirSideRow(string name, ValueRow id11Row,
                                 ValueRow id12Row, ValueRow id21Row, ValueRow id22Row, bool empty = false)
        {
            this.Name    = name;
            this.ID11Row = id11Row;
            this.ID12Row = id12Row;
            this.ID21Row = id21Row;
            this.ID22Row = id22Row;
            this.empty   = empty;

            this.Indoor11Enabled = true;
            this.Indoor12Enabled = true;
            this.Indoor21Enabled = true;
            this.Indoor22Enabled = true;
        }
Пример #4
0
        public ReportRow(string tag, ValueRow row, string alias = "", int count = 7)
        {
            RecNo = -1;
            Tag   = tag;
            Row   = row;
            Alias = alias;

            if (count > 7)
            {
                count = 7;
            }
            count++;

            float  value  = (Row == null) ? float.NaN : 0;
            string format = (Row == null) ? "" : Row.Format;

            Cells = new List <ReportCell>();
            for (int i = 0; i < count; i++)
            {
                Cells.Add(new ReportCell($"{Tag}-{i + 1}", value, format));
            }
        }
Пример #5
0
        public MeasureNozzleRow(string name,
                                float id11Diameter, ValueRow id11Row,
                                float id12Diameter, ValueRow id12Row,
                                float id21Diameter, ValueRow id21Row,
                                float id22Diameter, ValueRow id22Row)
        {
            Name = name;

            this.id11Diameter = id11Diameter;
            this.id12Diameter = id12Diameter;
            this.id21Diameter = id21Diameter;
            this.id22Diameter = id22Diameter;

            this.ID11Row = id11Row;
            this.ID12Row = id12Row;
            this.ID21Row = id21Row;
            this.ID22Row = id22Row;

            this.ID11Enabled = true;
            this.ID12Enabled = true;
            this.ID21Enabled = true;
            this.ID22Enabled = true;
        }
Пример #6
0
 public DataRaw(Int64 recNo = -1, ValueRow row = null)
 {
     RecNo = recNo;
     Row   = row;
 }
Пример #7
0
        private void Initialize()
        {
            // Load constant variables
            int    i     = 1;
            string key   = $"CH{i}";
            string param = Resource.Ini.GetString("Constant.Channel", key);

            Const.Clear();

            while (string.IsNullOrWhiteSpace(param) == false)
            {
                string[] @params = param.Split(new[] { ',' }, StringSplitOptions.None);

                EUnitType   type   = (EUnitType)Enum.Parse(typeof(EUnitType), @params[1]);
                int         unitNo = GetUnitNo(type, @params[2]);
                UnitConvert unit   = new UnitConvert(type, unitNo, unitNo);

                ValueRow row = new ValueRow(i - 1, @params[0], 0f, @params[3],
                                            unit, bool.Parse(@params[4]), bool.Parse(@params[5]), type);

                Const.Add(@params[0], row);

                i++;
                key   = $"CH{i}";
                param = Resource.Ini.GetString("Constant.Channel", key);
            }

            Const["Total.Rated.Capacity"].Unit.Enabled = false;
            Const["Total.Rated.EER_COP"].Unit.Enabled  = false;

            // Load calculated variables
            i     = 1;
            key   = $"CH{i}";
            param = Resource.Ini.GetString("Calculated.Channel", key);
            Calcurated.Clear();

            while (string.IsNullOrWhiteSpace(param) == false)
            {
                string[] @params = param.Split(new[] { ',' }, StringSplitOptions.None);

                EUnitType   type   = (EUnitType)Enum.Parse(typeof(EUnitType), @params[1]);
                int         unitNo = GetUnitNo(type, @params[2]);
                UnitConvert unit   = new UnitConvert(type, unitNo, unitNo);

                ValueRow row = new ValueRow(i - 1, @params[0], 0f, @params[3],
                                            unit, bool.Parse(@params[4]), bool.Parse(@params[5]), type);

                Calcurated.Add(@params[0], row);

                i++;
                key   = $"CH{i}";
                param = Resource.Ini.GetString("Calculated.Channel", key);
            }

            // Load measured variables
            i     = 1;
            key   = $"CH{i}";
            param = Resource.Ini.GetString("Measured.Channel", key);
            Measured.Clear();

            while (string.IsNullOrWhiteSpace(param) == false)
            {
                string[] @params = param.Split(new[] { ',' }, StringSplitOptions.None);

                EUnitType   type   = (EUnitType)Enum.Parse(typeof(EUnitType), @params[1]);
                int         unitNo = GetUnitNo(type, @params[2]);
                UnitConvert unit   = new UnitConvert(type, unitNo, unitNo);

                ValueRow row = new ValueRow(i - 1, @params[0], 0f, @params[3],
                                            unit, bool.Parse(@params[4]), bool.Parse(@params[5]), type);

                Measured.Add(@params[0], row);

                i++;
                key   = $"CH{i}";
                param = Resource.Ini.GetString("Measured.Channel", key);
            }

            foreach (KeyValuePair <string, ValueRow> row in Calcurated)
            {
                if (row.Value.Chart == true)
                {
                    Graph.Add(row.Key, row.Value);
                }
            }
            foreach (KeyValuePair <string, ValueRow> row in Measured)
            {
                if (row.Value.Chart == true)
                {
                    Graph.Add(row.Key, row.Value);
                }
            }
        }