Beispiel #1
0
 public void Clear()
 {
     Sessioninfos.Clear();
     Groups.Clear();
     Packages.Clear();
     Counters.Clear();
 }
Beispiel #2
0
        async Task ExecuteLoadCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            if (ProfileService?.StoredDisciple == null)
            {
                IsBusy = false;
                return;
            }

            try {
                var allGroups = await dataService.GetParticipatedGroups();

                Groups.Clear();
                allGroups.ToList().ForEach(r => Groups.Add(r));
                OnPropertyChanged("HasGroupParticipated");
                OnPropertyChanged("NoGroupParticipated");
            } catch (Exception ex) {
                Debug.WriteLine(ex);
            } finally {
                IsBusy = false;
            }
        }
        private void SelectionChanged()
        {
            if (SelectedMatch == null)
            {
                return;
            }

            Document = PopulateDocument();
            Groups.Clear();

            Mouse.OverrideCursor = Cursors.Wait;

            try
            {
                var groups = GroupViewModel.Create(regex, SelectedMatch);

                foreach (var groupViewModel in groups)
                {
                    Groups.Add(groupViewModel);
                }
            }
            catch (Exception)
            {
                // ignored
            }

            Mouse.OverrideCursor = null;
        }
Beispiel #4
0
        public void Reset()
        {
            BeginUpdate();
            Enabled = false;

            HeaderStyle = ColumnHeaderStyle.None;

            CurrentEntity = null;

            Items.Clear();
            Columns.Clear();
            Groups.Clear();

            ShowGroups = false;

            _imageList.Images.Clear();
            SmallImageList = null;

            _commandMenu.Reset();
            ContextMenuStrip = null;

            CheckBoxes = false;
            OwnerDraw  = false;

            Enabled = true;
            EndUpdate();
        }
Beispiel #5
0
        private bool ConstructGroups()
        {
            int expectedParticipantCount = GetExpectedParticipantCount();
            int groupCount = (int)Math.Ceiling(expectedParticipantCount / (double)PlayersPerGroupCount);

            foreach (GroupBase group in Groups)
            {
                group.MarkForDeletion();

                foreach (Match match in group.Matches)
                {
                    match.MarkForDeletion();
                }
            }

            Groups.Clear();

            for (int groupIndex = 0; groupIndex < groupCount; ++groupIndex)
            {
                Groups.Add(AddGroup());
                Groups.Last().ConstructGroupLayout(PlayersPerGroupCount);
            }

            return(true);
        }
Beispiel #6
0
        public async Task PopulateGroups()
        {
            if (IsBusy == false)
            {
                IsBusy = true;
                Groups.Clear();

                Group  group  = new Group();
                Person person = new Person();

                person.FirstName   = "erica ";
                person.LastName    = "Blah";
                person.Address     = " Quack";
                person.ImageSource = "man1.jpeg";
                person.PhoneNumber = new List <PhoneNumber>();
                person.PhoneNumber.Add(new PhoneNumber {
                    Desc = "Casa", Number = "4332232"
                });
                group.People = new List <Person>();
                group.People.Add(person);
                group.Name = "Grupo blabla";
                Groups.Add(group);

                List <Group> groups = await App.GroupDataBase.GetGroupsAsync();

                foreach (Group item in groups)
                {
                    Groups.Add(item);
                }
                IsBusy = false;
            }
        }
Beispiel #7
0
 public void Clear()
 {
     Users.Clear();
     Staff.Clear();
     Groups.Clear();
     ChatMessages.Clear();
 }
