示例#1
0
        public void ChangeCD(VDI vdi)
        {
            changing = true;
            Enabled = false;

            ChangeVMISOAction action =
                new ChangeVMISOAction(connection, vm, vdi, cdrom);

            action.Completed += new EventHandler<EventArgs>(delegate(Object o, EventArgs f)
                                                                {
                                                                    Program.Invoke(this, delegate()
                                                                                             {
                                                                                                 changing = false;
                                                                                                 SelectCD();
                                                                                                 Enabled = true;
                                                                                             });
                                                                });

            action.RunAsync();
        }
示例#2
0
        public void ChangeCD(VDI vdi)
        {
            changing = true;
            Enabled = false;

            ChangeVMISOAction action =
                new ChangeVMISOAction(connection, vm, vdi, cdrom);

            action.Completed += delegate
                {
                    Program.Invoke(this, delegate()
                        {
                            changing = false;
                            SelectCD();
                            Enabled = true;
                        });
                };

            action.RunAsync();
        }