public TreeChartWin(IBaseWindow baseWin, GDMIndividualRecord startPerson) { InitializeComponent(); tbFilter.Image = UIHelper.LoadResourceImage("Resources.btn_filter.gif"); tbPrev.Image = UIHelper.LoadResourceImage("Resources.btn_left.gif"); tbNext.Image = UIHelper.LoadResourceImage("Resources.btn_right.gif"); tbImageSave.Image = UIHelper.LoadResourceImage("Resources.btn_save_image.gif"); tbDocPreview.Image = UIHelper.LoadResourceImage("Resources.btn_preview.gif"); tbDocPrint.Image = UIHelper.LoadResourceImage("Resources.btn_print.gif"); tbOptions.Image = UIHelper.LoadResourceImage("Resources.btn_tools.gif"); tbDocPrint.Visible = true; tbDocPreview.Visible = true; miModeBoth.Tag = TreeChartKind.ckBoth; miModeAncestors.Tag = TreeChartKind.ckAncestors; miModeDescendants.Tag = TreeChartKind.ckDescendants; fBase = baseWin; fPerson = startPerson; fTreeBox = new TreeChartBox(new WFGfxRenderer()); fTreeBox.Name = "fTreeBox"; fTreeBox.Base = fBase; fTreeBox.DragOver += ImageTree_DragOver; fTreeBox.PersonModify += ImageTree_PersonModify; fTreeBox.RootChanged += ImageTree_RootChanged; fTreeBox.InfoRequest += ImageTree_InfoRequest; fTreeBox.PersonProperties += ImageTree_PersonProperties; fTreeBox.Options = GlobalOptions.Instance.TreeChartOptions; fTreeBox.NavRefresh += ImageTree_NavRefresh; fTreeBox.ZoomChanged += ImageTree_NavRefresh; fTreeBox.Dock = DockStyle.Fill; Controls.Add(fTreeBox); Controls.SetChildIndex(fTreeBox, 0); Controls.SetChildIndex(ToolBar1, 1); PopulateContextMenus(); SetLocale(); miCertaintyIndex.Checked = fTreeBox.Options.CertaintyIndexVisible; fTreeBox.CertaintyIndex = fTreeBox.Options.CertaintyIndexVisible; miTraceSelected.Checked = fTreeBox.Options.TraceSelected; fTreeBox.TraceSelected = fTreeBox.Options.TraceSelected; miTraceKinships.Checked = fTreeBox.TraceKinships; miTraceKinships.Visible = false; fController = new TreeChartWinController(this); fController.Init(baseWin); SetupDepth(); }
public TreeChartWin(IBaseWindow baseWin, GDMIndividualRecord startPerson) { InitializeComponent(); tbModes.Image = UIHelper.LoadResourceImage("Resources.btn_tools.gif"); tbFilter.Image = UIHelper.LoadResourceImage("Resources.btn_filter.gif"); tbPrev.Image = UIHelper.LoadResourceImage("Resources.btn_left.gif"); tbNext.Image = UIHelper.LoadResourceImage("Resources.btn_right.gif"); tbImageSave.Image = UIHelper.LoadResourceImage("Resources.btn_save_image.gif"); tbDocPreview.Image = UIHelper.LoadResourceImage("Resources.btn_preview.gif"); tbDocPrint.Image = UIHelper.LoadResourceImage("Resources.btn_print.gif"); tbOptions.Image = UIHelper.LoadResourceImage("Resources.btn_tools.gif"); miModeBoth.Tag = TreeChartKind.ckBoth; miModeAncestors.Tag = TreeChartKind.ckAncestors; miModeDescendants.Tag = TreeChartKind.ckDescendants; fBase = baseWin; fPerson = startPerson; fTreeBox = new TreeChartBox(new EtoGfxRenderer()); fTreeBox.Base = fBase; //fTreeBox.DragOver += ImageTree_DragOver; fTreeBox.PersonModify += ImageTree_PersonModify; fTreeBox.RootChanged += ImageTree_RootChanged; fTreeBox.InfoRequest += ImageTree_InfoRequest; fTreeBox.PersonProperties += ImageTree_PersonProperties; fTreeBox.Options = GlobalOptions.Instance.TreeChartOptions; fTreeBox.NavRefresh += ImageTree_NavRefresh; fTreeBox.ZoomChanged += ImageTree_NavRefresh; Content = fTreeBox; SetLang(); miCertaintyIndex.Checked = fTreeBox.Options.CertaintyIndexVisible; fTreeBox.CertaintyIndex = fTreeBox.Options.CertaintyIndexVisible; miTraceSelected.Checked = fTreeBox.Options.TraceSelected; fTreeBox.TraceSelected = fTreeBox.Options.TraceSelected; miTraceKinships.Checked = fTreeBox.TraceKinships; miTraceKinships.Enabled = false; fController = new TreeChartWinController(this); fController.Init(baseWin); }