I have one Project which contains a button click event. On this button click event I want to fire a custom event in another Project Class.
For e.g.
For e.g.
namespace Microsoft.Mcs.FastHelp.Adapters.CustomerOverview.WrapUp
{
public partial class WrapUpAdapter
{
// This class contains a button click event.
private void btnSaveWrapUp_Click(object sender, EventArgs e)
{
// some code logic
here I want to invoke my event which would fire event in another Project class.
}
Another Project Class e.g.
namespace Microsoft.Ccf.Samples.Csr.AgentDesktop
{
public partial class Desktop : UIConfiguration
{
// Here in this class I want to subscribe or fire my event.
}
}
I hope this explains everything.
Any suggestions/solutions regarding the same, would be highly appreciable
REPLY :1
Just FYI, I have solved the below query which I had mailed last week.
The problem I was facing was that the event I had registered in my desktop.cs class, was getting a null value. As a result of this the handler defined in WrapUpAdapter.cs class was also getting a null value exception.
So the event added in desktop.cs class was declared in an newly interface class made by me, and I tried to populate this value by assigning it a value, and as a result the handler was also able to populate values and fire the custom event.
Challenges faced:The only issue faced was that the reference of one class could not be added in another class, due to cyclic dependency and hence a workaround had to be thought about, else it would have been easy.
Note : Provide your comments by clicking below options! Thanks ! :)
0 comments:
கருத்துரையிடுக