示例#1
0
 private void objDatagrid_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
 {
     e.NewItem = new Guideline()
     {
         Name = "", TestCases = new ObservableCollection <TestCase>()
     };
 }
示例#2
0
 private void dataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e)
 {
     var newItem = new BodyEntry();
     newItem.Parent = body.bodyList;
     var be = body.bodyList.Liste.LastOrDefault<BodyEntry>();
     if (be != null)
     {
         newItem.Bauch = be.Bauch;
         newItem.BizepsAngespannt = be.BizepsAngespannt;
         newItem.BizepsLocker = be.BizepsLocker;
         newItem.Bonus = be.Bonus;
         newItem.Brust = be.Brust;
         newItem.Gewicht = be.Gewicht;
         newItem.Hals = be.Hals;
         newItem.Oberschenkel = be.Oberschenkel;
         newItem.Schultern = be.Schultern;
         newItem.Wade = be.Wade;
         e.NewItem = newItem;
     }
     else
     {
         newItem.Bauch = 0;
         newItem.BizepsAngespannt = 0;
         newItem.BizepsLocker = 0;
         newItem.Bonus = 0;
         newItem.Brust = 0;
         newItem.Gewicht = 0;
         newItem.Hals = 0;
         newItem.Oberschenkel = 0;
         newItem.Schultern = 0;
         newItem.Wade = 0;
         e.NewItem = newItem;
     }
 }
示例#3
0
        private void RecomputePrice(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
        {
            float _price = 0;

            foreach (BaseCar car in CarManager.Instance.carListOrdered)
            {
                _price += car.Цена;
            }

            label_price.Content = _price + " $";
        }
 private void grdMain_AddingNewItem(object sender, System.Windows.Controls.AddingNewItemEventArgs e)
 {
     try
     {
         e.NewItem = new ParameterData {
             SystemDefault = false
         };
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#5
0
 private void DataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e)
 {
     try
     {
         if (ConsoleDataGrid.Items.Count > 0)
         {
             var border = VisualTreeHelper.GetChild(ConsoleDataGrid, 0) as Decorator;
             if (border != null)
             {
                 var scroll = border.Child as ScrollViewer;
                 if (scroll != null) scroll.ScrollToEnd();
             }
         }
     }catch(ArgumentOutOfRangeException)
     {
         //consume naively
     }
 }
示例#6
0
文件: DataGrid.cs 项目: JianwenSun/cc
 /// <summary>
 ///     A method that is called before a new item is created so that
 ///     overrides can participate in the construction of the new item.
 /// </summary>
 /// <remarks>
 ///     The default implementation raises the AddingNewItem event.
 /// </remarks>
 /// <param name="e">Event arguments that provide access to the new item.</param>
 protected virtual void OnAddingNewItem(AddingNewItemEventArgs e)
 {
     if (AddingNewItem != null)
     {
         AddingNewItem(this, e);
     }
 }
 private void DataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e)
 {
     mIsAdd = true;
 }
 private void dataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e)
 {
     dataGrid.Items.Refresh();
 }
 private void dgvProjects_AddingNewItem(object sender, AddingNewItemEventArgs e)
 {
     RefreshInternal();
     CheckAllTests();
 }
示例#10
0
		void Datagrid_AddingNewItem(object sender, AddingNewItemEventArgs e)
		{
			var settings = new SettingsEntry(this);
			settings.Type = typeof(string);
			var vm = new SettingsVM(settings);
			e.NewItem = vm;
		}
示例#11
0
 private void datagridFilm_AddingNewItem(object sender, AddingNewItemEventArgs e)
 {
 }
示例#12
0
 private void MainDataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e)
 {
     MainDataGrid.UpdateLayout();
     MainDataGrid.UpdateDefaultStyle();
     MainDataGrid.Items.Refresh();
 }
示例#13
0
 public void OnAddingNewWorkItem(object sender, AddingNewItemEventArgs e)
 {
     e.NewItem = new WorkItemVM();
 }
示例#14
0
 private void PatternsGridOnAddingNewItem(object sender, AddingNewItemEventArgs addingNewItemEventArgs)
 {
 }
 private void GrdCountries_OnAddingNewItem(object sender, AddingNewItemEventArgs e)
 {
     isInsertMode = true;
 }
示例#16
0
 private void Datagridconfiguration_AddingNewItem(object sender, AddingNewItemEventArgs e)
 {
     MessageBox.Show("Hallo");
 }
示例#17
0
文件: DataGrid.cs 项目: JianwenSun/cc
        private object AddNewItem()
        {
            Debug.Assert(CanUserAddRows, "AddNewItem called when the end-user cannot add new rows.");
            Debug.Assert(!IsAddingNewItem, "AddNewItem called when a pending add is taking place.");

            // Hide the placeholder
            UpdateNewItemPlaceholder(/* isAddingNewItem = */ true);

            // Create the new item (with app's help, or not)
            object newItem = null;
            IEditableCollectionViewAddNewItem ani = (IEditableCollectionViewAddNewItem)Items;

            if (ani.CanAddNewItem)
            {
                AddingNewItemEventArgs e = new AddingNewItemEventArgs();
                OnAddingNewItem(e);
                newItem = e.NewItem;
            }

            newItem = (newItem != null) ? ani.AddNewItem(newItem) : EditableItems.AddNew();

            // initialize the new item
            if (newItem != null)
            {
                OnInitializingNewItem(new InitializingNewItemEventArgs(newItem));
            }

            // CancelEdit and CommitEdit rely on IsAddingNewItem
            CommandManager.InvalidateRequerySuggested();

            return newItem;
        }
示例#18
0
 private void GridOnAddingNewItem(object sender, AddingNewItemEventArgs addingNewItemEventArgs)
 {
     addingNewItemEventArgs.NewItem = Factory.Create();
 }
示例#19
0
 private void DataGridAddingNewItemExecute(AddingNewItemEventArgs e)
 {
 }
 private void playersDataGrid_AddingNewItem(object sender, AddingNewItemEventArgs e) 
 {
     
 }