Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No existing code for BasePrinter.Startmonitoring() #230

Open
Jury-jpg opened this issue May 21, 2023 · 3 comments
Open

No existing code for BasePrinter.Startmonitoring() #230

Jury-jpg opened this issue May 21, 2023 · 3 comments
Labels
question Further information is requested

Comments

@Jury-jpg
Copy link

No description provided.

@lukevp
Copy link
Owner

lukevp commented Jun 17, 2023

Hey @Jury-jpg could you provide some more details on what your question / concern is regarding this function? Are you not sure how to use it? There is an example in the README:

// In your program, register event handler to call the method when printer status changes:
printer.StatusChanged += StatusChanged;

// and start monitoring for changes.
printer.StartMonitoring();

@lukevp lukevp added the question Further information is requested label Jun 17, 2023
@HGCollier
Copy link

NetworkPrinter does not contain a definition for StartMonitoring

@wzuqui
Copy link

wzuqui commented Mar 6, 2024

Looking at the tests implemented in this git, I found how to get the data, maybe it will help you

using(var xPrinter = new SerialPrinter(portName: "COM2", baudRate: 115200))
{
        xPrinter.StatusChanged += StatusChanged;
        xPrinter.Connected += ConnectedChanged;
        var xEpson = new EPSON();
        
        xPrinter.Write(xEpson.Initialize());
        xPrinter.Write(xEpson.Enable());

        xPrinter.Write(xEpson.EnableAutomaticStatusBack());
        Thread.Sleep(5000);
}
void StatusChanged(object sender, EventArgs e)
{
	var status = (PrinterStatusEventArgs)e;
	status.Dump();
}

2024-03-05_23h46_26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants