Ejemplo n.º 1
0
 public cSnSet()
 {
     for (int i = 0; i < SnCodeSet.Length; i++)
     {
         SnCodeSet[i] = new cSnCodeSet();
     }
 }
Ejemplo n.º 2
0
        private cSnCodeSet DataFrmToClass()
        {
            cSnCodeSet tmpSnCodeSet = new cSnCodeSet();

            try
            {
                tmpSnCodeSet.FengSu = -1;
                if (cMain.JiQiStr[cMain.IndexLanguage].Split(',')[cbbMachine.SelectedIndex] == ("变频SN机") || cMain.JiQiStr[cMain.IndexLanguage].Split(',')[cbbMachine.SelectedIndex].IndexOf("内销旧指令") >= 0)
                {
                    switch (cbbFengSu.Text)
                    {
                    case "室内风机关":
                        tmpSnCodeSet.FengSu = 0;
                        break;

                    case "高风":
                        tmpSnCodeSet.FengSu = 1;
                        break;

                    case "中风":
                        tmpSnCodeSet.FengSu = 2;
                        break;

                    case "低风":
                        tmpSnCodeSet.FengSu = 3;
                        break;
                    }
                }
                if (cMain.JiQiStr[cMain.IndexLanguage].Split(',')[cbbMachine.SelectedIndex].IndexOf("AA") >= 0 || cMain.JiQiStr[cMain.IndexLanguage].Split(',')[cbbMachine.SelectedIndex] == "假PQ")
                {
                    if (cbbFengSu.Text == "高风(双风机)")
                    {
                        tmpSnCodeSet.FengSu = 0;
                    }
                    if (cbbFengSu.Text == "低风(风机1)")
                    {
                        tmpSnCodeSet.FengSu = 1;
                    }
                    if (cbbFengSu.Text == "低风(风机2)")
                    {
                        tmpSnCodeSet.FengSu = 2;
                    }
                    if (cbbFengSu.Text == "风机关")
                    {
                        tmpSnCodeSet.FengSu = 3;
                    }
                }
                tmpSnCodeSet.IsDanLen   = chkDanLen.Checked;
                tmpSnCodeSet.IsKuaiJian = chkKuaiJian.Checked;
                tmpSnCodeSet.MoShi      = -1;
                if (cbbMoshi.Text == "停机")
                {
                    tmpSnCodeSet.MoShi = 0;
                }
                if (cbbMoshi.Text == "制冷")
                {
                    tmpSnCodeSet.MoShi = 1;
                }
                if (cbbMoshi.Text == "制热")
                {
                    tmpSnCodeSet.MoShi = 2;
                }
                if (cbbMoshi.Text == "送风")
                {
                    tmpSnCodeSet.MoShi = 3;
                }
                tmpSnCodeSet.NeiJiNeng = -1;
                if (cMain.JiQiStr[cMain.IndexLanguage].Split(',')[cbbMachine.SelectedIndex].IndexOf("新变频") >= 0)
                {
                    if (cbbNengJi.Text == "0.8匹(22机)")
                    {
                        tmpSnCodeSet.NeiJiNeng = 0;
                    }
                    if (cbbNengJi.Text == "1匹(25,26,28机)")
                    {
                        tmpSnCodeSet.NeiJiNeng = 1;
                    }
                    if (cbbNengJi.Text == "1.2匹(32机)")
                    {
                        tmpSnCodeSet.NeiJiNeng = 2;
                    }
                    if (cbbNengJi.Text == "1.5匹(35机)")
                    {
                        tmpSnCodeSet.NeiJiNeng = 3;
                    }
                }
                tmpSnCodeSet.NengLi = Num.IntParse(txtNengLi.Text);
                tmpSnCodeSet.PinLv  = Num.IntParse(txtPinLv.Text);
            }
            catch (Exception exc)
            {
                cMain.WriteErrorToLog("frmMideaSn:DataFrmToClass:" + exc.Message);
            }
            return(tmpSnCodeSet);
        }