コード例 #1
0
        /// <summary>
        /// Initializes a new instance of WPF window
        /// Can be called from any reponse or web [uAuth2.MyCustomClass.Test_InitWPFWindow]
        /// </summary>
        /// <returns></returns>
        public static string InitAuthWindow()
        {
            string retVal = string.Empty;

            if (authWindowThread == null)
            {
                // Creates window instance
                authWindowThread = new AuthWindowThread();
            }

            return(retVal);
        }
コード例 #2
0
        /// <summary>
        /// Closes the window
        /// Can be called from any reponse or web [uAuth2.MyCustomClass.Test_FormClose]
        /// </summary>
        /// <returns></returns>
        public static string Test_FormClose()
        {
            string retVal = string.Empty;

            if (authWindowThread != null)
            {
                authWindowThread.FormTest_Close();
                authWindowThread = null;
            }

            return(retVal);
        }
コード例 #3
0
        public static string InitAuthWindowAsync(string appName = null, string elementName = null)
        {
            string retVal = string.Empty;

            if (authWindowThread == null)
            {
                //retVal = await Task.Run(() =>
                //{
                // Creates window instance
                authWindowThread = new AuthWindowThread();
                retVal           = authWindowThread.AuthWindowThreadSync(appName, elementName);
                authWindowThread = null;
                //    return retVal;
                //});
            }

            return(retVal);
        }