Autoplay application что это
Перейти к содержимому

Autoplay application что это

Скачать AutoPlay Media Studio 8.3.0.0

AutoRun — c помощью этой программы вы сможете быстро создавать AutoRun-ы к своим CD, программа очень легко настраивается, имеет множество настроек и маленький размер.

EasyBoot — программное обеспечение, предназначенное для создания boot CD, оно поможет создать вам.

Бесплатное и простое в использовании ПО для создания, редактирования и записи ISO-образов.

AutoPlay Media Studio — Мощная программа для создания меню автозагрузки CD/DVD. Программа создает все необходимые файлы для автозапуска и его графическую оболочку.

Barts PE Builder — программа предназначенная для создания (записи) загрузочных CD или DVD дисков с.

WinISO это утилита для работы с образами дисков CD-ROM. Позволяет конвертировать форматы BIN и ISO.

AutoPlay Media Studio

AutoPlay Media Studio — это пакет для визуального создания меню AutoRun, которое появляется автоматически при вставке в привод CD или DVD. Имеет весьма богатый функционал и позволяет создавать меню профессионального качества. Но при этом очень легко осваивается и не требует каких-либо специальных знаний. Кроме того, для облегчения работы в состав уже входит набор готовых шаблонов для оформления меню с самыми разными кнопочками, картинками, звуками, скриптами и многим другим, позволяющим сделать удобные и красивые меню.

Помимо своего основного предназначения, AutoPlay Media Studio можно использовать для создания своих собственных интерактивных мультимедийных программ — разнообразных меню установки программного обеспечения, электронных визитных карточек, учебных материалов и т.д.

Auto-launching with AutoPlay

You can use AutoPlay to provide your app as an option when a user connects a device to their PC. This includes non-volume devices such as a camera or media player, or volume devices such as a USB thumb drive, SD card, or DVD. You can also use AutoPlay to offer your app as an option when users share files between two PCs by using proximity (tapping).

Note If you are a device manufacturer and you want to associate your Microsoft Store device app as an AutoPlay handler for your device, you can identify that app in the device metadata. For more info, see AutoPlay for Microsoft Store device apps.

Register for AutoPlay content

You can register apps as options for AutoPlay content events. AutoPlay content events are raised when a volume device such as a camera memory card, thumb drive, or DVD is inserted into the PC. Here we show how to identify your app as an AutoPlay option when a volume device from a camera is inserted.

In this tutorial, you created an app that displays image files or copies them to Pictures. You registered the app for the AutoPlay ShowPicturesOnArrival content event.

AutoPlay also raises content events for content shared between PCs using proximity (tapping). You can use the steps and code in this section to handle files that are shared between PCs that use proximity. The following table lists the AutoPlay content events that are available for sharing content by using proximity.

Action AutoPlay content event
Sharing music PlayMusicFilesOnArrival
Sharing videos PlayVideoFilesOnArrival

When files are shared by using proximity, the Files property of the FileActivatedEventArgs object contains a reference to a root folder that contains all of the shared files.

Step 1: Create a new project and add AutoPlay declarations

  1. Open Microsoft Visual Studio and select New Project from the File menu. In the Visual C# section, under Windows, select Blank App (Universal Windows). Name the app AutoPlayDisplayOrCopyImages and click OK.
  2. Open the Package.appxmanifest file and select the Capabilities tab. Select the Removable Storage and Pictures Library capabilities. This gives the app access to removable storage devices for camera memory, and access to local pictures.
  3. In the manifest file, select the Declarations tab. In the Available Declarations drop-down list, select AutoPlay Content and click Add. Select the new AutoPlay Content item that was added to the Supported Declarations list.
  4. An AutoPlay Content declaration identifies your app as an option when AutoPlay raises a content event. The event is based on the content of a volume device such as a DVD or a thumb drive. AutoPlay examines the content of the volume device and determines which content event to raise. If the root of the volume contains a DCIM, AVCHD, or PRIVATE\ACHD folder, or if a user has enabled Choose what to do with each type of media in the AutoPlay Control Panel and pictures are found in the root of the volume, then AutoPlay raises the ShowPicturesOnArrival event. In the Launch Actions section, enter the values from Table 1 below for the first launch action.
  5. In the Launch Actions section for the AutoPlay Content item, click Add New to add a second launch action. Enter the values in Table 2 below for the second launch action.
  6. In the Available Declarations drop-down list, select File Type Associations and click Add. In the Properties of the new File Type Associations declaration, set the Display Name field to AutoPlay Copy or Show Images and the Name field to image_association1. In the Supported File Types section, click Add New. Set the File Type field to .jpg. In the Supported File Types section, set the File Type field of the new file association to .png. For content events, AutoPlay filters out any file types that are not explicitly associated with your app.
  7. Save and close the manifest file.

Table 1