Beispiel #8
0
        internal void SortGroups(ColumnHeader columnHeader, SortOrder sortOrder, Comparison <ListViewGroup> comparison)
        {
            SetArrow(columnHeader, sortOrder);

            SortedColumn = columnHeader;
            SortOrder    = sortOrder;

            if (sortOrder != SortOrder.None)
            {
                var groups = new ListViewGroup[Groups.Count];
                Groups.CopyTo(groups, 0);

                switch (sortOrder)
                {
                case SortOrder.Ascending:
                    Array.Sort(groups, comparison);
                    break;

                case SortOrder.Descending:
                    Array.Sort(groups, comparison);
                    Array.Reverse(groups);
                    break;
                }

                Groups.Clear();
                Groups.AddRange(groups);
            }
        }
 public void SelectedCultureChanged(ListPanel listPanel)
 {
     this._inChange = true;
     try {
         var index = listPanel.IntValue;
         ModuleLogger.Log("SelectedCultureChanged {0}", index);
         var    culture   = Cultures[index].Name;
         string groupName = null;
         Groups.Clear();
         Characters.Clear();
         foreach (var group in this.allCharacters[culture].Keys)
         {
             if (groupName == null)
             {
                 groupName = group;
             }
             Groups.Add(new NameVM {
                 Name = group
             });
         }
         foreach (var character in this.allCharacters[culture][groupName])
         {
             Characters.Add(new CharacterVM(character));
         }
         SelectedCultureIndex   = index;
         SelectedGroupIndex     = 0;
         SelectedCharacterIndex = 0;
     } catch (System.Exception e) {
         ModuleLogger.Log("{0}", e);
         throw;
     }
     this._inChange = false;
 }
Beispiel #10
0
 public void ClearDictionaries()
 {
     Disciplines.Clear();
     Groups.Clear();
     Teachers.Clear();
     Time.Clear();
 }
 protected override void AfterGetData()
 {
     Groups.SelectMany(x => x.Units).ForEach(x => x.PropertyChanged -= UnitOnPropertyChanged);
     Groups.Clear();
     Groups.AddRange(_groups);
     Groups.SelectMany(x => x.Units).ForEach(x => x.PropertyChanged += UnitOnPropertyChanged);
 }
