Exemple #1
0
 partial void UpdatePublication(NSObject sender)
 {
     if (UpdateButton.Title == "Update")
     {
         UpdateButton.Title              = "Cancel";
         ProgressView.Hidden             = false;
         ProgressBar.MinValue            = 0;
         ProgressBar.MaxValue            = 1.0;
         ProgressStatusLabel.StringValue = "Downloading";
         StartDownloadWithoutLimitation(BookInfo, true);
     }
     else if (UpdateButton.Title == "Open")
     {
         IsOpenContentPanel = true;
         Window.PerformClose(sender);
     }
     else
     {
         string title  = "Cancel Updates";
         string errMsg = "Are you sure you want to cancel the updates?";
         nint   result = AlertSheet.RunConfirmAlert(title, errMsg);
         if (result == 1)
         {
             UpdateButton.Title = "Update";
             CancelUpdate(UpdateButton);
         }
     }
 }
        partial void logoutButtonClick(NSObject sender)
        {
            string title  = "Sign Out";
            string info   = "Thank you for using LexisNexis Red application.Are you sure you want to exit ?";
            nint   result = AlertSheet.RunConfirmAlert(title, info);

            if (result == (int)NSAlertType.DefaultReturn)
            {
                ConfirmLogout();
            }
            else
            {
                WindowStopModal();
            }
        }
        public override void MouseUp(NSEvent theEvent)
        {
            //base.MouseUp (theEvent);
            string title  = "Cancel Download";
            string errMsg = "Are you sure you want to cancel the download of this LexisNexis Red publication?";
            nint   result = AlertSheet.RunConfirmAlert(title, errMsg);

            if (result == 1)
            {
                if (superViewObj != null)
                {
                    ResetProgress();
                    superViewObj.CancelDownload();
                }
            }
        }