示例#1
0
        public MediaControl(MediaWriterComponent component)
            : base(component)
        {
            InitializeComponent();
            _component = component;
            SelectTreeView.DataBindings.Add("Tree", _component, "Tree", true, DataSourceUpdateMode.OnPropertyChanged);
            VolumeName.DataBindings.Add("Text", _component, "VolumeName", true, DataSourceUpdateMode.OnPropertyChanged);
            StagingFolder.DataBindings.Add("Text", _component, "StagingFolderPath", true, DataSourceUpdateMode.OnPropertyChanged);
            MediaWriter.DataBindings.Add("DataSource", _component, "MediaWriters", true, DataSourceUpdateMode.OnPropertyChanged);
            studylabel.DataBindings.Add("Text", _component, "NumberOfStudies", true, DataSourceUpdateMode.OnPropertyChanged);
            DiscInfo.DataBindings.Add("Text", _component, "CurrentMediaDescription", true, DataSourceUpdateMode.OnPropertyChanged);
            Caption.DataBindings.Add("Text", _component, "RequiredMediaSpace", true, DataSourceUpdateMode.OnPropertyChanged);
            BurningInfo.DataBindings.Add("Text", _component, "CurrentWriteStageName", true, DataSourceUpdateMode.OnPropertyChanged);
            BurnProgressBar.DataBindings.Add("Value", _component, "CurrentWriteStagePercent", true, DataSourceUpdateMode.OnPropertyChanged);
            CaptionInfo.DataBindings.Add("Value", _component, "CurrentMediaSpacePercent", true, DataSourceUpdateMode.OnPropertyChanged);

            Write.Click += delegate(object sender, EventArgs args)
            {
                _component.WriteMedia();
            };

            Cancel.Click += delegate(object sender, EventArgs e)
            {
                _component.Cancel();
            };

            Eject.Click += delegate(object sender, EventArgs e)
            {
                _component.EjectMedia();
            };

            ClearAll.Click += delegate(object sender, EventArgs args)
            {
                _component.ClearStudies();
            };

            DetectMedia.Click += delegate(object sender, EventArgs args)
            {
                _component.DetectMedia();
            };
        }
示例#2
0
 public void SetComponent(IApplicationComponent component)
 {
     _component = (MediaWriterComponent)component;
 }