Exemplo n.º 1
0
        public BandRow(Band b, Controller controller, Form parent, bool canEditMembers)
        {
            InitializeComponent();
            this._controller = controller;
            this._model = b;
            this._parent = parent;

            this.band.Text = b.getName();
            int i = 0;
            foreach (Member member in b.getMembers())
            {
                MemberRow row = new MemberRow(member, _controller, _parent, canEditMembers);
                row.Top = row.Height * i + this.Height;
                this.Controls.Add(row);
                i++;
            }

            //update the height

            MemberRow temp = new MemberRow(new Member("temp", "temp") , _controller, _parent, canEditMembers);
            this.Height += i * temp.Height;
        }
Exemplo n.º 2
0
 public void incrementMembers(MemberRow r)
 {
     this._rows.Add(r);
     this.Controls.Add(r);
 }
Exemplo n.º 3
0
        internal void highlightMember(MemberRow memberRow, Member m, Form parent)
        {
            if ( _views.Contains(parent) || _current_view.Equals(parent) )
            {
                //We don't want this to do anything on the mainview
            }
            else
            {
                //Set our highlighted one
                memberHighlight = m;

                // Make it green
                memberRow.setGreen();
                //Make the others not green
                foreach (MemberRow row in ((AddBand)parent).getRows())
                    if (!row.Equals(memberRow))
                        row.setNormal();

                //enable edit button
                ((AddBand)parent).enableEdit();
            }
        }
Exemplo n.º 4
0
 internal void addMemeberToAddBandView(Member m, AddBand view)
 {
     MemberRow row = new MemberRow(m, this, view, true);
     addingMembers.Add(m);
     //Place row
     row.Top = view.getInsertHeight() + view.getNumberOfMembers() * row.Height;
     //Adjust height of window
     view.Height += row.Height;
     //Add row
     view.incrementMembers(row);
 }