示例#1
0
        public void OnPrinterPropertyChange(SPrinterProperty sp)
        {
            m_bInitControl = true;

            //m_ComboBoxUnit
            m_ComboBoxSpeed.Items.Clear();
            foreach (SpeedEnum mode in Enum.GetValues(typeof(SpeedEnum)))
            {
                if (mode == SpeedEnum.CustomSpeed)
                {
                    continue;
                }
                string cmode = ResString.GetEnumDisplayName(typeof(SpeedEnum), mode);
                m_ComboBoxSpeed.Items.Add(cmode);
            }
            this.m_ComboBoxSpeed.SelectedIndex = (int)this.m_EditJob.PrtFileInfo.sFreSetting.nSpeed;

            string passStr = (string)m_ComboBoxPass.SelectedItem;

            m_ComboBoxPass.Items.Clear();
#if false
            int    PassListNum;
            int [] PassList;
            sp.GetPassListNumber(out PassListNum, out PassList);
            for (int i = 0; i < PassListNum; i++)
            {
                int    passNum  = PassList[i];
                string dispPass = PassList[i].ToString() + " " + ResString.GetDisplayPass();
                m_ComboBoxPass.Items.Add(dispPass);
            }
            m_ComboBoxPass.SelectedIndex = FoundMatchPass(passStr);
#else
            for (int i = 0; i < CoreConst.MAX_PASS_NUM; i++)
            {
                //int passNum = PassList[i];
                string dispPass = (i + 1).ToString() + " " + ResString.GetDisplayPass();
                m_ComboBoxPass.Items.Add(dispPass);
            }
            m_ComboBoxPass.SelectedIndex = this.m_EditJob.PrtFileInfo.sFreSetting.nPass;
#endif
            m_bInitControl = false;
        }