Beispiel #1
0
        public TreeChartWin(IBaseWindow baseWin, GEDCOMIndividualRecord startPerson)
        {
            InitializeComponent();

            fBase   = baseWin;
            fPerson = startPerson;

            fTreeBox      = new TreeChartBox(new TreeChartGfxRenderer());
            fTreeBox.Base = fBase;
            //fTreeBox.Dock = DockStyle.Fill;
            //fTreeBox.DragOver += ImageTree_DragOver;
            fTreeBox.PersonModify     += ImageTree_PersonModify;
            fTreeBox.RootChanged      += ImageTree_RootChanged;
            fTreeBox.PersonProperties += ImageTree_PersonProperties;
            fTreeBox.Options           = GlobalOptions.Instance.ChartOptions;
            fTreeBox.NavRefresh       += ImageTree_NavRefresh;
            Content = fTreeBox;

            SetLang();

            miModeBoth.Tag        = TreeChartKind.ckBoth;
            miModeAncestors.Tag   = TreeChartKind.ckAncestors;
            miModeDescendants.Tag = TreeChartKind.ckDescendants;

            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;
        }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        public TreeChartWin(IBaseWindow baseWin, GEDCOMIndividualRecord startPerson)
        {
            InitializeComponent();

            tbImageSave.Image  = GKResources.iSaveImage;
            tbDocPreview.Image = GKResources.iPreview;
            tbDocPrint.Image   = GKResources.iPrint;

            tbDocPrint.Visible   = true;
            tbDocPreview.Visible = true;

            tbModes.Image  = GKResources.iTools;
            tbFilter.Image = GKResources.iFilter;
            tbPrev.Image   = GKResources.iLeft1;
            tbNext.Image   = GKResources.iRight1;

            miModeBoth.Tag        = TreeChartKind.ckBoth;
            miModeAncestors.Tag   = TreeChartKind.ckAncestors;
            miModeDescendants.Tag = TreeChartKind.ckDescendants;

            fBase   = baseWin;
            fPerson = startPerson;

            fTreeBox                   = new TreeChartBox(new TreeChartGfxRenderer());
            fTreeBox.Name              = "fTreeBox";
            fTreeBox.Base              = fBase;
            fTreeBox.Dock              = DockStyle.Fill;
            fTreeBox.DragOver         += ImageTree_DragOver;
            fTreeBox.PersonModify     += ImageTree_PersonModify;
            fTreeBox.RootChanged      += ImageTree_RootChanged;
            fTreeBox.PersonProperties += ImageTree_PersonProperties;
            fTreeBox.Options           = GlobalOptions.Instance.ChartOptions;
            fTreeBox.NavRefresh       += ImageTree_NavRefresh;

            Controls.Add(fTreeBox);
            Controls.SetChildIndex(fTreeBox, 0);
            Controls.SetChildIndex(ToolBar1, 1);

            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.Visible = false;
        }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        public void Init()
        {
            WinFormsAppHost.ConfigureBootstrap(false);

            fBase = new BaseWindowMock();

            fForm            = new Form();
            fForm.ClientSize = new System.Drawing.Size(383, 221);
            fForm.Text       = "ImageViewTests";

            fTreeChartBox      = new TreeChartBox();
            fTreeChartBox.Dock = DockStyle.Fill;

            fForm.SuspendLayout();
            fForm.Controls.Add(fTreeChartBox);
            fForm.ResumeLayout(false);
            fForm.PerformLayout();
        }