Beispiel #12
0
 /// <summary>
 /// 根据<paramref name="searchText"/>过滤<see cref="Groups"/>
 /// </summary>
 /// <param name="searchText">查询关键字</param>
 public void GroupsFilter(string searchText)
 {
     PersonOnDisplay = Persons.FirstOrDefault();
     Groups.Clear();
     foreach (var person in Persons)
     {
         if (person.Name.Contains(searchText) ||
             person.StudentNumber.Contains(searchText) ||
             person.Dormitory.Contains(searchText) ||
             person.NativeProvince.Equals(searchText))
         {
             PersonGroup group = Groups.Where(g => g.LastName == person.LastName).FirstOrDefault();
             if (group == null)
             {
                 var newGroup = new PersonGroup(person.LastName);
                 newGroup.Items.Add(person);
                 Groups.Add(newGroup);
             }
             else
             {
                 group.Items.Add(person);
             }
         }
     }
 }
        async Task ExecuteLoadItemsCommand()
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Groups.Clear();
                var items = await DataStore.GetItemsAsync(true);

                foreach (var item in items)
                {
                    Groups.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Beispiel #14
0
    public void Unload()
    {
        foreach (MapObject mo in _AllObjects)
        {
            mo.DisposeNoUnlink();
        }
        _AllObjects.Clear();
        _Objects.Clear();
        _PassiveObjects.Clear();
        Players.Clear();
        Groups.Clear();
        ConsolePlayer = null;
        FileName      = null;
        MapStructure  = null;

        GameManager.Instance.CallDelegateOnNextFrame(() =>
        {
            MapView.Instance.OnMapUnloaded();
            return(false);
        });

        //* WB_pathfind
        if (PathfindingType == PathfindingType.Flood)
        {
            Wizard.Unload();
        }
        //* end
    }
Beispiel #15
0
        void FlushGroups()
        {
            for (int i = 0; i < Groups.Count; i++)
            {
                ListViewGroup group = Groups[i];

                if (group.Items.Count == 0)
                {
                    _groups.Remove((SmartGroup)group);
                    Groups.RemoveAt(i--);
                }
            }

            bool shouldShow = (Groups.Count > 1);

            if (ShowGroups != shouldShow)
            {
                ShowGroups = shouldShow;

                if (shouldShow)
                {
                    // Recreate the groups
                    Groups.Clear();
                    Groups.AddRange(new List <ListViewGroup>(_groups.Values).ToArray());
                }
            }
        }
Beispiel #16
0
        public static void OnLoggedOut()
        {
            loggedIn        = false;
            loginSession    = null;
            currentUserId   = null;
            socketConnected = false;
            Users.Clear();
            ReadStates.Clear();
            Messages.Clear();
            Channels.Clear();
            Members.Clear();
            Groups.Clear();
            HasMoreMembers.Clear();
            DiscoverChannels.Clear();
            if (_instance != null)
            {
                using (_instance.window.getScope())
                {
                    HomePage.currentState.Clear();
                }
            }

            _client.Close();
            UpdateWindowCanvas();
        }
        public void Load()
        {
            UnitOfWork = Container.Resolve <IUnitOfWork>();

            var salesUnits = UnitOfWork.Repository <SalesUnit>()
                             .Find(x => !x.IsRemoved && !x.IsLoosen && !x.Product.ProductBlock.IsService && x.OrderInTakeDate <= DateTime.Today)
                             .OrderBy(salesUnit => salesUnit.EndProductionDateCalculated)
                             .Select(salesUnit => new SalesUnitDates(salesUnit))
                             .ToList();

            _salesUnits = new ValidatableChangeTrackingCollection <SalesUnitDates>(salesUnits);

            //подписываемся на изменение каждой сущности
            _salesUnits.PropertyChanged += SalesUnitsOnPropertyChanged;

            Groups.Clear();
            var groups = _salesUnits
                         .GroupBy(x => new
            {
                Cost          = x.Model.Cost,
                Facility      = x.Model.Facility.Id,
                Product       = x.Model.Product.Id,
                Order         = x.Model.Order?.Id,
                Project       = x.Model.Project.Id,
                Specification = x.Model.Specification?.Id,
                x.PickingDate
            })
                         .Select(x => new SalesUnitDatesGroup(x))
                         .OrderBy(x => x.Units.First().Model.EndProductionDateCalculated);

            Groups.AddRange(groups);
        }
Beispiel #18
0
 public void Clear()
 {
     Form  = null;
     Name  = string.Empty;
     Title = string.Empty;
     Groups.Clear();
 }
        async Task ExecuteSearchGroupsCommand(string Groupname)
        {
            if (IsBusy)
            {
                return;
            }

            IsBusy = true;

            try
            {
                Groups.Clear();
                IEnumerable <Group> groups = await DataStore.SearchGroupAsync(Groupname);

                foreach (var item in groups)
                {
                    Groups.Add(item);
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }
            finally
            {
                IsBusy = false;
            }
        }
Beispiel #20
0
        private void LogSourceBound(object sender, EventArgs args)
        {
            // update the groups
            Groups.Clear();
            foreach (var group in LogSource.Instance.Logs.Groups
                     .OrderBy(g => g.Name))
            {
                Groups.Add(group);
            }

            // set the selected group
            if (Groups.Any())
            {
                SelectedGroup = Groups[0];
            }

            // update tails
            SetTails();

            // set the selected tail
            if (Tails.Any())
            {
                SelectedTail = Tails[0];
            }
        }
        public void Close()
        {
            Groups.Clear();
            GroupInvites.Clear();
            groupLookup.Clear();

            RemoveInternalListeners();
        }
Beispiel #22
0
 public void Reset()
 {
     Channels.Clear();
     Clients.Clear();
     Groups.Clear();
     OwnClient = ClientId.Null;
     Server    = new Server();
 }
Beispiel #23
0
        /////////PARENTS FUNCTION//////////
        public override void Load(BinaryReader reader, int size)
        {
            if (size < 20)
            {
                isEmpty = true;
                return;
            }
            someNumber = reader.ReadUInt32();
            uint triggerCount = reader.ReadUInt32();
            uint groupCount   = reader.ReadUInt32();
            uint triCount     = reader.ReadUInt32();
            uint vertexCount  = reader.ReadUInt32();

            Triggers.Clear();
            Groups.Clear();
            Tris.Clear();
            Vertices.Clear();
            for (int i = 0; i < triggerCount; i++)
            {
                Trigger trg = new Trigger
                {
                    X1    = reader.ReadSingle(),
                    Y1    = reader.ReadSingle(),
                    Z1    = reader.ReadSingle(),
                    Flag1 = reader.ReadInt32(),
                    X2    = reader.ReadSingle(),
                    Y2    = reader.ReadSingle(),
                    Z2    = reader.ReadSingle(),
                    Flag2 = reader.ReadInt32()
                };
                Triggers.Add(trg);
            }
            for (int i = 0; i < groupCount; i++)
            {
                GroupInfo grp = new GroupInfo
                {
                    Size   = reader.ReadUInt32(),
                    Offset = reader.ReadUInt32()
                };
                Groups.Add(grp);
            }
            for (int i = 0; i < triCount; i++)
            {
                ColTri tri    = new ColTri();
                ulong  legacy = reader.ReadUInt64();
                tri.Vert1   = (int)(legacy & mask);
                tri.Vert2   = (int)((legacy >> 18 * 1) & mask);
                tri.Vert3   = (int)((legacy >> 18 * 2) & mask);
                tri.Surface = (int)(legacy >> (18 * 3));
                Tris.Add(tri);
            }
            for (int i = 0; i < vertexCount; i++)
            {
                Pos vtx = new Pos(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle());
                Vertices.Add(vtx);
            }
        }
Beispiel #24
0
 private void LogGroupSourceChanged(object sender, EventArgs args)
 {
     Debug.WriteLine("Updating groups...");
     Groups.Clear();
     foreach (var group in LogSource.Instance.Logs.Groups)
     {
         Groups.Add(group);
     }
 }
Beispiel #25
0
 public override void NotifyDeleting()
 {
     base.NotifyDeleting();
     if (OnNotifyDeleting_Identity != null)
     {
         OnNotifyDeleting_Identity(this);
     }
     Groups.Clear();
 }
Beispiel #26
0
        /// <summary>Should be overridden to reset settings to their default values.</summary>
        public override void ResetSettings()
        {
            Groups.Clear();

            Groups.Add(new AlignGroup("Assignments", 1,
                                      new AlignPattern(EPattern.RegularExpression, @"(?<![+\-*/%^~&|!=<>])=(?![=<>])", 0, 1, "Assignment not preceded by: +,-,*,/,%,^,~,&,|,!,=,<,> and not followed by: =,<,>"),
                                      new AlignPattern(EPattern.RegularExpression, @"(?<![&|])[+\-*/%^~&|]={1}", -1, 2, "Assignment preceded by: +,-,*,/,%,^,~,&,| but not preceded by &&,||"),
                                      new AlignPattern(EPattern.RegularExpression, @"&&=|\|\|=", -2, 3, "Assignments &&= and ||=")));

            Groups.Add(new AlignGroup("Lambda", 1,
                                      new AlignPattern(EPattern.Substring, @"=>")));

            Groups.Add(new AlignGroup("Comparisons", 1,
                                      new AlignPattern(EPattern.Substring, @"==", 0, 2),
                                      new AlignPattern(EPattern.Substring, @"!=", 0, 2),
                                      new AlignPattern(EPattern.Substring, @"<=", 0, 2),
                                      new AlignPattern(EPattern.Substring, @">=", 0, 2),
                                      new AlignPattern(EPattern.RegularExpression, @"(?<!=)>(?!=)", 0, 1, "> not preceded or followed by ="),
                                      new AlignPattern(EPattern.RegularExpression, @"(?<!=)<(?!=)", 0, 1, "< not preceded or followed by =")));

            Groups.Add(new AlignGroup("Boolean operators", 1,
                                      new AlignPattern(EPattern.Substring, @"&&"),
                                      new AlignPattern(EPattern.Substring, @"||")));

            Groups.Add(new AlignGroup("Line comments", 1,
                                      new AlignPattern(EPattern.RegularExpression, @"/{2,}", 0, 0, "Two or more '/' characters")));

            Groups.Add(new AlignGroup("Open brackets", 0,
                                      new AlignPattern(EPattern.Substring, @"(")));

            Groups.Add(new AlignGroup("Close brackets", 0,
                                      new AlignPattern(EPattern.Substring, @")")));

            Groups.Add(new AlignGroup("Scope start", 0,
                                      new AlignPattern(EPattern.Substring, @"{")));

            Groups.Add(new AlignGroup("Scope end", 1,
                                      new AlignPattern(EPattern.Substring, @"}")));

            Groups.Add(new AlignGroup("Increment / Decrement", 1,
                                      new AlignPattern(EPattern.Substring, @"++"),
                                      new AlignPattern(EPattern.Substring, @"--")));

            Groups.Add(new AlignGroup("Plus / Minus", 1,
                                      new AlignPattern(EPattern.RegularExpression, @"(?<!\+)\+(?!\+)", 0, 1, "Matches '+' but not '++'"),
                                      new AlignPattern(EPattern.RegularExpression, @"(?<!\-)\-(?!\-)", 0, 1, "Matches '-' but not '--'")));

            Groups.Add(new AlignGroup("Comma delimiter", 0,
                                      new AlignPattern(EPattern.Substring, @",")));

            Groups.Add(new AlignGroup("Members", 1,
                                      new AlignPattern(EPattern.RegularExpression, @"(?<![~^])(?<=\s)m_[0-9a-zA-Z_]*", 0, 1, "Matches class members that begin with 'm_'"),
                                      new AlignPattern(EPattern.RegularExpression, @"(?<![~^])(?<=\s)_[0-9a-zA-Z_]*", 0, 1, "Matches class members that begin with '_'"),
                                      new AlignPattern(EPattern.RegularExpression, @"(?<=\s)[_a-zA-z][_a-zA-Z0-9]*_", 0, 1, "Matches class members that end with '_'")));

            AlignStyle = EAlignCharacters.Spaces;
        }
        public void Refresh()
        {
            Groups.Clear();

            LastLoadingDate     = DateTime.Now;
            _currentReversePage = 0;
            _currentPage        = 0;

            LoadAgendaPage(_currentPage);
        }
Beispiel #28
0
        public void LoadXml(String xml)
        {
            XmlDocument xDoc = new XmlDocument();

            xDoc.LoadXml(xml);
            XmlNode settingsNode = null;

            for (int i = 0; i < xDoc.ChildNodes.Count; i++)
            {
                if (xDoc.ChildNodes[i].Name == "Settings")
                {
                    settingsNode = xDoc.ChildNodes[i];
                }
            }
            if (settingsNode != null)
            {
                for (int i = 0; i < settingsNode.ChildNodes.Count; i++)
                {
                    XmlNode cNode = settingsNode.ChildNodes[i];
                    switch (cNode.Name)
                    {
                    case "UserRegistration":
                        bool val = false;
                        bool.TryParse(cNode.InnerText, out val);
                        UserRegistration = val;
                        break;

                    case "Users":
                        Users.Clear();
                        foreach (XmlNode child in cNode.ChildNodes)
                        {
                            Users.Add(Data.User.LoadXml(child));
                        }
                        break;

                    case "Databases":
                        Databases.Clear();
                        foreach (XmlNode child in cNode.ChildNodes)
                        {
                            Databases.Add(Data.Database.LoadXml(child));
                        }
                        break;

                    case "Groups":
                        Groups.Clear();
                        foreach (XmlNode child in cNode.ChildNodes)
                        {
                            Groups.Add(child.InnerText);
                        }
                        break;
                    }
                }
            }
        }
Beispiel #29
0
        private async Task ExecuteLoadGroupsCommand()
        {
            var groups = await _service.ReadGroups();

            Groups.Clear();
            groups.ForEach(group =>
            {
                GroupModel g = (GroupModel)GroupModelAdapter.Convert(group);
                Groups.Add(g);
            });
        }
 public void ClearData()
 {
     Teachers.Clear();
     Lessons.Clear();
     Forms.Clear();
     Groups.Clear();
     Subjects.Clear();
     YearGroups.Clear();
     YearGroups.Add(NoneYear);
     Subjects.Add(NoneSubject);
 }