public void Modify() { if (!Maj && OnModify.IsRef()) { OnModify(); } }
public static void Modify(MethodBase method, Delegate callback) { if (!(OnModify?.InvokeWhileTrue(method, callback) ?? true)) { return; } GetEndpoint(method).Modify(callback); AddEntry(HookEntryType.Modification, method, callback); }
public void Add(T obj) { var transf = ((Component)(object)obj).transform; transf.parent = storage.transform; lookup.Add(transf, obj); OnModify?.Invoke(this); }
public void ModifyConditions(decimal entry, DateTime entryExpiry, decimal target, DateTime targetExpiry) { PriceEntry = entry; EntryExpiry = entryExpiry; PriceTarget = target; ExpireDate = targetExpiry; _IsChanged = true; OnModify?.Invoke(this); }
public void ModifyAt(int _indParent, int _indChild) { ListWithChildEventArgs <T1, T2> evargs = new ListWithChildEventArgs <T1, T2>(this[_indParent], this.child[_indChild], _indParent); if (this.OnModify != null) { OnModify.Invoke(this, evargs); } this.child[_indChild] = evargs.ChildItem; }
public override void ViewDidLoad() { base.ViewDidLoad(); var whiteBackground = new UIView(new RectangleF(0, 0, View.Frame.Width, View.Frame.Height)); whiteBackground.BackgroundColor = UIColor.White; View.AddSubview(whiteBackground); Title = _comparison.Name; NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add, (sender, args) => { OnAddComparable.Fire(this, new EventArgs()); }); _tableView = new ComparisonLineupTableView(_comparison, new RectangleF(0, 0, View.Frame.Width, View.Frame.Height - 88), UITableViewStyle.Plain); _tableView.OnComparableSelected += (sender, args) => { OnComparableSelected.Fire(this, EventArgs.Empty); }; _tableView.OnComparableDeleted += (sender, args) => { if (_tableView.Comparables.Count > 0) { return; } _trashButton.Enabled = false; if (_tableView.Editing) { NavigationItem.RightBarButtonItem.Enabled = true; _tableView.SetEditing(false, true); } }; _tableView.OnNewCheaper += (sender, args) => { OnNewCheaper.Fire(this, EventArgs.Empty); }; View.AddSubview(_tableView); _toolbar = new UIToolbar(new RectangleF(0, View.Frame.Height - 88, View.Frame.Width, 44)); _toolbar.TintColor = UIColor.DarkGray; var toolbarItems = new List <UIBarButtonItem>(); var editButtonItem = new UIBarButtonItem("Edit comparison", UIBarButtonItemStyle.Bordered, (sender, args) => { OnModify.Fire(this, new EventArgs()); }); _trashButton = new UIBarButtonItem(UIBarButtonSystemItem.Trash, (sender, args) => { NavigationItem.RightBarButtonItem.Enabled = _tableView.Editing; _tableView.SetEditing(!_tableView.Editing, true); }); toolbarItems.Add(editButtonItem); toolbarItems.Add(new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace)); toolbarItems.Add(_trashButton); _toolbar.SetItems(toolbarItems.ToArray(), false); View.AddSubview(_toolbar); if (_tableView.Comparables.Count == 0) { _trashButton.Enabled = false; } }
void VariablesModified(string key, object oldValue, object newValue, KeyList <string, object> sender) { OnModify?.Invoke(this, key, oldValue, newValue); }