예제 #1
0
        /***************************************************************/
        public void AddDiagnostic(Diagnostic d)
        {
            Items.Add(d);
            DiagnosticSummaryResultView dsrv = new DiagnosticSummaryResultView(d);

            flowLayoutPanel1.Controls.Add(dsrv);
        }
예제 #2
0
 /***************************************************************/
 private void DiagnosticSummaryResultView_DateChaged(object sender, EventArgs e)
 {
     Items.Sort(Diagnostic.CompareDiagnosticByDate);
     foreach (Control c in flowLayoutPanel1.Controls)
     {
         DiagnosticSummaryResultView dsrv = (DiagnosticSummaryResultView)c;
         flowLayoutPanel1.Controls.SetChildIndex(c, Items.IndexOf(dsrv.GetDiagnostic()));
     }
 }
예제 #3
0
        /***************************************************************/
        public void RemoveDiagnostic(Diagnostic theStudy)
        {
            Control doomed = null;

            foreach (Control c in flowLayoutPanel1.Controls)
            {
                if (c is DiagnosticSummaryResultView)
                {
                    DiagnosticSummaryResultView dsrv = (DiagnosticSummaryResultView)c;
                    if (dsrv.GetDiagnostic() == theStudy)
                    {
                        doomed = dsrv;
                    }
                }
            }
            if (doomed != null)
            {
                flowLayoutPanel1.Controls.Remove(doomed);
            }
        }