本文整理汇总了C#中CameraCaptureTask类的典型用法代码示例。如果您正苦于以下问题:C# CameraCaptureTask类的具体用法?C# CameraCaptureTask怎么用?C# CameraCaptureTask使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CameraCaptureTask类属于命名空间,在下文中一共展示了CameraCaptureTask类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
cameraCapture = new CameraCaptureTask();
cameraCapture.Completed += cameraCapture_Completed;
}
开发者ID:sabbour,项目名称:photoblobber,代码行数:8,代码来源:MainPage.xaml.cs
示例2: RecipeDetailPage
public RecipeDetailPage()
{
InitializeComponent();
camera = new CameraCaptureTask();
camera.Completed += camera_Completed;
}
开发者ID:WindowsPhone-8-TrainingKit,项目名称:HOL-InAppPurchaseAndTrialConversion,代码行数:7,代码来源:RecipeDetailPage.xaml.cs
示例3: PicEffect
//DateTime lastTouchUpdate;
public PicEffect()
{
InitializeComponent();
// Init vars
oldViewportSize = new Size(Viewport.ActualWidth, Viewport.ActualHeight);
wasResized = false;
// Attach touch event handler
Touch.FrameReported += Touch_FrameReported;
// Init tasks
cameraCaptureTask = new CameraCaptureTask();
cameraCaptureTask.Completed += PhotoProviderTaskCompleted;
photoChooserTask = new PhotoChooserTask();
photoChooserTask.Completed += PhotoProviderTaskCompleted;
// Disable the camera button if the app runs in the emulator
// Todo: The BtnCamera reference returns null in WP7 v1
// BtnCamera.IsEnabled = Microsoft.Devices.Environment.DeviceType != DeviceType.Emulator;
// That's why we have to use this more hacky trick:
var buttons = ApplicationBar.Buttons.Cast<Microsoft.Phone.Shell.ApplicationBarIconButton>();
var btn = buttons.Where(b => b.IconUri.ToString().ToLower().Contains("camera")).FirstOrDefault();
//if (btn != null)
//{
//btn.IsEnabled = Microsoft.Devices.Environment.DeviceType != DeviceType.Emulator;
//}
BackKeyPress += OnBackKeyPressed;
}
开发者ID:kshark27,项目名称:ZuPix,代码行数:30,代码来源:PicEffect.xaml.cs
示例4: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
_cameraTask = new CameraCaptureTask();
_cameraTask.Completed += cameraTask_Completed;
}
开发者ID:rolkun,项目名称:WP8Kochbuch,代码行数:8,代码来源:MainPage.xaml.cs
示例5: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
camera = new CameraCaptureTask();
camera.Completed += new EventHandler<PhotoResult>(camera_Completed);
}
开发者ID:douglasstarnes,项目名称:mnugwp7,代码行数:8,代码来源:MainPage.xaml.cs
示例6: MainPage
public MainPage()
{
InitializeComponent();
_captureCamera = new CameraCaptureTask();
_captureCamera.Completed += _captureCamera_Completed;
}
开发者ID:lhlima,项目名称:CollaborationProjects,代码行数:7,代码来源:MainPage.xaml.cs
示例7: BtnTakePictureClick
private void BtnTakePictureClick(object sender, RoutedEventArgs e)
{
var captureTask = new CameraCaptureTask();
_geoLocationManager.RetrieveCurrentLocation();
captureTask.Completed += (s, a) =>
{
try
{
if (a.Error == null && a.TaskResult == TaskResult.OK && a.ChosenPhoto != null)
{
var photo = new Photo
{
Latitude = _geoLocationManager.Latitude,
Longitude = _geoLocationManager.Longitude
};
var bytes = new byte[a.ChosenPhoto.Length];
a.ChosenPhoto.Read(bytes, 0, bytes.Length);
a.ChosenPhoto.Close();
photo.ImageBytes = bytes;
_persistenceManager.Add(photo);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
};
captureTask.Show();
}
开发者ID:douglaszuniga,项目名称:Reportero-Digital,代码行数:30,代码来源:MainPage.xaml.cs
示例8: Scan
public Scan()
{
InitializeComponent();
cameraCaptureTask = new CameraCaptureTask();
Loaded += new RoutedEventHandler(SearchView_Loaded);
}
开发者ID:angelroic,项目名称:Upreal,代码行数:7,代码来源:Scan.xaml.cs
示例9: CameraCaptureCommand
public CameraCaptureCommand(object parameter)
{
_captureTask = new CameraCaptureTask();
_captureTask.Completed += CaptureTaskOnCompleted;
_viewModel = (MainViewModel) parameter;
}
开发者ID:n1rvana,项目名称:ZXing.NET,代码行数:7,代码来源:CameraCaptureCommand.cs
示例10: Save_the_captured_image
//Save the captured image to isolated storage
private void Save_the_captured_image(object sender, RoutedEventArgs e)
{
CameraCaptureTask photoCameraCapture = new CameraCaptureTask();
photoCameraCapture = new CameraCaptureTask();
photoCameraCapture.Completed += new EventHandler<PhotoResult>(photoCameraCapture_Completed);
photoCameraCapture.Show();
}
开发者ID:trilok567,项目名称:Windows-Phone,代码行数:8,代码来源:MainPage.xaml.cs
示例11: CreateLevel
public CreateLevel()
{
InitializeComponent();
cameraTask = new CameraCaptureTask();
cameraTask.Completed += new EventHandler<PhotoResult>(cameraTask_Completed);
}
开发者ID:Bulltrick,项目名称:DIY-PlatformerWP,代码行数:7,代码来源:CreateLevel.xaml.cs
示例12: StartLoop
public static void StartLoop()
{
CameraCaptureTask cameraCaptureTask = new CameraCaptureTask();
cameraCaptureTask.Completed += new EventHandler<PhotoResult>(cameraCaptureTask_Completed);
cameraCaptureTask.Show();
}
开发者ID:viperium,项目名称:WatchDogWP8,代码行数:7,代码来源:DriveLogic.cs
示例13: MessageBoxUserControl
public MessageBoxUserControl()
{
InitializeComponent();
_cameraCaptureTask = new CameraCaptureTask();
_cameraCaptureTask.Completed += cameraCaptureTask_Completed;
StatusTextCount.Text = string.Format("{0}/{1}", StatusUpdateBox.Text.Length, Constants.STATUS_LIMIT);
}
开发者ID:happy-ryo,项目名称:CrouMetro,代码行数:7,代码来源:MessageBoxUserControl.xaml.cs
示例14: captureImage
/// <summary>
/// Launches default camera application to capture image
/// </summary>
/// <param name="options">may contains limit or mode parameters</param>
public void captureImage(string options)
{
try
{
try
{
this.captureImageOptions = String.IsNullOrEmpty(options) ?
CaptureImageOptions.Default : JSON.JsonHelper.Deserialize<CaptureImageOptions>(options);
}
catch (Exception ex)
{
this.DispatchCommandResult(new PluginResult(PluginResult.Status.JSON_EXCEPTION, ex.Message));
return;
}
cameraTask = new CameraCaptureTask();
cameraTask.Completed += this.cameraTask_Completed;
cameraTask.Show();
}
catch (Exception e)
{
DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, e.Message));
}
}
开发者ID:hermwong,项目名称:phonegap-wp7,代码行数:29,代码来源:Capture.cs
示例15: NewImageVM
public NewImageVM(IMessageBus Messenger,
IStoreImages ImageStore) {
Messenger.Listen<IElementVM<MultimediaObject>>(MessageContracts.EDIT)
.Where(vm => vm.Model.MediaType == MediaType.Image && vm.Model.IsNew())
.SelectMany(mmo => {
var capture = new CameraCaptureTask();
var results =
Observable.FromEventPattern<PhotoResult>(h => capture.Completed += h, h => capture.Completed -= h)
.Select(ev => ev.EventArgs)
.Catch(Observable.Empty<PhotoResult>())
.Select(res => new { VM = mmo, Result = res })
.Take(1)
.Replay(1);
results.Connect();
try {
capture.Show();
}
catch (InvalidOperationException) {
}
return results;
})
.Where(tuple => tuple.VM != null
&& tuple.Result != null
&& tuple.Result.TaskResult == TaskResult.OK)
.Do(tuple => {
tuple.VM.Model.Uri = ImageStore.StoreImage(tuple.VM.Model.NewFileName(), tuple.Result);
})
.Select(t => t.VM as IElementVM<MultimediaObject>)
.ToMessage(Messenger, MessageContracts.SAVE);
}
开发者ID:rollingthunder,项目名称:DiversityMobile,代码行数:31,代码来源:NewImageVM.cs
示例16: nuevaFoto
public nuevaFoto()
{
InitializeComponent();
cameraCaptureTask = new CameraCaptureTask();
cameraCaptureTask.Completed += new EventHandler<PhotoResult>(cameraCaptureTask_Completed);
loadingBar.Visibility = Visibility.Visible;
loadingBar.IsIndeterminate = false;
}
开发者ID:JGFranco,项目名称:MemorableCam,代码行数:8,代码来源:nuevaFoto.xaml.cs
示例17: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
// Initialize the CameraCaptureTask and assign the Completed handler in the page constructor.
cameraCaptureTask = new CameraCaptureTask();
cameraCaptureTask.Completed += new EventHandler<PhotoResult>(cameraCaptureTask_Completed);
}
开发者ID:aabrohi,项目名称:kinect-kollage,代码行数:9,代码来源:Upload.xaml.cs
示例18: GetCaptureImageA
private void GetCaptureImageA(object obj)
{
CameraCaptureTask camera = new CameraCaptureTask();
camera.Show();
camera.Completed += new EventHandler<PhotoResult>(camera_a);
}
开发者ID:Handika-GEMkey,项目名称:SolidareNew,代码行数:8,代码来源:ViewModelRekomendasi.cs
示例19: MainPage
public MainPage()
{
InitializeComponent();
this.photoChooserTask = new PhotoChooserTask();
this.photoChooserTask.Completed += new EventHandler<PhotoResult>(photoChooserTask_Completed);
this.photoCameraCapture = new CameraCaptureTask();
this.photoCameraCapture.Completed += new EventHandler<PhotoResult>(photoCameraCapture_Completed);
}
开发者ID:harshitgoel96,项目名称:broogle_angelhack,代码行数:8,代码来源:MainPage.xaml.cs
示例20: PlayCreate_Click
private void PlayCreate_Click(object sender, RoutedEventArgs e)
{
//Create new instance of CameraCaptureClass
ctask = new CameraCaptureTask();
//Create new event handler for capturing a photo
ctask.Completed += new EventHandler<PhotoResult>(ctask_Completed);
ctask.Show();
}
开发者ID:hkgumbs,项目名称:panes,代码行数:9,代码来源:MainPage.xaml.cs
注:本文中的CameraCaptureTask类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论