private void DirectConnectButton_Click(object sender, EventArgs e) { //clear print queues. PrintIO.AbortPrinting(); imageIO.DeleteAllFilesInDrectoryAndSubDirs(Globals.PrintDir); //PickDropGallery pickDropGallery = new PickDropGallery(); //pickDropGallery.Show(); //Set default value; //Globals.PrintSelection = Globals.PrintSize.A5; //Set user selected value. new PicSizeSeletion().ShowDialog(); this.Visible = false; USBConnectHelp usbform = new USBConnectHelp(); usbform.AnimationForm = this; usbform.TopMost = true; usbform.ShowDialog(); // Old implemetation of seacrhing images is commented. //AllImages = new List<ChitraKiAlbumAurVivaran>(); //waiter = new Waiter(); //waiter.Show(); //var progressIndicator = new Progress<ChitraKiAlbumAurVivaran>(ReportProgressForImageSearch); //lib.ChitraKhoj imgSearch = new ChitraKhoj(Globals.USBSearchPath); //Task waitToComplete = new Task(async ()=> //{ // await imgSearch.Search(progressIndicator); // if (InvokeRequired) // { // Invoke((Action<bool>)Done,false); // return; // } //}); //waitToComplete.Start(); }
private void PicsbgWorker_ProgressChanged(object sender, System.ComponentModel.ProgressChangedEventArgs e) { if (PrintState.alert && MessageBox.Show("Printing issue: " + ((PrinterState)e.UserState).status, "Print Error", MessageBoxButtons.RetryCancel) == DialogResult.Cancel) { PrintIO.AbortPrinting(); } if (e.ProgressPercentage == 25) { PrintStatusLbl.Text = "Printing receipt"; } if (e.ProgressPercentage == 50) { PrintStatusLbl.Text = "Printing pics"; } if (e.ProgressPercentage == 75) { PrintStatusLbl.Text = "Checking print status"; } }
private void WifiConnect_Click(object sender, EventArgs e) { //clear print queues. PrintIO.AbortPrinting(); imageIO.DeleteAllFilesInDrectoryAndSubDirs(Globals.PrintDir); //Set default value; //Globals.PrintSelection = Globals.PrintSize.A5; //Set user selected value. new PicSizeSeletion().ShowDialog(); this.Visible = false; if (whelp == null) { whelp = new WifiConnectHelp() { AnimationForm = this }; whelp.ShowDialog(); } else { whelp.Visible = true; } }
private void Button2_Click(object sender, EventArgs e) { //Cancel Print PrintIO.AbortPrinting(); }