Beispiel #1
0
 private void IsIdentityManaged_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         bool isIdentityManaged = ProtectionPolicyManager.IsIdentityManaged(Scenario1.m_EnterpriseIdentity);
         rootPage.NotifyUser("IsIdentityManaged: " + isIdentityManaged, NotifyType.StatusMessage);
     }
     catch (Exception ex)
     {
         rootPage.NotifyUser("Exception thrown:" + ex.ToString(), NotifyType.ErrorMessage);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 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().
        /// </summary>
        public App()
        {
            this.InitializeComponent();
            this.Suspending += OnSuspending;

            bool use_WIP_APIs = false;

            var enterpriseId      = "microsoft.com1";
            var isIdentityManaged = ProtectionPolicyManager.IsIdentityManaged(enterpriseId);

            if ((ApiInformation.IsApiContractPresent
                     ("Windows.Security.EnterpriseData.EnterpriseDataContract", 3) &&
                 ProtectionPolicyManager.IsProtectionEnabled))
            {
                use_WIP_APIs = true;
            }
            else
            {
                use_WIP_APIs = false;
            }
        }
Beispiel #3
0
        private void IsIdentityManaged_Click(object sender, RoutedEventArgs e)
        {
            bool isIdentityManaged = ProtectionPolicyManager.IsIdentityManaged(Scenario1.m_enterpriseId);

            rootPage.NotifyUser("IsIdentityManaged: " + isIdentityManaged, NotifyType.StatusMessage);
        }