public PedigreeGenerator(int Width, int Height, Patient proband) { height = Height; width = Width; //pedigreeControl1 = new PedigreeControl(); pedigreeControl1 = new PedigreeControl(false); pedigreeLegend1 = new PedigreeLegend(); pedigreeComment1 = new PedigreeComment(); pedigreeTitleBlock1 = new PedigreeTitleBlock(); sysDefaultAnnotations = new PedigreeAnnotationList("-1"); sysDefaultAnnotations.BackgroundListLoad(); pedigreeSettingsForm1 = new PedigreeSettingsForm(sysDefaultAnnotations); if (proband != null) { if (proband.guiPreferences.Count == 0) { GUIPreference gp = new GUIPreference(); gp.BackgroundLoadWork(); proband.guiPreferences.Add(gp); } } }
public PedigreeSettingsForm(PedigreeAnnotationList annotations) { InitializeComponent(); ///////////// theHoldingPen = new AnnotationContainer(new Point(5, 20), new Size(110, 340), "theHoldingPen"); theHoldingPen.active = false; theHoldingPen.justification = (int)AnnotationContainer.Alignements.LEFT_JUSTIFIED; annotation_areas.Add(theHoldingPen); ///////////// // lowerList = new AnnotationContainer(new Point(172, 128), new Size(175, 123), "lowerList"); lowerList = new AnnotationContainer(new Point(172, 154), new Size(175, 123), "lowerList"); lowerList.justification = (int)AnnotationContainer.Alignements.CENTER_JUSTIFIED; lowerList.Position = (int)AnnotationContainer.IconRelation.LOWER_CENTER; annotation_areas.Add(lowerList); ///////////// // middleLeftUpperList = new AnnotationContainer(new Point(126, 67), new Size(100, 24), "middleLeftUpperList"); middleLeftUpperList = new AnnotationContainer(new Point(126, 93), new Size(100, 24), "middleLeftUpperList"); middleLeftUpperList.Position = (int)AnnotationContainer.IconRelation.MID_LEFT_UPPER; middleLeftUpperList.justification = (int)AnnotationContainer.Alignements.RIGHT_JUSTIFIED; annotation_areas.Add(middleLeftUpperList); ///////////// //middleLeftLowerList = new AnnotationContainer(new Point(126, 99), new Size(100, 24), "middleLeftLowerList"); middleLeftLowerList = new AnnotationContainer(new Point(126, 125), new Size(100, 24), "middleLeftLowerList"); middleLeftLowerList.Position = (int)AnnotationContainer.IconRelation.MID_LEFT_LOWER; middleLeftLowerList.justification = (int)AnnotationContainer.Alignements.RIGHT_JUSTIFIED; annotation_areas.Add(middleLeftLowerList); ///////////// // middleRightUpperList = new AnnotationContainer(new Point(294, 67), new Size(100, 24), "middleRightUpperList"); middleRightUpperList = new AnnotationContainer(new Point(294, 93), new Size(100, 24), "middleRightUpperList"); middleRightUpperList.Position = (int)AnnotationContainer.IconRelation.MID_RIGHT_UPPER; middleRightUpperList.justification = (int)AnnotationContainer.Alignements.LEFT_JUSTIFIED; annotation_areas.Add(middleRightUpperList); ///////////// //middleRightLowerList = new AnnotationContainer(new Point(294, 99), new Size(100, 24), "middleRightLowerList"); middleRightLowerList = new AnnotationContainer(new Point(294, 125), new Size(100, 24), "middleRightLowerList"); middleRightLowerList.Position = (int)AnnotationContainer.IconRelation.MID_RIGHT_LOWER; middleRightLowerList.justification = (int)AnnotationContainer.Alignements.LEFT_JUSTIFIED; annotation_areas.Add(middleRightLowerList); ///////////// //upperLeftList = new AnnotationContainer(new Point(152, 39), new Size(100, 24), "upperLeftList"); upperLeftList = new AnnotationContainer(new Point(152, 65), new Size(100, 24), "upperLeftList"); upperLeftList.Position = (int)AnnotationContainer.IconRelation.UPPER_LEFT; upperLeftList.justification = (int)AnnotationContainer.Alignements.RIGHT_JUSTIFIED; annotation_areas.Add(upperLeftList); ///////////// //upperRightList = new AnnotationContainer(new Point(270, 39), new Size(100, 24), "upperRightList"); upperRightList = new AnnotationContainer(new Point(270, 65), new Size(100, 24), "upperRightList"); upperRightList.Position = (int)AnnotationContainer.IconRelation.UPPER_RIGHT; upperRightList.justification = (int)AnnotationContainer.Alignements.LEFT_JUSTIFIED; annotation_areas.Add(upperRightList); ///////////////////////////////////////////////////// // upperCenterList = new AnnotationContainer(new Point(215, 5), new Size(100, 24), "upperCenterList"); upperCenterList = new AnnotationContainer(new Point(215, 5), new Size(100, 50), "upperCenterList"); upperCenterList.Position = (int)AnnotationContainer.IconRelation.CENTER_TOP; upperCenterList.justification = (int)AnnotationContainer.Alignements.CENTER_JUSTIFIED; annotation_areas.Add(upperCenterList); if (annotations.IsLoaded == false) annotations.BackgroundListLoad(); foreach (PedigreeAnnotation pa in annotations) { Annotation a = new Annotation(pa); a.MouseMove += new System.Windows.Forms.MouseEventHandler(this.annotation_MouseMove); a.MouseDown += new System.Windows.Forms.MouseEventHandler(this.annotation_MouseDown); a.MouseUp += new System.Windows.Forms.MouseEventHandler(this.annotation_MouseUp); a.MouseEnter += new System.EventHandler(this.annotation_MouseEnter); a.MouseLeave += new System.EventHandler(this.annotation_MouseLeave); tabPage1.Controls.Add(a); a.BringToFront(); if (a.hraAnnotation != null) { foreach (AnnotationContainer ac in annotation_areas) { if (ac.area == a.hraAnnotation.area) { ac.AddAnnotation(a); break; } } } } //foreach (DiseaseObject o in SessionManager.Instance.MetaData.Diseases) //{ // PedigreeSymbolRow psr = new PedigreeSymbolRow(o); // symbolsPanel.Controls.Add(psr); //} }