All Questions
Tagged with eventhandler .net
26
questions
0
votes
1
answer
63
views
Mocking Event handling will not cover delegate function assigned
Trying to mock an EventHandler for an Event raised from another class. However, when I run the test, the test does not cover the code that implemented inside the handler.
Test
[Fact]
public void ...
0
votes
1
answer
212
views
Why is the private int variable in this c# program not updating?
Here's the program:
[SerializeField] ARPointCloudManager mArPointCloudManager;
private int numPointsUpdated = 0;
// Start is called before the first frame update
void Start()
{
...
0
votes
1
answer
42
views
How can I use a .NET EventHandler to return a parameter into a specific variable?
I am using the SerialDataReceivedEventHandler of the SerialPort class for communicating with a serial port device. I send a SCPI code to the device by SerialPortObject.Write(command) where command is ...
0
votes
2
answers
121
views
return a string value from an EventHandler void
I'm using an EventHandler to check which button was clicked inside Autocad, the only problem is I don't know how can I return the string value from the void and use it inside the main class. It would ...
-1
votes
1
answer
121
views
Difference between calling async EventHandler
I have an EventHandler defined like this:
EventHandler<DataValueChangedEventArgs> method;
What is the difference between calling the method, between the following lines 1 and 2:
1. await ...
2
votes
0
answers
357
views
How can i register an Event Handler for a custom AplicationEvent in C# .net win Form?
I have a method to handle my Custom event.
I am trying to register this method as the event handler for my event.
The method that handles the event needs to be inside a form because it needs to ...
2
votes
2
answers
302
views
Nonsense error message when manually calling EventHandler
If I have an EventHandler with the following signature:
public static void ProcessStuff(object sender, ElapsedEventArgs e)
And If I attempt to manually call the EventHandler like so:
ProcessStuff(...
0
votes
2
answers
503
views
Handle closing event of all windows in wpf
In WPF for registering an event for all window something like this should written in App class :
EventManager.RegisterClassHandler(typeof(Window), Window.PreviewMouseDownEvent, new ...
4
votes
1
answer
410
views
WPF CroppedBitmap + RenderTargetBitmap = EventHandler leak problem and Freeze problem too
I am wondering if there is a .net EventHandler leak surrounding CroppedBitmap and RenderTargetBitmap. It's causing me a huge nightmare!
My WPF app runs an always running render call at 60fps. I ...
1
vote
2
answers
6k
views
Xamarin Forms - Using Async SelectedIndexChanged in picker selection
I am implementing an app in Xamarin Forms for both Android and iOS, which communicate with a WebAPI (.NET) to retrieve information from a database.
At some point, I have a screen with several pickers....
0
votes
3
answers
941
views
C# How to handle cancel task with eventhandler inside
I have requirement to update ui control when status of dependent service will change. I have this sample code, which polling service api to get status and sends result to recalculate and update ui by ...
1
vote
1
answer
505
views
EventHandler Implementation F#
I am implementing the following C# code in F#:
using Softweb.Xamarin.Controls.iOS;
public class DemoViewController : UIViewController, ICardViewDataSource
{
public CardView DemoCardView { ...
2
votes
1
answer
245
views
.net 4.7.1 C# OCX event handler works on win10x 86/64, does not work on win7/8 x86/64
The Backstory - Our company has a C# Click Once app that uses a .ocx file to register an event handler. The event handler's function is arbitrary, but in this case the event handler is performing a ...
1
vote
1
answer
196
views
pass parameters to constructor c#
Is it possible to pass parameters to a run-time-generated event handler? Here is where the event is created:
private void DataView_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
...
3
votes
1
answer
343
views
Event handler affects in garbage collection in CLR
I'm completely confused about how event handler can affect in garbage collection operation.
For example, why object a1 not collected by garbage collection ( the destructor of a1 is not calling):
...