public delegate void appoint(object sender, AppointmentCreatingEventArgs e);
public event appoint Comming;
public void create(object sender, AppointmentCreatingEventArgs e)
{
if (Comming != null)
{
Comming(sender, e);
}
}
void MainPage_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
isMouseDown = false;
((UIElement)sender).ReleaseMouseCapture();
Comming += new appoint(scheduler_AppointmentCreating);
}
void scheduler_AppointmentCreating(object sender, AppointmentCreatingEventArgs e)
{
MessageBox.Show("asdsad");
SessionAppointment sess = new SessionAppointment();
// sess.Copy();
sess.Subject = "我的Demo ";
sess.Body = "The Entity Framework combined with the Entity Data Model (EDM) bring data access to a new level in Enterprise Applications. Entity Framework Object Services APIs, while providing a lot of automated functionality, are filled with features that give developers much more control over how objects are handled. The most important jobs of the ObjectContext are relationship management and change tracking. This session drills into how the ObjectContext manages relationships and how you can control its behavior. This is especially important in SOA scenarios where you may need to transport ObjectGraphs. We also look closely at change tracking, focusing on the challenges and solutions for dealing with data concurrency when moving objects across tiers in your enterprise applications. Knowing what to expect from these features and how to take control of them will empower you in your use of the Entity Framework and EDMs in your Web sites, SOA applications, and smart clients, as well as other applications that share the EDM.";
sess.SessionRoom = "406";
sess.Speaker = "Shoun Petrik";
sess.Level = 400;
IAppointment other = sess;
//sess.CopyFrom(other);
e.NewAppointment = sess;
}
我想在MouseLeftButtonUp事件调用 scheduler_AppointmentCreating这个事件 用委托也不行..两个事件源不一样啊..怎么办??大鸟们 帮看下 小弟谢了