Пример #1
0
        void editControl_Closed(object sender, EventArgs e)
        {
            EditTableControl editTableControl = sender as EditTableControl;

            this.LayoutRoot.Children.Remove(editTableControl);
            this.LayoutRoot.Children.Remove(Utils.CoverRectangle);
        }
Пример #2
0
        void DataModelDesignerSilverlight_TableNameChanged(object sender, EventArgs e)
        {
            EditTableControl editTableControl = (EditTableControl)sender;
            string           tableName        = editTableControl.textBoxName.Text;

            foreach (TableSilverlight tableSilverlight in tables)
            {
                if (editTableControl.TableSilverlight != tableSilverlight && string.CompareOrdinal(tableSilverlight.Table.Name.ToUpper(CultureInfo.InvariantCulture), tableName.ToUpper(CultureInfo.InvariantCulture)) == 0)
                {
                    Dialog.ShowErrorDialog(SilverlightVisualDesigners.Properties.Resources.TableNameDuplicateError, SilverlightVisualDesigners.Properties.Resources.TableNameDuplicateMessage, editTableControl.LayoutRoot);
                    editTableControl.textBoxName.Text = String.Empty;
                }
            }
        }
Пример #3
0
        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);
            }
        }
Пример #4
0
        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);
            }
        }