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

  • 相关阅读:
    dstat
    centos安装指定版本的golang
    APP防CC为什么复杂
    火狐浏览器的书签如何自动在新窗口打开?
    linux jdk版本随时切换
    centos7 yum安装java环境
    kangle清除缓存接口
    CC攻击原理及防范方法
    GET 和 POST 的区别 以及为什么 GET请求 比 POST请求 更快
    HTTP缓存机制
  • 原文地址:https://www.cnblogs.com/risk/p/2495479.html
Copyright © 2011-2022 走看看