public TestScreen() : base("TestScreen", null) { View.BackgroundColor = DisconnectedColor; ConnectionLabel = new UILabel (new RectangleF(10,10,View.Frame.Width-20,40)); ConnectionLabel.BackgroundColor = UIColor.Clear; ConnectionLabel.TextAlignment = UITextAlignment.Center; ConnectionLabel.AdjustsFontSizeToFitWidth = true; ConnectionLabel.Font = UIFont.BoldSystemFontOfSize (26); ConnectionLabel.Text = "Linea disconnected"; ConnectionLabel.TextColor = UIColor.FromRGB (245, 245, 245); View.Add (ConnectionLabel); ScanTypeLabel = new UILabel (new RectangleF(10,70,View.Frame.Width-20,40)); ScanTypeLabel.BackgroundColor = UIColor.Clear; ScanTypeLabel.TextAlignment = UITextAlignment.Center; ScanTypeLabel.AdjustsFontSizeToFitWidth = true; ScanTypeLabel.Font = UIFont.BoldSystemFontOfSize (26); ScanTypeLabel.Text = ""; ScanTypeLabel.TextColor = UIColor.FromRGB (245, 245, 245); View.Add (ScanTypeLabel); ScanDataLabel = new UILabel (new RectangleF(10,130,View.Frame.Width-20,40)); ScanDataLabel.BackgroundColor = UIColor.Clear; ScanDataLabel.TextAlignment = UITextAlignment.Center; ScanDataLabel.AdjustsFontSizeToFitWidth = true; ScanDataLabel.Font = UIFont.BoldSystemFontOfSize (20); ScanDataLabel.Text = ""; ScanDataLabel.TextColor = UIColor.FromRGB (245, 245, 245); View.Add (ScanDataLabel); LineaDevice = Linea.SharedDevice; LineaDispatcher = new LineaDispatcher (); LineaDispatcher.ConnectionStateChanged += HandleConnectionStateChanged; LineaDispatcher.BarcodeScanned += HandleBarcodeScanned; LineaDispatcher.MagcardRead += HandleMagcardRead; LineaDevice.AddDelegate (LineaDispatcher); LineaDevice.Connect (); }
public TestScreen() : base("TestScreen", null) { View.BackgroundColor = DisconnectedColor; ConnectionLabel = new UILabel(new RectangleF(10, 10, View.Frame.Width - 20, 40)); ConnectionLabel.BackgroundColor = UIColor.Clear; ConnectionLabel.TextAlignment = UITextAlignment.Center; ConnectionLabel.AdjustsFontSizeToFitWidth = true; ConnectionLabel.Font = UIFont.BoldSystemFontOfSize(26); ConnectionLabel.Text = "Linea disconnected"; ConnectionLabel.TextColor = UIColor.FromRGB(245, 245, 245); View.Add(ConnectionLabel); ScanTypeLabel = new UILabel(new RectangleF(10, 70, View.Frame.Width - 20, 40)); ScanTypeLabel.BackgroundColor = UIColor.Clear; ScanTypeLabel.TextAlignment = UITextAlignment.Center; ScanTypeLabel.AdjustsFontSizeToFitWidth = true; ScanTypeLabel.Font = UIFont.BoldSystemFontOfSize(26); ScanTypeLabel.Text = ""; ScanTypeLabel.TextColor = UIColor.FromRGB(245, 245, 245); View.Add(ScanTypeLabel); ScanDataLabel = new UILabel(new RectangleF(10, 130, View.Frame.Width - 20, 40)); ScanDataLabel.BackgroundColor = UIColor.Clear; ScanDataLabel.TextAlignment = UITextAlignment.Center; ScanDataLabel.AdjustsFontSizeToFitWidth = true; ScanDataLabel.Font = UIFont.BoldSystemFontOfSize(20); ScanDataLabel.Text = ""; ScanDataLabel.TextColor = UIColor.FromRGB(245, 245, 245); View.Add(ScanDataLabel); LineaDevice = Linea.SharedDevice; LineaDispatcher = new LineaDispatcher(); LineaDispatcher.ConnectionStateChanged += HandleConnectionStateChanged; LineaDispatcher.BarcodeScanned += HandleBarcodeScanned; LineaDispatcher.MagcardRead += HandleMagcardRead; LineaDevice.AddDelegate(LineaDispatcher); LineaDevice.Connect(); }