コード例 #1
0
 public string OpenWebPage(string urlToOpen, string pinCode)
 {
     if (Settings.OpenItemsAutomatically)
     {
         return OpenWebPageInBrowser(urlToOpen);
     }
     else
     {
         currentRequestState = new OpenRequestState() { IsUrl = true, UrlToOpen = urlToOpen };
         icon.ShowBalloonTip(5, "BeCharming", "Click here to open " + urlToOpen, ToolTipIcon.Info);
         return "okay";
     }
 }
コード例 #2
0
 public string OpenDocument(string documentName, byte[] documentBytes, string pinCode)
 {
     if (Settings.OpenItemsAutomatically)
     {
         return OpenDocumentInBackground(documentName, documentBytes);
     }
     else
     {
         currentRequestState = new OpenRequestState() { IsUrl = false, DocumentName = documentName, DocumentBody = documentBytes };
         icon.ShowBalloonTip(3, "BeCharming", "Click here to open the file " + documentName, ToolTipIcon.Info);
         return "okay";
     }
 }
コード例 #3
0
        void icon_BalloonTipClicked(object sender, EventArgs e)
        {
            if (currentRequestState != null)
            {
                if (currentRequestState.IsUrl)
                {
                    OpenWebPageInBrowser(currentRequestState.UrlToOpen);
                }
                else
                {
                    OpenDocumentInBackground(currentRequestState.DocumentName, currentRequestState.DocumentBody);
                }

                currentRequestState = null;
            }
        }