• 大小: 90KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-08
  • 语言: C#
  • 标签: C#  获取图片  实时获取  

资源简介

c#.net 从相机里实时获取照片 仅供学习研究.

资源截图

代码片段和文件信息

// Copyright (c) Microsoft. All rights reserved.
using System;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Navigation;
using SDKTemplate;

namespace SDKTemplate
{
    /// 
    /// Provides application-specific behavior to supplement the default Application class.
    /// 

    sealed partial class App : Application
    {
        /// 
        /// Initializes the singleton Application object.  This is the first line of authored code
        /// executed and as such is the logical equivalent of main() or WinMain().
        /// 

        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;
        }

        /// 
        /// Invoked when the application is launched normally by the end user.  Other entry points
        /// will be used when the application is launched to open a specific file to display
        /// search results and so forth.
        /// 

        /// Details about the launch request and process.
        protected override async void OnLaunched(LaunchActivatedEventArgs args)
        {
            frame rootframe = Window.Current.Content as frame;

            // Do not repeat app initialization when the Window already has content
            // just ensure that the window is active
            
            if (rootframe == null)
            {
                // Create a frame to act as the navigation context and navigate to the first page
                rootframe = new frame();
                // Associate the frame with a SuspensionManager key                                
                SuspensionManager.Registerframe(rootframe “Appframe“);

                if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
                {
                    // Restore the saved session state only when appropriate
                    try
                    {
                        await SuspensionManager.RestoreAsync();
                    }
                    catch (SuspensionManagerException)
                    {
                        //Something went wrong restoring state.
                        //Assume there is no state and continue
                    }
                }

                // Place the frame in the current Window
                Window.Current.Content = rootframe;
            }
            if (rootframe.Content == null || !String.IsNullOrEmpty(args.Arguments))
            {
                // When the navigation stack isn‘t restored or there are launch arguments
                // indicating an alternate launch (e.g.: via toast or secondary tile) 
                // navigate to the appropriate page configuring the new page by passing required 
                // information as a n

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         916  2013-11-27 05:13  C#\App.xaml
     文件        4023  2013-11-27 05:13  C#\App.xaml.cs
     文件        6566  2013-11-27 05:13  C#\Constants.cs
     文件        9492  2013-11-27 05:13  C#\MainPage.xaml
     文件       12099  2013-11-27 05:13  C#\MainPage.xaml.cs
     文件        2305  2013-11-27 05:13  C#\Package.appxmanifest
     文件        5871  2013-11-27 05:13  C#\RemovableStorageCS.csproj
     文件        1174  2013-11-27 05:13  C#\RemovableStorageCS.sln
     文件        2427  2013-11-27 05:13  C#\S1_ListStorages.xaml
     文件        2806  2013-11-27 05:13  C#\S1_ListStorages.xaml.cs
     文件        3372  2013-11-27 05:13  C#\S2_SendToStorage.xaml
     文件        7384  2013-11-27 05:13  C#\S2_SendToStorage.xaml.cs
     文件        3792  2013-11-27 05:13  C#\S3_GetFromStorage.xaml
     文件        7026  2013-11-27 05:13  C#\S3_GetFromStorage.xaml.cs
     文件        2723  2013-11-27 05:13  C#\S4_Autoplay.xaml
     文件        6535  2013-11-27 05:13  C#\S4_Autoplay.xaml.cs
     文件        3405  2013-11-27 05:13  C#\assets\microsoft-sdk.png
     文件        8991  2013-11-27 05:13  C#\assets\placeholder-sdk.png
     文件        1248  2013-11-27 05:13  C#\assets\smallTile-sdk.png
     文件        5068  2013-11-27 05:13  C#\assets\splash-sdk.png
     文件        2482  2013-11-27 05:13  C#\assets\squareTile-sdk.png
     文件        1550  2013-11-27 05:13  C#\assets\storeLogo-sdk.png
     文件        2665  2013-11-27 05:13  C#\assets\tile-sdk.png
     文件        2997  2013-11-27 05:13  C#\assets\windows-sdk.png
     文件       23393  2013-11-27 05:13  C#\common\LayoutAwarePage.cs
     文件       59441  2013-11-27 05:13  C#\common\Standardstyles.xaml
     文件        1079  2013-11-27 05:13  C#\Properties\AssemblyInfo.cs
     文件        1901  2013-11-27 05:13  C#\sample-utils\SampleTemplatestyles.xaml
     文件       11477  2013-11-27 05:13  C#\sample-utils\SuspensionManager.cs
     文件       10117  2013-11-27 05:13  description.html
     文件        1670  2013-11-27 05:13  description\offline.js
............此处省略8个文件信息

评论

共有 条评论