Apr 23, 2012, 3:21 PM
Problem executing DirectMethod from a Class extends Window
Hi I have a Class from another assembly that defines a window. Then I reference this class in another VS project and I cant get the listener to execute see the code:
ExtNetErrorReport.designer.cs
ExtNetErrorReport.designer.cs
public partial class ExtNetErrorReport : Window
{
private void InitializeComponent()
{
///btnSend Report
btnSend = new Button
{
ID = "btnSend",
Flat = true,
Text = "Report",
Icon = Ext.Net.Icon.Disk
};
btnSend.Listeners.Click.Handler = "Ext.net.DirectMethods.btnSend_CLick();";
///
/// Main Window
///
this.Buttons.Add(btnSend);
this.Width = 640;
this.Height = 480;
this.Modal = true;
this.Minimizable = false;
this.Resizable = false;
this.AutoFocus = true;
this.Collapsible = false;
this.Draggable = false;
this.Icon = Icon.BugAdd;
this.ID = "windowErrorReport";
}
private Button btnSend;
}
ExtNetErrorReport.cs public partial class ExtNetErrorReport
{
public ExtNetErrorReport()
{
InitializeComponent();
}
[DirectMethod]
public void btnSend_CLick()
{
Ext.Net.X.MessageBox.Notify("Hi", "LLLL").Show();
}
This code is in the Project I want to reference the classprotected void btnNew_Click(object sender, DirectEventArgs e)
{
try
{
....
}
catch (Exception ex)
{
bugs.extnet.ExtNetErrorReport myErro = new bugs.extnet.ExtNetErrorReport();
myErro.Render(this.form);
}
}
Thanks
Last edited by camazorro; Apr 25, 2012 at 1:31 PM.