Esempio n. 1
0
 internal void OnGroupPropertyChanged( GroupContext group )
 {
     OnGroupPropertyChanged( new GroupContextEventArgs( group ) );
 }
Esempio n. 2
0
        private void UpdateGroupList()
        {
            lvGroups.BeginUpdate();

            lvGroups.Groups.Clear();
            lvGroups.Items.Clear();

            if( model != null && model.Model != null )
            {
                Libx42.Model m = model.Model;

                GroupContext[] contexts = new GroupContext[m.Groups.Count];

                for( int i = 0; i < m.Lods.Count; i++ )
                {
                    Libx42.Lod lod = m.Lods[i];

                    string lodName = string.Format( "Lod {0} - Score: {2:#,#}", i, lod.NameIndex, model.Audit.Score.LodScores[i].OverallScore );
                    ListViewGroup lodGroup = lvGroups.Groups.Add( lodName, lodName );

                    for( int j = 0; j < lod.Groups.Count; j++ )
                    {
                        GroupContext ctx = new GroupContext( this, lod.Groups[j] );
                        ListViewItem lvi = ctx.ListViewItem;

                        lvi.Checked = i == 0;
                        lvi.Group = lodGroup;

                        lvGroups.Items.Add( lvi );

                        contexts[ctx.Group.Index] = ctx;
                    }
                }

                groups = new ReadOnlyList<GroupContext>( contexts );
            }
            else
                groups = ReadOnlyList<GroupContext>.Empty;

            lvGroups.EndUpdate();
        }
Esempio n. 3
0
 public GroupContextEventArgs( GroupContext group )
 {
     this.group = group;
 }