예제 #1
0
        /// <summary>
        /// Shows the popup and redirect.
        /// </summary>
        /// <param name="messageType">Type of the message.</param>
        /// <param name="title">The title.</param>
        /// <param name="message">The message.</param>
        /// <param name="buttons">The buttons.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="redirectUrl">The redirect URL.</param>
        /// <returns></returns>
        public static string ShowPopupAndRedirect(Constants.PopupType messageType, string title, string message,
                                                  Constants.PopupButtons buttons, int width, int height, string redirectUrl)
        {
            const string pageUrlFormat      = "{0}?Type={1}&Title={2}&Message={3}&Options={4}&isDlg=1";
            const string dialogStringFormat = "openInDialogAndRedirect({0}, {1}, false, true, '{2}','{3}');";

            string pageUrl = string.Format(pageUrlFormat, Constants.ShowMessagePage, messageType, title, message,
                                           buttons);
            string dialogString = string.Format(dialogStringFormat, width, height, pageUrl, redirectUrl);

            return(dialogString);
        }
예제 #2
0
        /// <summary>
        /// Shows the popup.
        /// </summary>
        /// <param name="messageType">Type of the message.</param>
        /// <param name="title">The title.</param>
        /// <param name="message">The message.</param>
        /// <param name="buttons">The buttons.</param>
        /// <param name="width">The width.</param>
        /// <param name="height">The height.</param>
        /// <param name="refreshPage">if set to <c>true</c> [refresh page].</param>
        /// <returns></returns>
        public static string ShowPopup(Constants.PopupType messageType, string title, string message,
                                       Constants.PopupButtons buttons, int width, int height, bool refreshPage)
        {
            const string pageUrlFormat      = "{0}?Type={1}&Title={2}&Message={3}&Options={4}&isDlg=1";
            const string dialogStringFormat = "openInDialog({0}, {1}, false, true, {2},'{3}');";

            string pageUrl = string.Format(pageUrlFormat, Constants.ShowMessagePage, messageType, title, message,
                                           buttons);
            string dialogString = string.Format(dialogStringFormat, width, height, refreshPage.ToString().ToLower(),
                                                pageUrl);

            return(dialogString);
        }
예제 #3
0
 public void ShowMessageBox(string title, string content, Constants.PopupType type, Constants.CallbackFunctionWithArg1 <object[]> func, object[] argues)
 {
     SetUpData(title, content, type);
     handler_int   = func;
     argue_listInt = argues;
 }
예제 #4
0
 public void ShowMessageBox(string title, string content, Constants.PopupType type, Constants.CallbackFunction func)
 {
     SetUpData(title, content, type);
     handler = func;
 }
예제 #5
0
 private void SetUpData(string title, string content, Constants.PopupType type)
 {
     image_type.sprite = sprites[(int)type];
     text_title.text   = title;
     text_content.text = content;
 }
예제 #6
0
 public void ShowMessageBox(string title, string content, Constants.PopupType type, Constants.CallbackFunctionWithArg1 <object[]> func, object[] argues)
 {
     popupWindow = Instantiate(popupPrefabs);
     popupWindow.GetComponent <PopUp>().ShowMessageBox(title, content, type, func, argues);
 }
예제 #7
0
 public void ShowMessageBox(string title, string content, Constants.PopupType type, Constants.CallbackFunction func = null)
 {
     popupWindow = Instantiate(popupPrefabs);
     popupWindow.GetComponent <PopUp>().ShowMessageBox(title, content, type, func);
 }