Setting Value
Verb show
Action Display Name Show Pictures
Content Event ShowPicturesOnArrival

The Action Display Name setting identifies the string that AutoPlay displays for your app. The Verb setting identifies a value that is passed to your app for the selected option. You can specify multiple launch actions for an AutoPlay event and use the Verb setting to determine which option a user has selected for your app. You can tell which option the user selected by checking the verb property of the startup event arguments passed to your app. You can use any value for the Verb setting except, open, which is reserved.

Table 2

Setting Value
Verb copy
Action Display Name Copy Pictures Into Library
Content Event ShowPicturesOnArrival

Step 2: Add XAML UI

Open the MainPage.xaml file and add the following XAML to the default <Grid> section.

Step 3: Add initialization code

The code in this step checks the verb value in the Verb property, which is one of the startup arguments passed to the app during the OnFileActivated event. The code then calls a method related to the option that the user selected. For the camera memory event, AutoPlay passes the root folder of the camera storage to the app. You can retrieve this folder from the first element of the Files property.

Open the App.xaml.cs file and add the following code to the App class.

Note The DisplayImages and CopyImages methods are added in the following steps.

Step 4: Add code to display images

In the MainPage.xaml.cs file add the following code to the MainPage class.

Step 5: Add code to copy images

In the MainPage.xaml.cs file add the following code to the MainPage class.

Step 6: Build and run the app

  1. Press F5 to build and deploy the app (in debug mode).
  2. To run your app, insert a camera memory card or another storage device from a camera into your PC. Then, select one of the content event options that you specified in your package.appxmanifest file from the AutoPlay list of options. This sample code only displays or copies pictures in the DCIM folder of a camera memory card. If your camera memory card stores pictures in an AVCHD or PRIVATE\ACHD folder, you will need to update the code accordingly. Note If you don’t have a camera memory card, you can use a flash drive if it has a folder named DCIM in the root and if the DCIM folder has a subfolder that contains images.

Register for an AutoPlay device

You can register apps as options for AutoPlay device events. AutoPlay device events are raised when a device is connected to a PC.

Here we show how to identify your app as an AutoPlay option when a camera is connected to a PC. The app registers as a handler for the WPD\ImageSourceAutoPlay event. This is a common event that the Windows Portable Device (WPD) system raises when cameras and other imaging devices notify it that they are an ImageSource using MTP. For more info, see Windows Portable Devices.

Important The Windows.Devices.Portable.StorageDevice APIs are part of the desktop device family. Apps can use these APIs only on Windows 10 devices in the desktop device family, such as PCs.

Step 1: Create a new project and add AutoPlay declarations

  1. Open Visual Studio and select New Project from the File menu. In the Visual C# section, under Windows, select Blank App (Universal Windows). Name the app AutoPlayDevice_Camera and click OK.
  2. Open the Package.appxmanifest file and select the Capabilities tab. Select the Removable Storage capability. This gives the app access to the data on the camera as a removable storage volume device.
  3. In the manifest file, select the Declarations tab. In the Available Declarations drop-down list, select AutoPlay Device and click Add. Select the new AutoPlay Device item that was added to the Supported Declarations list.
  4. An AutoPlay Device declaration identifies your app as an option when AutoPlay raises a device event for known events. In the Launch Actions section, enter the values in the table below for the first launch action.
  5. In the Available Declarations drop-down list, select File Type Associations and click Add. In the Properties of the new File Type Associations declaration, set the Display Name field to Show Images from Camera and the Name field to camera_association1. In the Supported File Types section, click Add New (if needed). Set the File Type field to .jpg. In the Supported File Types section, click Add New again. Set the File Type field of the new file association to .png. For content events, AutoPlay filters out any file types that are not explicitly associated with your app.
  6. Save and close the manifest file.

The Action Display Name setting identifies the string that AutoPlay displays for your app. The Verb setting identifies a value that is passed to your app for the selected option. You can specify multiple launch actions for an AutoPlay event and use the Verb setting to determine which option a user has selected for your app. You can tell which option the user selected by checking the verb property of the startup event arguments passed to your app. You can use any value for the Verb setting except, open, which is reserved. For an example of using multiple verbs in a single app, see Register for AutoPlay content.

Step 2: Add assembly reference for the desktop extensions

The APIs required to access storage on a Windows Portable Device, Windows.Devices.Portable.StorageDevice, are part of the desktop desktop device family. This means a special assembly is required to use the APIs and those calls will only work on a device in the desktop device family (such as a PC).

  1. In Solution Explorer, right click on References and then Add Reference. .
  2. Expand Universal Windows and click Extensions.
  3. Then select Windows Desktop Extensions for the UWP and click OK.

Step 3: Add XAML UI

Open the MainPage.xaml file and add the following XAML to the default <Grid> section.

Step 4: Add activation code

