コード例 #1
0
 /// <summary>
 /// Esta función crea un nuevo modelo de dato wpf que representa un modelo de datos(data model) dentro del proyecto WPF.
 /// </summary>
 /// <param name="dataModelEntity">El modelo de datos</param>
 public void CreateDataModelDocument(DataModelEntity dataModelEntity)
 {
     if (dataModelEntity == null)
     {
         throw new ArgumentNullException("dataModelEntity", "dataModelEntity can not be null");
     }
     dataModelDocumentWpf = new DataModelDocumentWpf(this, dataModelEntity);
 }
コード例 #2
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="table">La tabla a modificar</param>
 /// <param name="dataModelDocumentWpf">El modelo de datos con tablas y relaciones.</param>
 public WindowTable(TableWpf table, DataModelDocumentWpf dataModelDocumentWpf)
 {
     if (table == null)
     {
         throw new ArgumentNullException("table", "table can not be null");
     }
     if (dataModelDocumentWpf == null)
     {
         throw new ArgumentNullException("dataModelDocumentWpf", "dataModelDocumentWpf can not be null");
     }
     InitializeComponent();
     this.dataModelDocumentWpf      = dataModelDocumentWpf;
     this.tableWPF                  = table;
     this.DataContext               = tableWPF;
     this.textTableName.LostFocus  += new RoutedEventHandler(textTableName_LostFocus);
     this.checkIsStorage.Checked   += new RoutedEventHandler(checkIsStorage_Checked);
     this.checkIsStorage.Unchecked += new RoutedEventHandler(checkIsStorage_Unchecked);
     this.Loaded += new RoutedEventHandler(WindowTable_Loaded);
 }