public override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     receiver       = new DocBroadcastReceiver();
     ins            = this;
     HasOptionsMenu = true;
     Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("NjM3NThAMzEzNjJlMzQyZTMwVHJuMEhDdmh3djJBWnFSUTY3RjRPRlhVY3p6TWhuZk9rY3Nta2RPL0E2MD0=");
 }
Esempio n. 2
0
        void Menu_MenuItemClick(object sender, Android.Widget.PopupMenu.MenuItemClickEventArgs e)
        {
            string menuItemName = e.Item.TitleFormatted.ToString();

            switch (menuItemName)
            {
            case "ISO & Control Sheet":
                Pdfview_test mPDF = new Pdfview_test("http://webapps.npcc.ae/ApplicationWebServices/api/paperless/GetPDF?Type=" + inf_pdf_type.ISO + "&iProjectId=" + _iProjectId + "&cTransmittal=" + _cTransmittal + "&iDrwgSrl=" + _iDrwgSrl);
                Console.WriteLine("#############################");
                Console.WriteLine("http://webapps.npcc.ae/ApplicationWebServices/api/paperless/GetPDF?Type=" + inf_pdf_type.ISO + "&iProjectId=" + _iProjectId + "&cTransmittal=" + _cTransmittal + "&iDrwgSrl=" + _iDrwgSrl);
                common_functions.npcc_show_fragment(_currentContext, _mFragmentContainer, mPDF, _fragment);
                break;
            }
        }
        void Client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
        {
            WebClient wc        = (WebClient)sender;
            long      totalSize = long.Parse(wc.ResponseHeaders["Content-Length"]);

            if (Pdfview_test.getInstace().Activity == null)
            {
                client.CancelAsync();
                return;
            }
            Pdfview_test.getInstace().ProgressBar(totalSize, e.BytesReceived);
            if (e.TotalBytesToReceive == e.BytesReceived)
            {
                Intent message = new Intent("PDFDownloading");
                message.PutExtra("file_to_view", documentPath);
                SendBroadcast(message);
            }
        }
        public override void OnReceive(Context context, Intent intent)
        {
            string file_to_view = intent.GetStringExtra("file_to_view");

            Pdfview_test.getInstace().ShowPDFDoc(file_to_view);
        }