Skip to content

Helps in dealing with barcode reader devices for WPF projects.

License

Notifications You must be signed in to change notification settings

AndroThink/WPFBarCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WPFBarCode Nuget

Help in dealing with the barcode readers in your wpf application

How to use

In Your Control

var BarCodeReader = BarCoder.BarCodeReader.GetDefaultReader()
                            .WithPrefix(System.Windows.Input.Key.F12) // Configuration for the reader device for the prefix key
                            .WithSuffix(System.Windows.Input.Key.Enter)  // Configuration for the reader device for the suffix key
                            // To listen on specific input element
                            .WithUIElement(this, false, (result) =>
                            {
                                string code = result.Barcode;
                            })
                            // To notify the control using an event
                            .WithEvent(viewModel.DocumentId, viewModel.DocumentId.ToString(), new BarCoder.BaseBarCodeEvent((result) =>
                            {
                                string code = result.Barcode;
                                viewModel.OnBarcodeCallBack?.Invoke(code);
                            })).NotifyOnlyActiveEvent() // if you want to notify the ui using only the event you register
                            .SetCurrentActiveEvent(viewModel.DocumentId); // determin the current active window/page by setting a unique identifier for it this id will be with the event result

BarCodeReader.StartListen(); // start listen
....
BarCodeReader.StopListen(); // stop listen

About

Helps in dealing with barcode reader devices for WPF projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages