public Code(string TextData, Symbology Symbology, bool PartialSegment) { this.TextData = TextData; this.Symbology = Symbology; this.PartialSegment = PartialSegment; this._ScanTime = DateTime.Now; }
private string ExtractBestTextCandidate(BitmapSource bitmap, ITextualDataFilter filter, Symbology symbology) { var page = Engine.Recognize(bitmap, RecognitionConfiguration.FromSingleImage(bitmap, filter, symbology)); var zone = page.RecognizedZones.First(); return zone.RecognitionResult.Text; }
public CodaBlockEncoder(Symbology symbology, string barcodeMessage, int codaBlockRows, int codaBlockColumns) { this.symbolId = symbology; this.barcodeMessage = barcodeMessage; this.codaBlockRows = codaBlockRows; this.codaBlockColumns = codaBlockColumns; this.elementsPerCharacter = 11; }
public string Extract(BitmapSource bitmap, ITextualDataFilter filter, Symbology symbology) { var sut = GetSut(); var recognizedPage = sut.Recognize(bitmap, RecognitionConfiguration.FromSingleImage(bitmap, filter, symbology)); var uniqueZone = recognizedPage.RecognizedZones.First(); return uniqueZone.RecognitionResult.Text; }
public string Extract(IImage bitmap, ITextualDataFilter filter, Symbology symbology) { var sut = GetSut(); var recognizedPage = sut.Recognize(bitmap, RecognitionConfiguration.FromSingleImage(bitmap, filter, symbology)); var uniqueZone = recognizedPage.RecognizedZones.First(); return uniqueZone.RecognitionResult.Text; }
public async Task EnableSymbologyAsync(Symbology symbology, bool enabled, bool updateBarcodeCaptureSettings = false) { this.BarcodeCaptureSettings.EnableSymbology(symbology, enabled); if (updateBarcodeCaptureSettings) { await this.ApplyBarcodeCaptureSettingsAsync(); } }
public Code128Encoder(Symbology symbology, string barcodeMessage, string compositeMessage, CompositeMode compositeMode, EncodingMode encodingMode) { this.symbolId = symbology; this.barcodeMessage = barcodeMessage; this.compositeMessage = compositeMessage; this.isCompositeSymbol = !String.IsNullOrEmpty(compositeMessage); this.compositeMode = compositeMode; this.encodingMode = encodingMode; }
public bool DisableSymbology(Symbology symbology) { if (_available.Contains(symbology)) { _enabled.Remove(symbology); return true; } return false; }
public DataMatrix(Symbology symb) { InitializeComponent(); this.symbology = symb; this.symbology.Option1 = 0; this.symbology.Option2 = 0; this.symbology.Option3 = 0; this.symbology.InputMode = 0; }
public bool EnableSymbology(Symbology symbology) { if (_available.Contains(symbology)) { _enabled.Add(symbology); return true; } return false; }
public ChannelCode(Symbology symb) { InitializeComponent(); this.symbology = symb; this.symbology.Option1 = 0; this.symbology.Option2 = 0; this.symbology.Option3 = 0; this.symbology.InputMode = 0; }
public MSIPlessey(Symbology symb) { InitializeComponent(); this.symbology = symb; this.symbology.Option1 = 0; this.symbology.Option2 = 0; this.symbology.Option3 = 0; this.symbology.InputMode = 0; }
public PDF417Encoder(Symbology symbology, string barcodeMessage, int optionDataColumns, int optionErrorCorrection, int optionElementHeight, EncodingMode encodingMode) { this.symbolId = symbology; this.barcodeMessage = barcodeMessage; this.optionDataColumns = optionDataColumns; this.optionErrorCorrection = optionErrorCorrection; this.optionElementHeight = optionElementHeight; this.encodingMode = encodingMode; }
public bool DisableSymbology(Symbology symbology) { if (_available.Contains(symbology)) { _enabled.Remove(symbology); return(true); } return(false); }
public bool EnableSymbology(Symbology symbology) { if (_available.Contains(symbology)) { _enabled.Add(symbology); return(true); } return(false); }
public MicroQR(Symbology symb) { InitializeComponent(); this.symbology = symb; this.symbology.Option1 = 0; this.symbology.Option2 = 0; this.symbology.Option3 = 0; this.symbology.InputMode = 0; }
protected string ExtractBestTextCandidate(BitmapSource bitmap, ITextualDataFilter filter, Symbology symbology) { var bounds = new Rect(0, 0, bitmap.Width, bitmap.Height); var zoneConfiguration = new ZoneConfiguration {Bounds = bounds, TextualDataFilter = filter, Id = "", Symbology = symbology}; var recognitions = Engine.Recognize(bitmap, zoneConfiguration); var selector = OpticalResultSelector.ChooseBest(recognitions, zoneConfiguration); return selector?.Text; }
public void SkeniranjeGotovo(string barkod, Symbology simbologija) { if (simbologija == Symbology.CODE_128) { txtLokacijaOznaka.Text = barkod; } else { txtRobaSifra.Text = barkod; } }
private BarcodeProfessional GetBarcodeProObj() { BarcodeProfessional bcp = new BarcodeProfessional(); bcp.BarcodeUnit = BarcodeUnit.Inch; Symbology symb = Symbology.QRCode; bcp.QRCodeModuleSize = 0.0412; bcp.Symbology = symb; bcp.Code = ID.ToString(); return(bcp); }
/// <summary> /// Converts barcode type from Word to Aspose.BarCode. /// </summary> private static Symbology ConvertBarcodeType(string inputCode) { if (inputCode == null) { return((Symbology)int.MinValue); } string type = inputCode.ToUpper(); Symbology outputCode = (Symbology)int.MinValue; switch (type) { case "QR": outputCode = Symbology.QR; break; case "CODE128": outputCode = Symbology.Code128; break; case "CODE39": outputCode = Symbology.Code39Standard; break; case "EAN8": outputCode = Symbology.EAN8; break; case "EAN13": outputCode = Symbology.EAN13; break; case "UPCA": outputCode = Symbology.UPCA; break; case "UPCE": outputCode = Symbology.UPCE; break; case "ITF14": outputCode = Symbology.ITF14; break; case "CASE": break; default: break; } return(outputCode); }
public MailmarkEncoder(Symbology symbolId, string barcodeMessage) { // Ensure postcode type 7 ends in 5 spaces. barcodeMessage = barcodeMessage.TrimEnd(new char[] { ' ' }); if (barcodeMessage.EndsWith("XY11", StringComparison.CurrentCulture)) { barcodeMessage += " "; } this.barcodeMessage = barcodeMessage; this.symbolId = symbolId; }
public static string GetSymbolName(Symbology symbolId) { foreach (KeyValuePair <string, Symbology> entry in symbolDictionary) { if (entry.Value == symbolId) { return(entry.Key); } } return(string.Empty); }
private static bool ExportSymbologyConvertDataToCSV(Symbology data, StreamWriter writer) { if (data == null) { throw new ArgumentNullException("data"); } if (writer == null) { throw new ArgumentNullException("writer"); } try { using (var csv = new CsvWriter(writer)) { // Write CSV Header first foreach (var header in data.Headers) { csv.WriteField(header.Title); } csv.NextRecord(); csv.Flush(); // Write each row from Json data foreach (var rowData in data.Data) { foreach (var symbolValue in rowData) { if (symbolValue != null) { csv.WriteField(symbolValue.ToString()); } else { csv.WriteField("NULL"); } } csv.NextRecord(); csv.Flush(); } } } catch (Exception exception) { Console.WriteLine($"Exception when generating CSV file\n {exception.Message}"); } return(true); }
/// <summary> /// Returns a string compatible with the given Code39 symbology. /// </summary> /// <param name="text">Text to convert from.</param> /// <param name="symbology">Code39 symbology to be used.</param> /// <returns>Code39 supported string.</returns> public string Parse(string text, Symbology symbology) { switch (symbology) { case Symbology.Code39Full: return(LinearHelpers.GetOnlyAscii(text)); case Symbology.Code39FullC: return(LinearHelpers.GetOnlyAscii(text)); default: return(GetOnlyCode39(text)); } }
public string Parse(string text, Symbology symbology) { switch (symbology) { case Symbology.I2of5: return(LinearHelpers.GetEvenNumeric(text)); case Symbology.I2of5C: return(LinearHelpers.GetOddNumeric(text)); default: return(LinearHelpers.GetOddNumeric(text)); } }
public void SkeniranjeGotovo(string barkod, Symbology simbologija) { if (simbologija == Symbology.CODE_128) { txtLokacija.Text = barkod; } else { MessageBox.Show( Poruke.BarkodNijeLokacijski, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
protected void AssertSuccessRate(IEnumerable<TestCase> testCases, ITextualDataFilter stringFilter, double minimum, Symbology symbology) { var cases = testCases as IList<TestCase> ?? testCases.ToList(); var testExecutions = (from c in cases let result = OutputResult(ExtractBestTextCandidate(c.Bitmap, stringFilter, symbology), c) select new {Result = result, Expected = c.Expected, Success = result == c.Expected}).ToList(); var success = testExecutions.Count(testCase => testCase.Expected == testCase.Result); var total = testExecutions.Count; var d = (double) success/total; output.WriteLine($"Success Ratio: {d}"); Assert.True(d >= minimum); }
public void SkeniranjeGotovo(string barkod, Symbology simbologija) { if (simbologija == Symbology.CODE_39) { txtDokument.Text = barkod; btnDodaj.Select(); } else { MessageBox.Show( Poruke.BarkodNijeDokumentni, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public string Parse(string text, Symbology symbology) { switch (symbology) { case Symbology.Ean13: return(LinearHelpers.GetOnlyNumeric(text, 12)); case Symbology.UpcA: return(LinearHelpers.GetOnlyNumeric(text, 11)); case Symbology.Ean8: return(LinearHelpers.GetOnlyNumeric(text, 7)); default: return(LinearHelpers.GetOnlyNumeric(text, 12)); } }
public Code128Encoder(Symbology symbology) : base(symbology) { switch (Symbology) { case Symbology.Code128ABC: _suppressSubsetC = false; StartSubset = Code128Subset.A; Description = "Code 128 - Subset A Prioritised & Auto Subset C Selected"; break; case Symbology.Code128BAC: _suppressSubsetC = false; StartSubset = Code128Subset.B; Description = "Code 128 - Subset B Prioritised & Auto Subset C Selected"; break; case Symbology.Code128AB: _suppressSubsetC = true; StartSubset = Code128Subset.A; Description = "Code 128 - Subset A Prioritised & Subset C Suppressed"; break; case Symbology.Code128BA: _suppressSubsetC = true; StartSubset = Code128Subset.B; Description = "Code 128 - Subset B Prioritised & Subset C Suppressed"; break; case Symbology.GS1128: _suppressSubsetC = false; _isGs1 = true; StartSubset = Code128Subset.B; Description = "GS1-128 - Subset B Prioritised & Auto Subset C Selected"; break; default: _suppressSubsetC = false; StartSubset = Code128Subset.B; Description = "Code 128 - Subset B Prioritised & Auto Subset C Selected"; break; } }
/// <summary> /// This button event handler refreshes the twenty-first barcode on the print preview page. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void RefreshBarcode21Btn_Click(object sender, EventArgs e) { try { Symbology CurrentSymbology = InfoPass.type21; BarCode Instance = new BarCode { Symbology = CurrentSymbology, CodeToEncode = InfoPass.barcodenumber21 }; InfoPass.Barcode21 = Instance.generateBarcodeToBitmap(); Barcode21Preview.BackgroundImage = InfoPass.Barcode21; } catch (Exception ex) { MessageBox.Show("There was an error regenerating the barcode!" + Environment.NewLine + "Stack Trace: " + Environment.NewLine + ex.ToString()); } }
async void InitScanditSettings() { IBarcodePicker picker = ScanditService.BarcodePicker; // The scanning behavior of the barcode picker is configured through scan // settings. We start with empty scan settings and enable a very generous // set of symbologies. In your own apps, only enable the symbologies you // actually need. var settings = picker.GetDefaultScanSettings(); var symbologiesToEnable = new Symbology[] { Symbology.Ean13 }; foreach (var sym in symbologiesToEnable) { settings.EnableSymbology(sym, true); } await picker.ApplySettingsAsync(settings); // This will open the scanner in full-screen mode. }
private void SetSymbology(Symbology symbology) { switch (symbology) { case Symbology.Interleaved2Of5: _barcodeData = new Interleaved2Of5ViewModel(Code, DisplayCode); BarcodePresenter.Content = new Interleaved2Of5View() { DataContext = _barcodeData }; break; case Symbology.Ean8: _barcodeData = new Ean8ViewModel(Code, DisplayCode); BarcodePresenter.Content = new EanView() { DataContext = _barcodeData }; break; case Symbology.Ean13: _barcodeData = new Ean13ViewModel(Code, DisplayCode); BarcodePresenter.Content = new EanView() { DataContext = _barcodeData }; break; case Symbology.Code39: _barcodeData = new Code39ViewModel(Code, DisplayCode); BarcodePresenter.Content = new Code39View() { DataContext = _barcodeData }; break; default: throw new ArgumentOutOfRangeException(); } }
public Interleaved2Of5Encoder(Symbology symbology) : base(symbology) { switch (Symbology) { case Symbology.I2of5: // Interleaved 2 of 5 _useCheckDigit = false; Description = "Interleaved 2 of 5"; break; case Symbology.I2of5C: // Interleaved 2 of 5 with check digit _useCheckDigit = true; Description = "Interleaved 2 of 5 With Check Digit"; break; default: // Interleaved 2 of 5 with check digit _useCheckDigit = true; Description = "Interleaved 2 of 5 With Check Digit"; break; } }
public override void OnReceive(Context context, Intent intent) { if (intent != null) { String data = intent.GetStringExtra(BARCODE_VALUE); String typeString = intent.GetStringExtra(BARCODE_TYPE); Symbology symbology = Symbology.UNKNOWN; switch (typeString.ToUpper()) { case "UPCE": symbology = Symbology.UPCE; break; case "EAN13": symbology = Symbology.EAN13; break; case "EAN8": symbology = Symbology.EAN8; break; default: symbology = Symbology.UNKNOWN; break; } RedLaser.Instance.TriggerScan(data, symbology); Log.Info("MonoCross", "response received from scan " + data + " : " + typeString); } else { Log.Warn("MonoCross", "weird response received"); } //throw new NotImplementedException(); }
private async void InitSettings() { IBarcodePicker _picker = ScanditService.BarcodePicker; // The scanning behavior of the barcode picker is configured through scan // settings. We start with empty scan settings and enable a very generous // set of symbologies. In your own apps, only enable the symbologies you // actually need. _scanSettings = _picker.GetDefaultScanSettings(); var symbologiesToEnable = new Symbology[] { Symbology.Qr, Symbology.Ean13, Symbology.Upce, Symbology.Code128, Symbology.Ean8, Symbology.Upca, Symbology.DataMatrix }; foreach (var sym in symbologiesToEnable) { _scanSettings.EnableSymbology(sym, true); } await _picker.ApplySettingsAsync(_scanSettings); // This will open the scanner in full-screen mode. ScanditService.BarcodePicker.CancelButtonText = "Done"; ScanditService.BarcodePicker.DidScan += OnDidScan; ScanditService.BarcodePicker.DidStop += OnDidStopAsync; ScanditService.BarcodePicker.AlwaysShowModally = true; await UpdateScanSettings(); UpdateScanOverlay(); //ScanditService.BarcodePicker.CancelButtonText = "Done"; await ScanditService.BarcodePicker.StartScanningAsync(false); }
public bool IsSymbologyEnabled(Symbology symbology) { return(_enabled.Contains(symbology)); }
public void TriggerScan(String data, Symbology symbology) { if (BarcodeScan != null) BarcodeScan(this, new BarcodeScanEvent(data, DateTime.Now, symbology)); }
/// <summary> /// Application running with the following steps /// 1. Display arguments list and validate command line argument values /// 2. Get Refresh Token from EDP Server /// 3. Send Http Request GET/POST to EDP Symbology Convert endpoint to get the data /// 4. Validate response and print to console and write to csv if needed. /// </summary> private static void Main(string[] args) { // 1. Display arguments list and validate command line argument values var appConfig = new Config(); if (!ShowsConfigCommand(args, ref appConfig)) { return; } Console.WriteLine("Start EDP(Elektron Data Platform) Symbology Convert Example application"); var convertRequest = ValidateAndCreateConvertRequest(appConfig); DumpAppConfig(appConfig, convertRequest); if (convertRequest.Universe.Count == 0) { Console.WriteLine("Please specify at lease one item in the universe"); return; } // 2. Get Refresh Token from EDP Server // If user provide RefreshToken or Access Token, app will skip this step</summary> var authToken = DoLoginAndAuthenticate(appConfig); if (authToken == null) { return; } // 3. Send Http Request GET/POST to EDP Symbology Convert endpoint to get the data // 4. Validate response and print to console and write to csv if needed. // SymbologyConvertGet using Http Get to send the request and // SymbologyConvertPost using Http Post to send the request. var requestIsSuccess = false; Symbology symbologyData = null; var IsCancelledReqeust = false; do { using (var client = new HttpClient(GenerateHttpClientHandler(appConfig))) { // Set access token in Http Authorization Header var accessToken = string.IsNullOrEmpty(appConfig.AccessToken) ? authToken.Access_token : appConfig.AccessToken; client.DefaultRequestHeaders.Authorization = authToken is null ? new AuthenticationHeaderValue("Bearer", accessToken) : new AuthenticationHeaderValue(authToken.Token_type, accessToken); //Specify Media Type to application/json client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); var symbologyClient = new EDPSymbologyClient(client); //If user specify EDP Symbology based url vi app config, it overrides default symbology based url. if (!string.IsNullOrEmpty(appConfig.SymbologyBaseURL)) { symbologyClient.BaseUrl = appConfig.SymbologyBaseURL; } Console.WriteLine("Retrieving data from EDP Symbology Conversion service..."); var cts = new CancellationTokenSource(); Console.TreatControlCAsInput = false; Console.CancelKeyPress += (s, ev) => { IsCancelledReqeust = true; cts.Cancel(); }; try { symbologyData = !appConfig.UseJsonRequestFile ? SymbologyConvertGet(symbologyClient, convertRequest, appConfig, cts) : SymbologyConvertPost(symbologyClient, convertRequest, appConfig, cts); } catch (EDPSymbologyException <Error> exception) { Console.WriteLine( $"Error ID:{exception.Result.Error1.Id} Code:{exception.Result.Error1.Code} {exception.Result.Error1.Status} {exception.Result.Error1.Message}"); if (exception.Result.Error1.Code != "401") { // Assume that there is authorize error occurs. requestIsSuccess = true; } else { requestIsSuccess = false; Console.WriteLine( "The AccessToken you use may not valid, Re-Enter EDP Username and Password"); //reset AccessToken appConfig.AccessToken = string.Empty; // Re Enter Username and Password. authToken = DoLoginAndAuthenticate(appConfig); } } catch (Exception exception) { Console.WriteLine($"{exception.Message}"); } requestIsSuccess = symbologyData != null; } } while (!IsCancelledReqeust && !requestIsSuccess); if (!IsCancelledReqeust) { PrintSymbologyResponse(symbologyData, appConfig); } else { Console.WriteLine("Operation was cancelled. Exit the application"); } }
public void SkeniranjeGotovo(string barkod, Symbology simbologija) { if (btnTrazi.Text == "Traži") { if (simbologija == Symbology.CODE_39) { txtDokument.Text = barkod; btnTrazi.Select(); } else { MessageBox.Show( Poruke.BarkodNijeDokumentni, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else if (btnTrazi.Text == "Izmjena") { DataSet ds = null; try { ds = Config.MobTrenisWS.RobaDajSifruPoBarkodu(barkod); if (ds != null) { if (ds.Tables[0].Rows.Count == 1) { bool stavkaPostoji = false; for (int i = 0; i < brRedaka; i++) { if (sgStavka.Cells[i, 2].Text == ds.Tables[0].Rows[0]["MobRoba_Sifra"].ToString()) { sgStavka.ActiveRowIndex = i; sgStavka.EnsureVisible(i, 0); stavkaPostoji = true; break; } } if (!stavkaPostoji) { rBarkod = String.Empty; MessageBox.Show( Poruke.SkladokRobaNiMedStavkami, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } else { /*!!!*/ rBarkod = barkod; } } else { MessageBox.Show( Poruke.SkladokBarkodBezRobe, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show( Poruke.RobaGreska, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } catch (Exception ex) { MessageBox.Show( ex.Message, Poruke.MSGBOX_ERR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { if (ds != null) { ds.Dispose(); } } } }
public static ZoneConfiguration FromSingleImage(BitmapSource bitmapSource, ITextualDataFilter dataFilter, Symbology symbology) { var bounds = new Rect(0, 0, bitmapSource.Width, bitmapSource.Height); return new ZoneConfiguration() { Bounds = bounds, TextualDataFilter = dataFilter, Id = "", Symbology = symbology }; }
public bool IsSymbologyAvailable(Symbology symbology) { return _available.Contains(symbology); }
/// <summary> /// Returns the character type based on barcode symbology and character position. /// </summary> /// <param name="symbology"></param> /// <param name="characterPosition"></param> /// <param name="barcodeLength"></param> /// <remarks>Character Types: 0 = Encoded value & eye-readable, 1 = Control character, 3 = Encoded value & not eye-readable.</remarks> /// <returns>Character type as int</returns> internal static int GetCharacterType(Symbology symbology, int characterPosition, int barcodeLength) { int charPosAdjust = characterPosition > barcodeLength ? -1 : characterPosition; switch (symbology) { case Symbology.UpcA: switch (charPosAdjust) { case -1: return(2); case 0: return(2); case 11: return(2); default: return(0); } case Symbology.Code128BAC: switch (charPosAdjust) { case -1: return(1); case 0: return(1); default: return(0); } case Symbology.Code128ABC: switch (charPosAdjust) { case -1: return(1); case 0: return(1); default: return(0); } case Symbology.Code128BA: switch (charPosAdjust) { case -1: return(1); case 0: return(1); default: return(0); } case Symbology.Code128AB: switch (charPosAdjust) { case -1: return(1); case 0: return(1); default: return(0); } case Symbology.GS1128: switch (charPosAdjust) { case -1: return(1); case 0: return(1); case 1: return(1); default: return(0); } default: return(0); } }
public Options() { InitializeComponent(); symbology = new Symbology(); }
public void SkeniranjeGotovo(string barkod, Symbology simbologija) { if (simbologija == Symbology.CODE_128) { bool stavkaPostoji = false; for (int i = 0; i < brRedaka; i++) { if (dgvLokacija[0, i].Value.ToString() == barkod) { // Deselektiraj do sada selektirani redak (radi i za više redaka)... dgvLokacija.ClearSelection(); // ... pa selektiraj onaj pronaðen barkodom. dgvLokacija.Rows[i].Selected = true; dgvLokacija.CurrentCell = dgvLokacija.Rows[i].Cells[0]; stavkaPostoji = true; break; } } if (!stavkaPostoji) { MessageBox.Show( Poruke.SkladokLokacijaNiMedStavkami, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show( Poruke.BarkodNijeLokacijski, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public void SkeniranjeGotovo(string barkod, Symbology simbologija) { decimal? stanje = null; if (simbologija == Symbology.CODE_128) { txtLokacijaOznaka.Text = barkod; if (cboUI.SelectedItem.ToString() == "IZLAZ") { #region Dohvat stanja robe na lokaciji if (lblRoba.Tag != null) { try { stanje = Config.MobTrenisWS.RobaDajStanjeNaLokaciji(PLL.Skladiste, lblRoba.Tag.ToString(), txtLokacijaOznaka.Text); if (stanje.HasValue) { lblRoba.Text = lblRobaBarkod.Tag.ToString() + Environment.NewLine + "Kolièina: " + stanje.Value.ToString(); } else { lblRoba.Text = lblRobaBarkod.Tag.ToString() + Environment.NewLine + "Kolièina: NEMA!"; } } catch (Exception ex) { MessageBox.Show( Poruke.PllNeuspioDohvatStanja + ex.Message, Poruke.MSGBOX_ERR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); } } btnUpisi.Focus(); #endregion } else if (cboUI.SelectedItem.ToString() == "ULAZ") { cboLokacijaOdabir.Focus(); } } else { DataSet ds = null; try { ds = Config.MobTrenisWS.RobaDajPoBarkodu(barkod); } catch (Exception ex) { MessageBox.Show( Poruke.RobaGreska + "(WS) " + ex.Message, Poruke.MSGBOX_ERR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (ds != null && ds.Tables[0].Rows.Count == 1) { lblRoba.Tag = ds.Tables[0].Rows[0]["RobaSifra"].ToString().TrimEnd(); lblRobaBarkod.Tag = ds.Tables[0].Rows[0]["RobaSifra"].ToString().TrimEnd() + Environment.NewLine + ds.Tables[0].Rows[0]["RobaNaziv"].ToString().TrimEnd() + Environment.NewLine + "Dobavljaè: " + (String.IsNullOrEmpty(ds.Tables[0].Rows[0]["DobavljacSifra"].ToString()) ? "nepoznat" : ds.Tables[0].Rows[0]["DobavljacSifra"].ToString().TrimEnd()); if (cboUI.SelectedItem.ToString() == "IZLAZ") { #region Dohvat stanja robe na lokaciji if (txtLokacijaOznaka.Text != String.Empty) { try { stanje = Config.MobTrenisWS.RobaDajStanjeNaLokaciji(PLL.Skladiste, lblRoba.Tag.ToString(), txtLokacijaOznaka.Text); if (stanje.HasValue) { lblRoba.Text = lblRobaBarkod.Tag.ToString() + Environment.NewLine + "Kolièina: " + stanje; } else { lblRoba.Text = lblRobaBarkod.Tag.ToString() + Environment.NewLine + "Kolièina: nema!"; } } catch (Exception ex) { MessageBox.Show( Poruke.PllNeuspioDohvatStanja + ex.Message, Poruke.MSGBOX_ERR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); } } #endregion } else if (cboUI.SelectedItem.ToString() == "ULAZ") { #region Dohvat robnih lokacija // Prikazati popis lokacija na kojima skenirana roba ima stanje > 0 i // omoguæiti izbor lokacije za upis kolièine (MobLokacijaRoba). cboLokacijaOdabir.DataSource = null; cboLokacijaOdabir.DisplayMember = "Prikaz"; DataSet robaLokDS = null; try { robaLokDS = Config.MobTrenisWS.RobaDajPozitivu(PLL.Skladiste, barkod, null); if (robaLokDS.Tables.Count == 1 && robaLokDS.Tables[0].Rows.Count > 0) { cboLokacijaOdabir.DataSource = robaLokDS.Tables[0]; if (cboLokacijaOdabir.SelectedValue != null && cboLokacijaOdabir.SelectedValue.ToString() != "!") { cboLokacijaOdabir.SelectedValue = "!"; } } } catch (Exception ex) { MessageBox.Show( Poruke.PllNeuspioDohvatLokacija + ex.Message, Poruke.MSGBOX_ERR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { if (robaLokDS != null) { robaLokDS.Dispose(); } } #endregion } txtRobaBarkod.Text = barkod; txtRobaKolicina.Focus(); } else { lblRoba.Tag = null; lblRoba.Text = String.Empty; lblRobaBarkod.Tag = null; txtRobaBarkod.Text = barkod; if (ds == null) { MessageBox.Show( Poruke.RobaGreska + "(conn) ", Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } else if (ds.Tables[0].Rows.Count != 1) { MessageBox.Show( Poruke.RobaNePostoji, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } } if (ds != null) { ds.Dispose(); } } }
internal void SkeniranjeGotovo(string barkod, Symbology simbologija) { txtBarkod.Text = barkod; }
internal void SetSymbol(Symbology.Symbol symbol) { if (symbol != null) { // force the geometry type since GeometryType.Unknown doesn't work well with advanced symbology. var geometryType = GeometryType.Unknown; var gdbFeatureTable = Layer == null ? null : Layer.FeatureTable as GeodatabaseFeatureTable; if (gdbFeatureTable != null && gdbFeatureTable.ServiceInfo != null) geometryType = gdbFeatureTable.ServiceInfo.GeometryType; GeometryType = geometryType; } Symbol = symbol; OnPropertyChanged("GeometryType"); OnPropertyChanged("Symbol"); }
public bool IsSymbologyAvailable(Symbology symbology) { return(_available.Contains(symbology)); }
public void SkeniranjeGotovo(string barkod, Symbology simbologija) { if (simbologija == Symbology.CODE_128) { for (int i = 0; i < brRedaka; i++) { if (dgvLokacija[0, i].Value.ToString() == barkod) { // Deselektiraj do sada selektirani redak (radi i za više redaka)... dgvLokacija.ClearSelection(); // ... pa selektiraj onaj pronaðen barkodom. dgvLokacija.Rows[i].Selected = true; dgvLokacija.CurrentCell = dgvLokacija.Rows[i].Cells[0]; break; } } txtLokacija.Text = barkod; txtKolicina.Focus(); } else { MessageBox.Show( Poruke.BarkodNijeLokacijski, Poruke.MSGBOX_WARN_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public bool IsSymbologyEnabled(Symbology symbology) { return _enabled.Contains(symbology); }
/// <summary> /// /// </summary> /// <param name="data">The barcode data</param> /// <param name="time">The time the scan took place, device time so may not be accurate</param> /// <param name="type">The symbology of the barcode scanned</param> public BarcodeScanEvent(string data, DateTime time, Symbology type) { _data = data; _time = time; _type = type; }
void Layers_LayerSelected(object sender, Symbology.LayerSelectedEventArgs e) { _ZoomToLayer.Enabled = App.Map.Layers.SelectedLayer != null; }
public void SkeniranjeGotovo(string barkod, Symbology simbologija) { txtRobaSifra.Text = barkod; }
public Code93Encoder(Symbology symbology, string barcodeMessage) { this.symbolId = symbology; this.barcodeMessage = barcodeMessage; }
internal async void SetSwatch(Symbology.Symbol symbol) { if (symbol != null) { // force the geometry type since GeometryType.Unknown doesn't work well with advanced symbology. Geometry.GeometryType geometryType = Geometry.GeometryType.Unknown; if (Layer != null && Layer.FeatureTable != null && Layer.FeatureTable.ServiceInfo != null) geometryType = Layer.FeatureTable.ServiceInfo.GeometryType; try { Swatch = await symbol.CreateSwatchAsync(32, 32, 96, Colors.Transparent, geometryType); OnPropertyChanged("Swatch"); } catch { } } }
public Barcode(Symbology _type, string _value) { this.CodeType = _type; this.CodeValue = _value; }
public Code39(Symbology symb) { InitializeComponent(); this.symbology = symb; }