private void btnGenerateBarcode_Click(object sender, EventArgs e) { GenerateBarcode frmGenerateBarcode = new GenerateBarcode(); frmGenerateBarcode.Show(); frmGenerateBarcode.FormClosed += FormClosed; }
public void TestProcedureIpAdress() { Select auto = new Select(); StickerCode sticker = new StickerCode(); var technical = auto.SelecTechnic("B80GАGA000847"); GenerateBarcode qrCode = new GenerateBarcode(); qrCode.GenerateQrCode(technical, "C:\\Testing\\"); sticker.CreateDocum("C:\\Testing\\", technical, null); //File.Delete(technical.Name); // return sticker.FileArray(); }
private void Update() { if (ServerUrl == null && Server.ServerUrl != null) { ServerUrl = Server.ServerUrl; var qrCode = GenerateBarcode.GenerateQR(ServerUrl); QrCode = qrCode; var sprite = Sprite.Create(QrCode, new Rect(0, 0, QrCode.width, QrCode.height), Vector2.zero); if (ImageElement) { ImageElement.sprite = sprite; } } }
public void CreateQrCodeOffice() { Select auto = new Select(); QrCodeOffice office = auto.SelectOffice("357", true); GenerateBarcode qrCode = new GenerateBarcode(); OfficeStikerCode stickerQrOffice = new OfficeStikerCode(); //Создание qr кодов foreach (var qrCodeOffice in office.Kabinet) { qrCodeOffice.FullPathPng = qrCode.GenerateQrCode("C:\\Testing\\" + qrCodeOffice.IdNumberKabinet, qrCodeOffice.NumberKabinet); } stickerQrOffice.CreateDocument("C:\\Testing\\QrCodeOffice", office); //Удаление всех png foreach (var cabinet in office.Kabinet) { File.Delete(cabinet.FullPathPng); } }
private void GenerateResetCarton() { //NNM string imageLocation = IndicoConfiguration.AppConfiguration.PathToDataFolder + "\\Barcode\\" + Guid.NewGuid() + "\\"; Directory.CreateDirectory(imageLocation); string tempPath = imageLocation + "temp.jpg"; Bitmap lblBM = new Bitmap(400, 275); using (Graphics gfx = Graphics.FromImage(lblBM)) using (SolidBrush brush = new SolidBrush(Color.White)) { gfx.FillRectangle(brush, 0, 0, 400, 275); } lblBM.Save(tempPath); string imagePath = GenerateBarcode.GenerateResetLabel(lblBM, "Reset", imageLocation); string pdfPath = GenerateOdsPdf.PrintResetBarcode(imageLocation, imagePath); lblBM.Dispose(); File.Delete(tempPath); // download pdf if (File.Exists(pdfPath)) { this.DownloadPDFFile(pdfPath); } // delete image file if (File.Exists(imagePath)) { File.Delete(imagePath); } }
public void Generate_Barcode_PDF() { AddNewOffer.GoTo(); Assert.IsTrue(AddNewOffer.IsAddNewOffer, "Failed to Test "); AddNewOffer.GS1Prefix(); Assert.IsTrue(AddNewOffer.IsGS1Prefix(), "Failed to IsGS1Prefix"); AddNewOffer.AutoAssign(); //Assert.IsTrue(AddNewOffer.IsAutoAssign(), "Failed to IsAutoAssign"); AddNewOffer.OfferDescription(); Assert.IsTrue(AddNewOffer.IsOfferDescription(), "Failed to IsOfferDescription"); AddNewOffer.FamilyyCode(); Assert.IsTrue(AddNewOffer.IsFamilyCode(), "Failed to IsFamilyCode"); AddNewOffer.FreeOffer(); AddNewOffer.Minimun(); Assert.IsTrue(AddNewOffer.IsMinimun(), "Failed to IsMinimun"); AddNewOffer.Maximun(); Assert.IsTrue(AddNewOffer.IsMaximun(), "Failed to IsMaximun"); AddNewOffer.PurchaseRequirements(); Assert.IsTrue(AddNewOffer.IsPurchaseRequirements(), "Failed to IsPurchaseRequirements"); Elements.Delay(10000); AddNewOffer.Date_Drop_Expiration(); //Assert.IsTrue(AddNewOffer.IsDropDate(), "Failed to Drop Date"); AddNewOffer.OrderBarcode(); Assert.IsTrue(GenerateBarcode.IsBarcodeOrder, "Failed to IsBarcodeOrder"); GenerateBarcode.FileTypePDF(); Assert.IsTrue(GenerateBarcode.IsPDF(), "Failed IsPDF"); GenerateBarcode.EmailBarcodeTo("*****@*****.**"); Assert.IsTrue(GenerateBarcode.IsEmail(), "Failed to IsEmail"); GenerateBarcode.SpecialInstructions("Test"); Assert.IsTrue(GenerateBarcode.IsSpecialInstructions(), "Failed to IsSpecialInstructions"); GenerateBarcode.ButtonNext(); Elements.Delay(4000); Assert.IsTrue(GenerateBarcode.IsReviewAndSubmitBarcodeOrderToSymbology, "Failed to Review and Submit Barcode Order to Symbology, Inc."); GenerateBarcode.AcceptConditions(); Assert.IsTrue(GenerateBarcode.IsChecked(), "Falied to IsChecked"); GenerateBarcode.ButtonAccept(); }
private void GenerateLabels(List <PackingList> lstPackingList) { string imageLocation = IndicoConfiguration.AppConfiguration.PathToDataFolder + "\\Barcode\\" + Guid.NewGuid() + "\\"; Directory.CreateDirectory(imageLocation); string tempPath = imageLocation + "temp.jpg"; foreach (PackingList obj in lstPackingList) { Bitmap lblBM = new Bitmap(400, 275); using (Graphics gfx = Graphics.FromImage(lblBM)) using (SolidBrush brush = new SolidBrush(Color.White)) { gfx.FillRectangle(brush, 0, 0, 400, 275); } lblBM.Save(tempPath); string labelText = string.Empty; string qty = string.Empty; List <KeyValuePair <int, string> > listOrderDetails = new List <KeyValuePair <int, string> >(); foreach (PackingListViewBO objPackingList in obj.ListPackingList) { qty = string.Empty; listOrderDetails.Add(new KeyValuePair <int, string>(objPackingList.PackingList.Value, objPackingList.OrderNumber.Value.ToString())); listOrderDetails.Add(new KeyValuePair <int, string>(objPackingList.PackingList.Value, objPackingList.Client)); listOrderDetails.Add(new KeyValuePair <int, string>(objPackingList.PackingList.Value, objPackingList.VLName)); PackingListSizeQtyBO objSizeQty = new PackingListSizeQtyBO(); objSizeQty.PackingList = objPackingList.PackingList.Value; foreach (PackingListSizeQtyBO objPackSize in objSizeQty.SearchObjects()) { string delimeter = string.IsNullOrEmpty(qty) ? string.Empty : ", "; qty = qty + delimeter + objPackSize.objSize.SizeName + "/" + objPackSize.Qty; } listOrderDetails.Add(new KeyValuePair <int, string>(objPackingList.PackingList.Value, qty)); } labelText = obj.CartonNo + "-" + obj.ListPackingList[0].WeeklyProductionCapacity.ToString(); GenerateBarcode.GenerateCartonLabel(lblBM, obj.CartonNo.ToString(), listOrderDetails, labelText, imageLocation); lblBM.Dispose(); File.Delete(tempPath); } // string excelFileName = "CartonLabels" + ".xlsx"; // CreateExcelDocument excell_app = new CreateExcelDocument(imageLocation, excelFileName, 400, 255, 255, true); //(imageLocation, excelFileName, 400, 275, 275, true); NNM string pdfpath = GenerateOdsPdf.PrintCartonBarcode(imageLocation); foreach (string imagePath in Directory.GetFiles(imageLocation, "*.jpg")) { File.Delete(imagePath); } //this.DownloadExcelFile(imageLocation + excelFileName);//NNM if (File.Exists(pdfpath)) { this.DownloadPDFFile(pdfpath); } }
public void Generate() { var g = new GenerateBarcode(); // g.GenerateQrCode(); }