Exemplo n.º 1
0
 void projekt_verlauf_AssociationChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     if (e.Action == System.ComponentModel.CollectionChangeAction.Remove)
     {
         this._context.DeleteObject((projekt_verlauf)e.Element);
     }
 }
Exemplo n.º 2
0
 private void ItemReference_AssociationChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     if (Item != null && typeof(Medicine).IsInstanceOfType(Item))
     {
         Dosage = ((Medicine)Item).SuggestedDosage;
     }
 }
Exemplo n.º 3
0
 private void SchemaChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     if ((e.Action == System.ComponentModel.CollectionChangeAction.Remove))
     {
         this.InitVars();
     }
 }
Exemplo n.º 4
0
 void Tables_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     if (e.Action == System.ComponentModel.CollectionChangeAction.Add)
     {
         CheckAddTable(e.Element as DataTable);
     }
 }
 private void Columns_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     // refresh the grid views by reseting the data context after the columns have changed
     myDataGrid0.DataContext = null;
     myDataGrid0.DataContext = myDataTable;
     myDataGrid1.DataContext = null;
     myDataGrid1.DataContext = myDataTable;
 }
        protected override void OnColumnsCollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
        {
            MyGridControl  grid       = (GridControl as MyGridControl);
            DragController controller = (grid != null) ? grid.GetDragController() : null;

            if (controller != null && controller.IsDragging)
            {
                return;
            }
            base.OnColumnsCollectionChanged(sender, e);
        }
Exemplo n.º 7
0
 private void Columns_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     if (e.Action == System.ComponentModel.CollectionChangeAction.Add)
     {
         DataColumn column = (DataColumn)e.Element;
         if (column.DataType == typeof(DateTime))
         {
             column.DateTimeMode = (DataSetDateTime)currentSchema.Rows[column.Ordinal]["ColumnDateTimeMode"];
         }
     }
 }
 protected virtual void OnCollectionChanged(System.ComponentModel.CollectionChangeEventArgs e)
 {
     if ((this.RaiseCollectionChangedEvents == false))
     {
         return;
     }
     if ((this.CollectionChanged != null))
     {
         this.CollectionChanged(this, e);
     }
     CodeFluent.Runtime.ServiceModel.CollectionChangeNotifier.Notify(this, e, this._h2943838991);
     this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs("Count"));
     this.OnPropertyChanged(new System.ComponentModel.PropertyChangedEventArgs("Item[]"));
 }
Exemplo n.º 9
0
 void PassReference_AssociationChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     if (e.Action == System.ComponentModel.CollectionChangeAction.Add)
     {
         RMSDataAccessLayer.Pass p = (RMSDataAccessLayer.Pass)e.Element;
         if (p.StartDate <= DateTime.Now && p.EndDate > DateTime.Now)
         {
         }
         else
         {
             Status = "Invalid Pass";
             OnPropertyChanged("Status");
         }
     }
 }
Exemplo n.º 10
0
        /// <summary>
        /// Maintains the list of indices.
        /// </summary>
        /// <param name="sender">The object that originated the event.</param>
        /// <param name="e">The event arguments.</param>
        private void Constraints_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
        {
            // This will add indices to the specialized 'Indices' list when they are added as a constraint.
            if (e.Action == System.ComponentModel.CollectionChangeAction.Add)
            {
                if (e.Element is Index)
                {
                    this.Indices.Add(e.Element as Index);
                }
            }

            // This will remove an index from the specialized 'Indices' list when they are removed as a constraint.
            if (e.Action == System.ComponentModel.CollectionChangeAction.Remove)
            {
                if (e.Element is Index)
                {
                    this.Indices.Remove(e.Element as Index);
                }
            }
        }
Exemplo n.º 11
0
        void ItemLinks_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
        {
            if (!(e.Element is BarButtonItemLink))
            {
                return;
            }
            BarButtonItemLink linkItem = e.Element as BarButtonItemLink;

            if (linkItem.Item == null)
            {
                return;
            }
            if (!(linkItem.Item is BarButtonItemEx))
            {
                return;
            }
            var barButton = linkItem.Item as BarButtonItemEx;

            if (barButton.BeginGroup)
            {
                linkItem.BeginGroup = true;
            }
        }
Exemplo n.º 12
0
 private void Relations_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     changedOccur = true;
 }
Exemplo n.º 13
0
 protected void OnCollectionChanged(System.ComponentModel.CollectionChangeEventArgs ccevent)
 {
     throw new NotImplementedException("OnCollectionChanged");
 }
Exemplo n.º 14
0
 private static void CollectionChanged(Object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     //InvokeHelper.AssertOnEventThread();
     InvokeHelper.BeginInvoke(SynchroniseSearches);
 }
 private void Constraints_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     collectionChanged = true;
 }
 private void Columns_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     counter++;
 }
Exemplo n.º 17
0
 void StoreReference_AssociationChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     OnPropertyChanged("Store");
 }
Exemplo n.º 18
0
 private void Tables_CollectionChanging(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     counter++;
 }
 void PayrollItems_AssociationChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     OnPropertyChanged("TotalIncome");
     OnPropertyChanged("TotalDeductions");
     OnPropertyChanged("NetAmount");
 }
 private void Relations_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     changesCounter++;
 }
Exemplo n.º 21
0
        /// <summary>
        /// This method is called when the <see cref="ControlDataRepository.Favorites"/> are changed.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The event args.</param>
        private void OnControlDataRepositoryFavoritesChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
        {
            // Quit if the favorites model is not defined
            if (favoritesModel is null)
            {
                return;
            }

            switch (e.Action)
            {
            case System.ComponentModel.CollectionChangeAction.Refresh: {
                // Clear all favorites
                favoritesModel.Children.Clear();

                // Make sure each model is reset
                foreach (var controlModel in controlModels.Values)
                {
                    controlModel.IsFavorite = false;
                }
            }
            break;

            case System.ComponentModel.CollectionChangeAction.Add: {
                if (e.Element is ControlData controlData)
                {
                    // Add the the control to the favorites category
                    if (FindFavoriteControlModel(controlData) is null)
                    {
                        favoritesModel.Children.Add(CreateControlModel(controlData));
                    }

                    // Make sure the model is marked as a favorite
                    if (controlModels.TryGetValue(controlData.FullName, out var controlModel))
                    {
                        controlModel.IsFavorite = true;
                    }
                }
            }
            break;

            case System.ComponentModel.CollectionChangeAction.Remove: {
                if (e.Element is ControlData controlData)
                {
                    // Remove existing favorite
                    var favoriteControlModel = FindFavoriteControlModel(controlData);
                    if (favoriteControlModel != null)
                    {
                        favoritesModel.Children.Remove(favoriteControlModel);
                    }

                    // Make sure the model is not marked as a favorite
                    if (controlModels.TryGetValue(controlData.FullName, out var controlModel))
                    {
                        controlModel.IsFavorite = false;
                    }
                }
            }
            break;
            }

            // Finds the model, if any, for a control represented in the Favorites category
            ControlTreeNodeModel FindFavoriteControlModel(ControlData controlData)
            {
                return(favoritesModel
                       .Children
                       .OfType <ControlTreeNodeModel>()
                       .FirstOrDefault(x => x.FullName == controlData.FullName));
            }
        }
Exemplo n.º 22
0
 private void Tables_CollectionChanged(object sender, System.ComponentModel.CollectionChangeEventArgs e)
 {
     SetupDataTables();
 }