void barcodeScanner_DataEvent(object sender, DataEventArgs e) { string code = encoder.GetString(Globals.barcodeScanner.ScanDataLabel); if (code == "SendPackages" && ogp==null && Globals.ActualUser!=null) { ogp = new OutgoingPackages(); ogp.Closed += ogp_Closed; ogp.Show(); } Globals.barcodeScanner.DataEventEnabled = true; }
void ogp_Closed(object sender, EventArgs e) { ogp = null; }