public World(bool isSortedEntities = false, bool processAttributes = true, bool initializeAll = false) { refreshed = new HashSet <Entity>(); pools = new Dictionary <Type, IComponentPool <ComponentPoolable> >(); entityTemplates = new Dictionary <string, IEntityTemplate>(); deleted = new ListEx <Entity>( ); }
/// <summary>Fires when the parent list box changes</summary> /// <param name="d">The d.</param> /// <param name="args">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void ParentListBoxChanged(DependencyObject d, DependencyPropertyChangedEventArgs args) { var footer = d as ListBoxGridFooter; if (footer == null) { return; } if (args.NewValue == null) { return; } var listBox = args.NewValue as ListBox; if (listBox == null) { return; } footer.SetEditControlVisibility(ListEx.GetShowFooterEditControls(listBox)); var pd = DependencyPropertyDescriptor.FromProperty(ListEx.ShowFooterEditControlsProperty, typeof(ListEx)); pd.AddValueChanged(listBox, (s, e) => footer.SetEditControlVisibility(ListEx.GetShowFooterEditControls(listBox))); }
/// <summary>Fires when the default columns change</summary> /// <param name="o">The o.</param> /// <param name="args">The <see cref="System.Windows.DependencyPropertyChangedEventArgs"/> instance containing the event data.</param> private static void DefaultColumnsChanged(DependencyObject o, DependencyPropertyChangedEventArgs args) { var listItem = o as ListBoxSmartDataTemplate; if (listItem == null) { return; } listItem._defaultColumnsToSet = args.NewValue.ToString(); var item = FindAncestor <ListBoxItem>(listItem); if (item == null) { return; } var listBox = ItemsControl.ItemsControlFromItemContainer(item); if (listBox == null) { return; } var columns = ListEx.GetColumns(listBox); if (columns == null) { PopulateColumnsFromDefaults(listItem, listBox); } }
/// <inheritdoc /> override public void VisitListEx(ListEx x) { var lvalues = visitExpressionList(x.LValues); VisitElement(x.RValue); result = new ListEx(x.Position, lvalues, (Expression)result); }
public RuntimeObjectsLoader() { fileList = new StringList(); assemblyList = new ListEx<Assembly>(); referenceList = new StringList(); report = new RuntimeObjectsLoaderReport(); registerMethod = typeof(RuntimeAttribute).GetMethod("Register", BindingFlags.Instance | BindingFlags.NonPublic); Debug.Assert(registerMethod != null, "Register method not found."); }
/// <summary> /// Заполнения списка пользователей /// </summary> private void FillGrid() { ListEx <UserProfile> users = UserProfile.GetList(PageFilter); int totalRecords = users.TotalRecords; ToolsContainerControl.CheckForceFilterShow(totalRecords); PagingControl.SetTotalRecords(totalRecords); UsersGrid.DataSource = users; UsersGrid.DataBind(); UsersNumberLbl.Text = String.Format(UsersNumberTemplate, Membership.GetNumberOfUsersOnline(), totalRecords); }
/// <summary> /// /// </summary> public DataSubscriptionInfo(bool quoteSubscription, bool tickSubsription, TimeSpan[] dataBarSubscriptions) { _quoteSubscription = quoteSubscription; _tickSubscription = tickSubsription; _dataBarSubscriptions = new ListEx<TimeSpan>(); if (dataBarSubscriptions != null) { _dataBarSubscriptions.AddRange(dataBarSubscriptions); } }
public ReportViewerDialog(ListEx<RuntimeObjectsLoaderReport> reportList) { InitializeComponent(); this.reportList = reportList; lock (reportList.SyncRoot) { reportList.ItemInserted += new ListItemChangeEventHandler<RuntimeObjectsLoaderReport>(reportList_ItemInserted); reportList.ItemUpdated += new ListItemUpdateEventHandler<RuntimeObjectsLoaderReport>(reportList_ItemUpdated); reportList.ItemRemoved += new ListItemChangeEventHandler<RuntimeObjectsLoaderReport>(reportList_ItemRemoved); reportList.ListCleared += new EventHandler(reportList_ListCleared); Disposed += new EventHandler(ReportViewer_Disposed); foreach (RuntimeObjectsLoaderReport report in reportList) { reportListBox.Items.Add(report); } if (reportListBox.Items.Count > 0) reportListBox.SelectedIndex = 0; } }
/// <summary> /// Constructor, Clipboard will be hooked after this call /// </summary> private ClipboardManager() { ClipboardObjects = new ListEx<ClipboardObject>(); ClipboardMonitor.OnClipboardChange += ClipboardMonitor_OnClipboardChange; Start(); }
/// <summary> /// Initializes a new instance of the <see cref="PathNode{T}"/> class.</summary> /// <param name="node"> /// The <see cref="IGraph2D{TNode}"/> node that the <see cref="PathNode{T}"/> represents. /// </param> /// <param name="childrenCount"> /// The initial capacity of the <see cref="Children"/> collection.</param> /// <exception cref="ArgumentOutOfRangeException"> /// <paramref name="children"/> is less than zero.</exception> /// <remarks> /// The specified <paramref name="children"/> should equal the <see /// cref="IGraph2D{TNode}.Connectivity"/> of the <see cref="IGraph2D{TNode}"/> instance on which the /// path search is performed, so as to avoid costly reallocations.</remarks> public PathNodeCell(Cell node, Grid3D grid, int childrenCount) : base(node, node.Polygon, grid) { _children = new ListEx<PathNodeCell>(childrenCount); }
/// <summary> /// Main initialization point. /// </summary> /// <returns></returns> public bool Initialize() { if (_manager == null) { return false; } lock (this) { foreach (OrderStateEnum state in Enum.GetValues(typeof(OrderStateEnum))) { _ordersByState[state] = new ListEx<Order>(); } } _provider.OrdersUpdatedEvent += new OrdersUpdateDelegate(_executor_OrderUpdatedEvent); _provider.PositionsUpdateEvent += new PositionUpdateDelegate(_provider_PositionsUpdateEvent); ChangeOperationalState(OperationalStateEnum.Operational); return true; }