zoukankan      html  css  js  c++  java
  • windows8 后台传递下载

    后台传递下载示例
    这个示例演示了power-friendly,cost-aware和灵活的行为背景的传输API为Windows运行时应用程序
    void MainPage_Loaded(object sender, RoutedEventArgs e)
            {
                // Figure out what resolution and orientation we are in and respond appropriately
                CheckResolutionAndViewState();

                // Load the ScenarioList page into the proper frame
                ScenarioList.Navigate(Type.GetType(_rootNamespace + ".ScenarioList"), this);
            }

            #region Resolution and orientation code

            void DisplayProperties_LogicalDpiChanged(object sender)
            {
                CheckResolutionAndViewState();
            }

            void CheckResolutionAndViewState()
            {
                VisualStateManager.GoToState(this, ApplicationView.Value.ToString() + DisplayProperties.ResolutionScale.ToString(), false);
            }

            void MainPage_ViewStateChanged(ApplicationView sender, ApplicationViewStateChangedEventArgs args)
            {
                CheckResolutionAndViewState();
            }

            #endregion

            private void SetFeatureName(string str)
            {
                FeatureName.Text = str;
            }

            async void Footer_Click(object sender, RoutedEventArgs e)
            {
                await Windows.System.Launcher.LaunchUriAsync(new Uri(((HyperlinkButton)sender).Tag.ToString()));
            }

            public void NotifyUser(string strMessage, NotifyType type)
            {
                switch (type)
                {
                    case NotifyType.StatusMessage:
                        StatusBlock.Style = Resources["StatusStyle"as Style;
                        break;
                    case NotifyType.ErrorMessage:
                        StatusBlock.Style = Resources["ErrorStyle"as Style;
                        break;
                }
                StatusBlock.Text = strMessage;
            }

            public void DoNavigation(Type pageType, Frame frame)
            {
                frame.Navigate(pageType, this);
                if (pageType.Name.Contains("Input"))
                {
                    // Raise InputFrameLoaded so downstream pages know that the input frame content has been loaded.
                    if (InputFrameLoaded != null)
                    {
                        InputFrameLoaded(thisnew EventArgs());
                    }
                }
                else
                {
                    // Raise OutputFrameLoaded so downstream pages know that the output frame content has been loaded.
                    if (OutputFrameLoaded != null)
                    {
                        OutputFrameLoaded(thisnew EventArgs());
                    }
                }

            } 

     完整示例 /Files/risk/windows8/后台传递下载sample.rar

  • 相关阅读:
    Spark Locality Sensitive Hashing (LSH)局部哈希敏感
    Spark ChiSqSelector 卡方选择器
    图解开源协议
    如何使用Hasu USB to USB Controller Converter刷写tmk固件交换Caps和Ctrl
    使用PHP读取PHP文件并输出到屏幕上
    Mac修改显示器使支持原生缩放
    PHP中使用PDO的预处理功能避免SQL注入
    如何做数据库分页查询
    Chrome报错提示Unchecked runtime.lastError: The message port closed before a response was received.
    Parallels Desktop虚拟机无法关机提示“虚拟机处理器已被操作系统重置”
  • 原文地址:https://www.cnblogs.com/risk/p/2495479.html
Copyright © 2011-2022 走看看