예제 #1
0
        private async void GetStreamStatus_Click(object sender, RoutedEventArgs e)
        {
            if (m_protectedStream != null)
            {
                DataProtectionInfo procStatus = await DataProtectionManager.GetStreamProtectionInfoAsync(m_protectedStream.GetInputStreamAt(0));

                string outputStr = "\n m_protectedStream protection status: " + procStatus.Status;
                rootPage.NotifyUser(outputStr, NotifyType.StatusMessage);
            }
            else
            {
                string outputStr = "\nStream is null because ProtectStream API did not run successfully";
                rootPage.NotifyUser(outputStr, NotifyType.ErrorMessage);
            }
        }
        private async void GetBuffersStatus_Click(object sender, RoutedEventArgs e)
        {
            string outputStr = "";

            if (m_protectedBuffer != null)
            {
                DataProtectionInfo procStatus = await DataProtectionManager.GetProtectionInfoAsync(m_protectedBuffer);

                outputStr += "\n protection status: " + procStatus.Status;
                rootPage.NotifyUser(outputStr, NotifyType.StatusMessage);
            }
            else
            {
                outputStr += "\n Buffer is null because Protect API did not run successfully";
                rootPage.NotifyUser(outputStr, NotifyType.ErrorMessage);
            }
        }