void from_Deleted(object sender, MouseDoubleClickEventArgs e) { if (Reset != null) { widgetSource.Drag -= new EventHandler(widget_Drag); widgetTarget.Drag -= new EventHandler(widget_Drag); Reset(this, e); } }
void iConnection_Deleted(object sender, MouseDoubleClickEventArgs e) { IComponent iWidget = sender as IComponent; if (iWidget != null) { RemoveWidget(iWidget); } }
void iConnection_Configure(object sender, MouseDoubleClickEventArgs e) { IComponent iWidget = sender as IComponent; if (iWidget != null) { if (iWidget.Component.InputDataContext == null && e.WidgetType != WidgetType.MenuForm) { Dialog.ShowInformationDialog(SilverlightVisualDesigners.Properties.Resources.InvalidConnectionError, SilverlightVisualDesigners.Properties.Resources.InvalidConnectionMessage, this.LayoutRoot); return; } IWindow iwindows = null; switch (e.WidgetType) { case WidgetType.ListForm: iwindows = new EditListFormControl(sender as ListFormSilverlight, serviceDocument.DataModel); break; case WidgetType.MenuForm: iwindows = new EditMenuFormControl(sender as MenuFormSilverlight, serviceDocument.DataModel); break; case WidgetType.ShowDataForm: iwindows = new EditShowDataFormControl(sender as ShowDataFormSilverlight, serviceDocument.DataModel); break; case WidgetType.EnterSingleDataForm: iwindows = new EditEnterSingleDataFormControl(sender as EnterSingleDataFormSilverlight); break; case WidgetType.Table: iwindows = new EditTableControl(sender as TableSilverlight, this); break; default: break; } // Deshabilitar el Canvas para no capturar más eventos. Utils.DisablePanel(this.LayoutRoot); UserControl userControl = iwindows as UserControl; this.LayoutRoot.Children.Add(userControl); Grid.SetColumn(userControl, 2); Grid.SetRow(userControl, 1); iwindows.Closed += new EventHandler(editControl_Closed); } }
void iConnection_Configure(object sender, MouseDoubleClickEventArgs e) { IComponent iWidget = sender as IComponent; if (iWidget != null) { EditTableControl iwindows = new EditTableControl(sender as TableSilverlight, this); iwindows.TableNameChanged += new EventHandler(DataModelDesignerSilverlight_TableNameChanged); // Deshabilita el canvas para no capturar mas eventos. Utils.DisablePanel(this.LayoutRoot); this.LayoutRoot.Children.Add(iwindows as UserControl); iwindows.Closed += new EventHandler(editControl_Closed); } }
void iConnection_Deleted(object sender, MouseDoubleClickEventArgs e) { IComponent iWidget = sender as IComponent; if (iWidget != null) { if (iWidget.Component is DataSource) { DataSource dataSource = iWidget.Component as DataSource; this.listDataModels.Items.Add(dataSource.RelatedTable); } if (iWidget.Component is ListForm || iWidget.Component is MenuForm) { listBoxStartWidget.Items.Remove(iWidget.Component as Widget); } RemoveWidget(iWidget); } }