示例#1
0
文件: Burn.cs 项目: xuanximoming/PIC
        //获取完CD信息后发生的事件
        private void drive_OnDoneCDInfo(INeroCDInfo pCDInfo)
        {
            m_drive.OnDoneCDInfo -= m_evOnDoneCDInfo;

            this.Cursor = Cursors.Default;
            NeroCDInfo cdInfo = (NeroCDInfo)pCDInfo;

            if (cdInfo != null)
            {
                double discSize = (double)cdInfo.TotalCapacity * (double)2048;
                l_DiscSize.Text = this.FormatFileSize(discSize);           //光盘大小
                string discType = m_Nero.get_TypeNameOfMedia(cdInfo.MediaType);
                this.lb_DiscType.Text = discType;                          //光盘类型
                NERO_MEDIA_TYPE nmt    = pCDInfo != null ? pCDInfo.MediaType : NERO_MEDIA_TYPE.NERO_MEDIA_NONE;
                NeroSpeeds      speeds = m_drive.get_AvailableSpeeds(NERO_ACCESSTYPE.NERO_ACCESSTYPE_WRITE, nmt);
                foreach (int iSpeed in speeds)
                {
                    float fSpeed = iSpeed / (float)speeds.BaseSpeedKBs;
                    cmb_BurnSpeed.Items.Add("x (" + iSpeed.ToString() + " kb/s)");
                }
            }
            else
            {
                l_DiscSize.Text  = "";
                lb_DiscType.Text = "";
                cmb_BurnSpeed.Items.Clear();
                cmb_BurnSpeed.Text = "";
            }
            txt_PATIENT_NAME.Focus();
        }
示例#2
0
        private void PopulateForm()
        {
            l_product.Text = _disc.ProductName;
            l_info.Text = _message;
            tB_licence.Text = _licensekey;
            
            switch (_disc.MediaType)
            {
                case MediaType.CompactDisc:
                    l_requireddisc.Text = "CD";
                    break;
                case MediaType.DigitalVersatileDisc:
                    l_requireddisc.Text = "DVD";
                    break;
                default:
                    if (Thread.CurrentThread.CurrentUICulture.Name == "en")
                        MessageBox.Show("An error occured. Please contact your administrator", "Ein Fehler trat auf");
                    else MessageBox.Show("Ein Fehler trat auf, bitte wenden Sie sich an den Administrator", "Ein Fehler trat auf");
                    DialogResult = DialogResult.Cancel;
                    break;
            }


            // use the selected burner as the currently used drive
            _drive = (NeroDrive)MainForm.Drives.Item(cB_burner.SelectedIndex);

            NERO_MEDIA_TYPE type = ConvertMediaTypeToNERO_MEDIA_TYPE(_disc.MediaType);

            // update the info of the disc
            _drive.UpdateDeviceInfo(type);
            
            // show the speeds in the combo box
            cB_speeds.Items.Clear();
            
            NeroSpeeds _speeds = _drive.get_AvailableSpeeds(NERO_ACCESSTYPE.NERO_ACCESSTYPE_WRITE, type);

            for (int i = 0; i < _speeds.Count; i++)
            {
                float speed = _speeds.Item(i) /(float) _speeds.BaseSpeedKBs;
                cB_speeds.Items.Add(((speed) + "x (" + _speeds.Item(i) + " KB/s)"));
            }

            if (cB_speeds.Items.Count > 0)
                cB_speeds.SelectedIndex = cB_speeds.Items.Count - 1;
        }
示例#3
0
        private void PopulateForm()
        {
            l_product.Text = _disc.ProductName;
            l_info.Text = _message;
            tB_licence.Text = _licensekey;

            switch (_disc.MediaType)
            {
                case MediaType.CompactDisc:
                    l_requireddisc.Text = "CD";
                    break;
                case MediaType.DigitalVersatileDisc:
                    l_requireddisc.Text = "DVD";
                    break;
                default:
                    if (Thread.CurrentThread.CurrentUICulture.Name == "en")
                        MessageBox.Show("An error occured. Please contact your administrator", "Ein Fehler trat auf");
                    else MessageBox.Show("Ein Fehler trat auf, bitte wenden Sie sich an den Administrator", "Ein Fehler trat auf");
                    DialogResult = DialogResult.Cancel;
                    break;
            }

            // use the selected burner as the currently used drive
            _drive = (NeroDrive)MainForm.Drives.Item(cB_burner.SelectedIndex);

            NERO_MEDIA_TYPE type = ConvertMediaTypeToNERO_MEDIA_TYPE(_disc.MediaType);

            // update the info of the disc
            _drive.UpdateDeviceInfo(type);

            // show the speeds in the combo box
            cB_speeds.Items.Clear();

            NeroSpeeds _speeds = _drive.get_AvailableSpeeds(NERO_ACCESSTYPE.NERO_ACCESSTYPE_WRITE, type);

            for (int i = 0; i < _speeds.Count; i++)
            {
                float speed = _speeds.Item(i) /(float) _speeds.BaseSpeedKBs;
                cB_speeds.Items.Add(((speed) + "x (" + _speeds.Item(i) + " KB/s)"));
            }

            if (cB_speeds.Items.Count > 0)
                cB_speeds.SelectedIndex = cB_speeds.Items.Count - 1;
        }