コード例 #1
0
ファイル: CDChanger.cs プロジェクト: ChrisH4rding/xenadmin
        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
ファイル: CDChanger.cs プロジェクト: heiden-deng/xenadmin
        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();
        }