The code in this step references the camera as a StorageDevice by passing the device information Id of the camera to the FromId method. The device information Id of the camera is obtained by first casting the event arguments as DeviceActivatedEventArgs, and then getting the value from the DeviceInformationId property.

Open the App.xaml.cs file and add the following code to the App class.

Note The ShowImages method is added in the following step.

Step 5: Add code to display device information

You can obtain information about the camera from the properties of the StorageDevice class. The code in this step displays the device name and other info to the user when the app runs. The code then calls the GetImageList and GetThumbnail methods, which you will add in the next step, to display thumbnails of the images stored on the camera

In the MainPage.xaml.cs file, add the following code to the MainPage class.

Note The GetImageList and GetThumbnail methods are added in the following step.

Step 6: Add code to display images

The code in this step displays thumbnails of the images stored on the camera. The code makes asynchronous calls to the camera to get the thumbnail image. However, the next asynchronous call doesn’t occur until the previous asynchronous call completes. This ensures that only one request is made to the camera at a time.

In the MainPage.xaml.cs file, add the following code to the MainPage class.

Step 7: Build and run the app

  1. Press F5 to build and deploy the app (in debug mode).
  2. To run your app, connect a camera to your machine. Then select the app from the AutoPlay list of options. Note Not all cameras advertise for the WPD\ImageSource AutoPlay device event.

Configure removable storage

You can identify a volume device such as a memory card or thumb drive as an AutoPlay device when the volume device is connected to a PC. This is especially useful when you want to associate a specific app for AutoPlay to present to the user for your volume device.

Here we show how to identify your volume device as an AutoPlay device.

To identify your volume device as an AutoPlay device, add an autorun.inf file to the root drive of your device. In the autorun.inf file, add a CustomEvent key to the AutoRun section. When your volume device connects to a PC, AutoPlay will find the autorun.inf file and treat your volume as a device. AutoPlay will create an AutoPlay event by using the name that you supplied for the CustomEvent key. You can then create an app and register the app as a handler for that AutoPlay event. When the device is connected to the PC, AutoPlay will show your app as a handler for your volume device. For more info on autorun.inf files, see autorun.inf entries.

Step 1: Create an autorun.inf file

In the root drive of your volume device, add a file named autorun.inf. Open the autorun.inf file and add the following text.

Step 2: Create a new project and add AutoPlay declarations

Open Visual Studio and select New Project from the File menu. In the Visual C# section, under Windows, select Blank App (Universal Windows). Name the application AutoPlayCustomEvent and click OK.

Open the Package.appxmanifest file and select the Capabilities tab. Select the Removable Storage capability. This gives the app access to the files and folders on removable storage devices.

In the manifest file, select the Declarations tab. In the Available Declarations drop-down list, select AutoPlay Content and click Add. Select the new AutoPlay Content item that was added to the Supported Declarations list.

Note Alternatively, you can also choose to add an AutoPlay Device declaration for your custom AutoPlay event.

In the Launch Actions section for your AutoPlay Content event declaration, enter the values in the table below for the first launch action.

In the Available Declarations drop-down list, select File Type Associations and click Add. In the Properties of the new File Type Associations declaration, set the Display Name field to Show .ms Files and the Name field to ms_association. In the Supported File Types section, click Add New. Set the File Type field to .ms. For content events, AutoPlay filters out any file types that aren’t explicitly associated with your app.

Save and close the manifest file.

The Content Event value is the text that you supplied for the CustomEvent key in your autorun.inf file. The Action Display Name setting identifies the string that AutoPlay displays for your app. The Verb setting identifies a value that is passed to your app for the selected option. You can specify multiple launch actions for an AutoPlay event and use the Verb setting to determine which option a user has selected for your app. You can tell which option the user selected by checking the verb property of the startup event arguments passed to your app. You can use any value for the Verb setting except, open, which is reserved.

Step 3: Add XAML UI

Open the MainPage.xaml file and add the following XAML to the default <Grid> section.

Step 4: Add activation code

The code in this step calls a method to display the folders in the root drive of your volume device. For the AutoPlay content events, AutoPlay passes the root folder of the storage device in the startup arguments passed to the application during the OnFileActivated event. You can retrieve this folder from the first element of the Files property.

Open the App.xaml.cs file and add the following code to the App class.

Note The DisplayFiles method is added in the following step.

Step 5: Add code to display folders

In the MainPage.xaml.cs file add the following code to the MainPage class.

Step 6: Build and run the qpp

  1. Press F5 to build and deploy the app (in debug mode).
  2. To run your app, insert a memory card or another storage device into your PC. Then select your app from the list of AutoPlay handler options.

AutoPlay event reference

The AutoPlay system allows apps to register for a variety of device and volume (disk) arrival events. To register for AutoPlay content events, you must enable the Removable Storage capability in your package manifest. This table shows the events that you can register for and when they are raised.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *