Beispiel #1
0
        protected override void Run()
        {
            var proj = DefaultUploadToDeviceHandler.GetActiveExecutableMonoDroidProject();
            var conf = (MonoDroidProjectConfiguration)proj.GetConfiguration(IdeApp.Workspace.ActiveConfiguration);
            var dlg  = new MonoDevelop.MonoDroid.Gui.DeviceChooserDialog();

            if (MessageService.ShowCustomDialog(dlg) == (int)Gtk.ResponseType.Ok)
            {
                proj.SetDeviceTarget(conf, dlg.Device.ID);
            }
        }
Beispiel #2
0
        public static AndroidDevice ChooseDevice(Gtk.Window parent)
        {
            var dlg = new MonoDevelop.MonoDroid.Gui.DeviceChooserDialog();

            try {
                var result = MessageService.ShowCustomDialog(dlg, parent);
                if (result != (int)Gtk.ResponseType.Ok)
                {
                    return(null);
                }
                return(dlg.Device);
            } finally {
                dlg.Destroy();
            }
        }
		protected override void Run ()
		{
			var proj = DefaultUploadToDeviceHandler.GetActiveExecutableMonoDroidProject ();
			var conf = (MonoDroidProjectConfiguration) proj.GetConfiguration (IdeApp.Workspace.ActiveConfiguration);
			var dlg = new MonoDevelop.MonoDroid.Gui.DeviceChooserDialog ();
			if (MessageService.ShowCustomDialog (dlg) == (int)Gtk.ResponseType.Ok)
				proj.SetDeviceTarget (conf, dlg.Device.ID);
		}