예제 #1
0
        public override void SetParentForm(FamilyForm2 parentForm)
        {
            this.parentForm = parentForm;

            trace.TraceInformation("ComparePanel1::SetParentForm()");
            parentForm.SelectedPersonChanged += OnSelectedPersonChangedEvent;
        }
예제 #2
0
        public TreeViewPanel4()
        {
            controlList = new List <Control>();

            this.Dock  = DockStyle.Fill;
            parentForm = null;

            trace.TraceInformation("TreeViewPanel4::TreeViewPanel4()");
        }
예제 #3
0
 private void label1_Click(object sender, EventArgs e)
 {
     trace.TraceInformation("label1_Click():" + this.ToString() + " " + this.Height);
     if (this.Parent.GetType() == typeof(FamilyForm2))
     {
         FamilyForm2 fForm = (FamilyForm2)this.Parent;
         fForm.SetSelectedIndividual(m_Individual.GetXrefName());
     }
 }
예제 #4
0
        public TreeViewPanel1()
        {
            layout     = new FamilyLayout();
            layoutDone = false;

            this.Height = 0;
            this.Width  = 0;
            layoutDone  = false;
            parentForm  = null;
        }
예제 #5
0
        public TreeViewPanel2()
        {
            controlList = new List <Control>();

            this.Dock  = DockStyle.Fill;
            parentForm = null;
            //details = new MessageBox();

            trace.TraceInformation("TreeViewPanel2::TreeViewPanel2()");
        }
예제 #6
0
        public PersonViewPanel1()
        {
            trace       = new TraceSource("PersonViewPanel1", SourceLevels.Warning);
            controlList = new List <Control>();

            this.Dock     = DockStyle.Fill;
            parentForm    = null;
            propertyGrid1 = new PropertyGrid();

            CustomProperty nameCat   = new CustomProperty("Name");
            CustomProperty personCat = new CustomProperty("Person");
            //CustomProperty eventsCat = new CustomProperty("Events");
            CustomProperty birthCat = new CustomProperty("Birth");
            CustomProperty deathCat = new CustomProperty("Death");

            propertyList.Add(new CustomProperty(ref nameCat, "First Name", "", typeof(string), false, true));
            propertyList.Add(new CustomProperty(ref nameCat, "Middle Name", "", typeof(string), false, true));
            propertyList.Add(new CustomProperty(ref nameCat, "Last Name", "", typeof(string), false, true));
            propertyList.Add(new CustomProperty(ref nameCat, "Birth Surname", "", typeof(string), false, true));
            propertyList.Add(new CustomProperty(ref nameCat, "Full Name", "", typeof(string), false, true));
            propertyList.Add(new CustomProperty(ref nameCat, "Public Name", "", typeof(string), false, true));

            propertyList.Add(new CustomProperty(ref personCat, "Sex", PersonPropertySex.Unknown, typeof(PersonPropertySex), false, true));
            propertyList.Add(new CustomProperty(ref birthCat, "Date", DateTime.MinValue, typeof(DateTime), false, true));
            propertyList.Add(new CustomProperty(ref birthCat, "Place", "", typeof(string), false, true));
            propertyList.Add(new CustomProperty(ref deathCat, "Date", DateTime.MinValue, typeof(DateTime), false, true));
            propertyList.Add(new CustomProperty(ref deathCat, "Place", "", typeof(string), false, true));
            //propertyList.Add(new CustomProperty("Custom", "", typeof(StatesList), false, true)); //<-- doesn't work

            propertyGrid1.Location = new System.Drawing.Point(0, 0);
            propertyGrid1.Size     = new System.Drawing.Size(this.Width, this.Height - 40);
            propertyGrid1.Anchor   = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
            //propertyGrid1.Dock = DockStyle.Fill;
            propertyGrid1.SelectedObject = propertyList;


            this.Controls.Add(propertyGrid1);

            saveButton = new Button();

            saveButton.Text        = "Save";
            saveButton.Top         = this.Height - saveButton.Height;
            saveButton.MouseClick += saveButton_MouseClick;
            saveButton.Visible     = true;
            saveButton.Enabled     = true;
            saveButton.AutoSize    = true;
            saveButton.Anchor      = AnchorStyles.Left | AnchorStyles.Bottom;
            this.Controls.Add(saveButton);

            this.VisibleChanged += PersonViewPanel1_VisibleChanged;

            trace.TraceInformation("PersonViewPanel1::PersonViewPanel1()");
            trace.TraceInformation("  size" + this.Width + "x" + this.Height);
            trace.TraceInformation("  size" + propertyGrid1.Width + "x" + propertyGrid1.Height);
        }
예제 #7
0
        //private bool visible;


        public ImageViewPanel1()
        {
            controlList = new List <Control>();

            //this.Dock = DockStyle.Fill;

            layoutDone = false;

            parentForm = null;

            this.VisibleChanged += ImageViewPanel1_VisibleChanged;
            //this.Layout += ImageViewPanel1_Layout;
            trace.TraceInformation("ImageViewPanel1::ImageViewPanel1()");
        }
예제 #8
0
        public ImageViewPanel1()
        {
            controlList = new List <Control>();

            //this.Dock = DockStyle.Fill;

            layoutDone = false;

            parentForm = null;
            printMode  = false;

            this.VisibleChanged += ImageViewPanel1_VisibleChanged;
            //this.Layout += ImageViewPanel1_Layout;
            if (printMode)
            {
                Debug.WriteLine("ImageViewPanel1::ImageViewPanel1()");
            }
        }
예제 #9
0
        //private ScrollableControl vScroll;
        //private ScrollableControl hScroll;
        //private ScrollBar vScrollBar;
        //private ScrollBar hScrollBar;


        public TreeViewPanel5()
        {
            controlList = new List <IndividualButton>();

            this.Dock  = DockStyle.Fill;
            parentForm = null;

            maxGenerations = 3;
            UpdateControlSizes();

            generationNoCtrl = new DomainUpDown();

            //generationNoCtrl.Left = 0;

            for (int i = 9; i >= 2; i--)
            {
                generationNoCtrl.Items.Add(i.ToString());
            }
            generationNoCtrl.SelectedItem = "3";
            generationNoCtrl.Width        = 40;

            this.Controls.Add(generationNoCtrl);

            generationNoCtrl.SelectedItemChanged += generationNoCtrl_SelectedItemChanged;

            /*vScrollBar = new VScrollBar();
             * vScrollBar.Dock = DockStyle.Right;
             * hScrollBar = new HScrollBar();
             * hScrollBar.Dock = DockStyle.Bottom;*/

            //vScroll = new ScrollableControl();
            //hScroll = new ScrollableControl();
            //this.SetBounds
            this.VScroll = true;
            this.HScroll = true;
            //SetStyle(ControlStyles.FixedHeight | ControlStyles.FixedWidth, true);
            //ScrollBars =
            AutoScroll = true;

            this.VisibleChanged += TreeViewPanel5_VisibleChanged;

            trace.TraceInformation("TreeViewPanel5::TreeViewPanel5()");
        }
예제 #10
0
        public NotePanel()
        {
            controlList = new List <Control>();

            this.Dock  = DockStyle.Fill;
            parentForm = null;

            textBox = new TextBox();

            textBox.Left = 0;
            textBox.Top  = 0;
            //textBox.Right = 200;
            textBox.Size      = new System.Drawing.Size(200, 80);
            textBox.Multiline = true;
            textBox.Dock      = DockStyle.Fill;
            textBox.Anchor    = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;

            this.Controls.Add(textBox);
            trace.TraceInformation("NotePanel::NotePanel()");
        }
예제 #11
0
 private void IndividualControl3_MouseDown(object sender, MouseEventArgs e)
 {
     if (trace.Switch.Level.HasFlag(SourceLevels.Information))
     {
         if (m_Individual != null)
         {
             trace.TraceInformation("IndividualControl3_MouseDown():" + m_Individual.GetName());
         }
         else
         {
             trace.TraceInformation("IndividualControl3_MouseDown():null");
         }
         trace.TraceInformation("IndividualControl3_MouseDown():" + this.ToString() + " " + this.Height);
         trace.TraceInformation("IndividualControl3_MouseDown():this.Parent.ToString:" + this.Parent.ToString());
     }
     if (this.Parent.GetType() == typeof(FamilyForm2))
     {
         FamilyForm2 fForm = (FamilyForm2)this.Parent;
         fForm.SetSelectedIndividual(m_Individual.GetXrefName());
     }
 }
예제 #12
0
 //public abstract void SetSelectedIndividual(String xrefName);
 public abstract void SetParentForm(FamilyForm2 parentForm);
        public CompletenessViewPanel1()
        {
            trace       = new TraceSource("PersonViewPanel1", SourceLevels.Warning);
            controlList = new List <Control>();

            this.Dock  = DockStyle.Fill;
            parentForm = null;
            //descendantGenerationNo = 0;

            settingsButton = new Button();

            settingsButton.Text = "Settings";

            settingsButton.Left = 0;

            this.settingsButton.MouseClick += settingsButton_MouseClick;

            this.Controls.Add(settingsButton);

            startButton = new Button();

            startButton.Text = "Analyse";

            startButton.Name = "Parent";

            startButton.Left = settingsButton.Right;

            this.startButton.MouseClick += startButton_MouseClick;

            this.Controls.Add(startButton);

            stopButton = new Button();

            stopButton.Left = startButton.Right;

            stopButton.Text = "Stop";

            this.stopButton.MouseClick += stopButton_MouseClick;

            stopButton.Enabled = false;
            //stopButton.

            this.Controls.Add(stopButton);

            ancestorGenerationNoCtrl = new DomainUpDown();

            ancestorGenerationNoCtrl.Left = stopButton.Right;

            ancestorGenerationNoCtrl.Items.Add("All g. ancestors");
            for (int i = 20; i >= 5; i--)
            {
                ancestorGenerationNoCtrl.Items.Add(i.ToString() + " g. ancestors");
            }
            ancestorGenerationNoCtrl.SelectedItem = "5 g. ancestors";
            ancestorGenerationNoCtrl.Width        = 100;
            //ancestorGenerationNoCtrl.AutoSize = true;

            this.Controls.Add(ancestorGenerationNoCtrl);

            descendantGenerationNoCtrl          = new DomainUpDown();
            descendantGenerationNoCtrl.Text     = "Descendants";
            descendantGenerationNoCtrl.Left     = ancestorGenerationNoCtrl.Right;
            descendantGenerationNoCtrl.Enabled  = true;
            descendantGenerationNoCtrl.AutoSize = true;
            descendantGenerationNoCtrl.Items.Add("All g. descendants");
            for (int i = 10; i >= 0; i--)
            {
                descendantGenerationNoCtrl.Items.Add(i.ToString() + " g. descendants");
            }
            descendantGenerationNoCtrl.SelectedItem = "0 g. descendants";
            descendantGenerationNoCtrl.Width        = 100;
            this.Controls.Add(descendantGenerationNoCtrl);

            stopButton.Enabled = false;
            //stopButton.

            resultList = new ListView();

            resultList.Top = startButton.Bottom;
            //resultList.Width = 400;
            //resultList.Height = 400;

            resultList.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
            resultList.Left   = 3;
            //resultList.Margin.Right = 3;
            resultList.Location = new System.Drawing.Point(3, 20);
            resultList.Size     = new System.Drawing.Size(200, 80);
            //resultList.Left = 3;

            //resultList.MultiColumn = true;
            //resultList.ScrollAlwaysVisible = true;
            //resultList.MouseClick += resultList_MouseClick;
            resultList.SelectedIndexChanged += resultList_SelectedIndexChanged;
            resultList.Columns.Add("Name", 120, HorizontalAlignment.Left);
            resultList.Columns.Add("Distance", 40, HorizontalAlignment.Right);
            resultList.Columns.Add("Relation", 40, HorizontalAlignment.Left);
            resultList.Columns.Add("Birth", 80, HorizontalAlignment.Left);
            resultList.Columns.Add("Death", 80, HorizontalAlignment.Left);
            resultList.Columns.Add("Details", 250, HorizontalAlignment.Left);
            resultList.View = View.Details;
            resultList.AllowColumnReorder = true;
            resultList.FullRowSelect      = true;
            resultList.ShowItemToolTips   = true;

            resultList.MouseUp += ResultList_MouseUp;

            /*resultList.ContextMenuStrip = new ContextMenuStrip();
             * ToolStripItem openItem = new ToolStripMenuItem();
             * openItem.Text = "Open...";
             * openItem.MouseUp += ContextMenuStrip_SelectOpen;
             * resultList.ContextMenuStrip.Items.Add(openItem);
             *
             * ToolStripItem saveItem = new ToolStripMenuItem();
             * saveItem.Text = "Save...";
             * saveItem.MouseUp += ContextMenuStrip_SelectSave;
             * resultList.ContextMenuStrip.Items.Add(saveItem);
             *
             * ToolStripItem exportItem = new ToolStripMenuItem();
             * exportItem.Text = "Export to Text...";
             * exportItem.MouseUp += ContextMenuStrip_SelectExport;
             * resultList.ContextMenuStrip.Items.Add(exportItem);*/


            this.Controls.Add(resultList);

            utility = new FamilyUtility();

            limits = GetSanitySettings(utility.GetCurrentDirectory() + "\\SanitySettings.fssan");

            trace.TraceInformation("CompletenessViewPanel1::CompletenessViewPanel1()");
        }
예제 #14
0
        public ComparePanel1()
        {
            controlList = new List <Control>();

            this.Dock          = DockStyle.Fill;
            parentForm         = null;
            searchTextBox      = new ComboBox();
            searchTextBox.Name = "SearchText";
            searchTextBox.Left = 0;
            //searchTextBox.Location = new System.Drawing.Point(0, 0);
            //searchTextBox.Size = new System.Drawing.Size(213, 20);
            //searchTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
            searchTextBox.TabIndex = 0;

            searchTextBox.KeyPress += searchTextBox_KeyPress;



            this.Controls.Add(searchTextBox);

            startButton = new Button();

            startButton.Text = "Search";

            startButton.Name = "Parent";
            //startButton.Location = new System.Drawing.Point(211, 0);
            //startButton.Size = new System.Drawing.Size(74, 23);

            startButton.Left = searchTextBox.Right;
            //startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));

            this.startButton.MouseClick += startButton_MouseClick;

            startButton.TabIndex = 1;

            this.Controls.Add(startButton);


            resultList = new ListView();

            resultList.Top = startButton.Bottom;
            //resultList.Width = 400;
            //resultList.Height = 400;

            resultList.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
            resultList.Left   = 3;
            //resultList.Margin.Right = 3;
            resultList.Location = new System.Drawing.Point(3, 20);
            resultList.Size     = new System.Drawing.Size(200, 80);
            //resultList.Left = 3;

            //resultList.MultiColumn = true;
            //resultList.ScrollAlwaysVisible = true;
            //resultList.MouseClick += resultList_MouseClick;
            resultList.SelectedIndexChanged += resultList_SelectedIndexChanged;
            resultList.Columns.Add("Name1", 120, HorizontalAlignment.Left);
            //resultList.Columns.Add("Gen",      40, HorizontalAlignment.Left);
            resultList.Columns.Add("Birth.1", 80, HorizontalAlignment.Left);
            resultList.Columns.Add("Death.1", 80, HorizontalAlignment.Left);
            resultList.Columns.Add("Name.2", 120, HorizontalAlignment.Left);
            //resultList.Columns.Add("Gen",      40, HorizontalAlignment.Left);
            resultList.Columns.Add("Birth.2", 80, HorizontalAlignment.Left);
            resultList.Columns.Add("Death.2", 80, HorizontalAlignment.Left);
            //resultList.Columns.Add("Details", 250, HorizontalAlignment.Left);
            resultList.View = View.Details;
            resultList.AllowColumnReorder = true;
            resultList.FullRowSelect      = true;
            //resultList.Columns.;
            //resultList.DisplayMember = "LongName";
            //resultList.ValueMember = "ShortName";

            //resultList.Items.AddRange()

            this.Controls.Add(resultList);
            //this.AcceptButton = this.startButton;


            trace.TraceInformation("ComparePanel1::ComparePanel1()");
        }
예제 #15
0
        public AsyncTreePanel1()
        {
            scaleFactorVertical = (float)(0.0);
            personControlList   = new Dictionary <string, IndividualButton>();
            familyControlList   = new Dictionary <string, FamilyButton>();
            personThreadList    = new Dictionary <string, FindPersonThread>();
            familyThreadList    = new Dictionary <string, FindFamilyThread>();

            generationNoCtrl = new ComboBox();

            layout = new TreeViewLayout();
            for (int i = 9; i >= 2; i--)
            {
                generationNoCtrl.Items.Add(i.ToString());
            }
            //generationNoCtrl.Font = new System.Drawing.Font("Segue UI", 9F);
            //scaleFactorVertical = (float)generationNoCtrl.Font.Height / (float)generationNoCtrl.Font.Size;
            generationNoCtrl.SelectedItem = layout.GetGenerations().ToString();
            //generationNoCtrl.Width = (int)(40 * scaleFactorVertical);
            //generationNoCtrl.Height = (int)(generationNoCtrl.Font.Height * 1.5);

            font = new System.Drawing.Font("Segue UI", 9F);

            SetControlSize(generationNoCtrl, 25, font);

            //generationNoCtrl.SelectedItemChanged += GenerationNoCtrl_SelectedItemChanged;

            this.Controls.Add(generationNoCtrl);

            generationNoChange      = new Button();
            generationNoChange.Text = "Go";
            generationNoChange.Left = generationNoCtrl.Right;
            //generationNoChange.Font = new System.Drawing.Font("Segue UI", 9F);
            //Debug.WriteLine("fontsize " + generationNoChange.Font.Height + " sz " + generationNoChange.Font.Size + " sz-pt " + generationNoChange.Font.SizeInPoints);
            //generationNoChange.Width = (int)(30 * scaleFactorVertical);
            generationNoChange.MouseClick += generationNoChange_MouseClick;
            //generationNoChange.Height = (int)(generationNoChange.Font.Height * 1.5);
            SetControlSize(generationNoChange, 20, font);
            this.Controls.Add(generationNoChange);

            /*Button check = new Button();
             * check.Text = "Check";
             * check.Left = generationNoChange.Right;
             * //check.Width = (int)(50 * scaleFactorVertical);
             * check.MouseClick += check_MouseClick;
             * //check.Font = new System.Drawing.Font("Segue UI", 9F);
             * //check.Height = (int)(check.Font.Height * 1.5);
             * SetControlSize(check, 40, font);
             * this.Controls.Add(check);
             */
            /*Button force = new Button();
             * force.Text = "Force";
             * force.Left = check.Right;
             * //force.Width = (int)(50 * scaleFactorVertical);
             * force.MouseClick += force_MouseClick;
             * //force.Font = new System.Drawing.Font("Segue UI", 9F);
             * //force.Height = (int)(force.Font.Height * 1.5);
             * SetControlSize(force, 40, font);
             * this.Controls.Add(force);
             */
            mainPanel = new Panel();
            //mainPanel.VerticalScroll.Visible = true;
            //mainPanel.HorizontalScroll.Visible = true;
            mainPanel.AutoScroll = true;
            mainPanel.Dock       = DockStyle.Fill;
            mainPanel.Top        = generationNoCtrl.Bottom;
            //SetStyle(ControlStyles.FixedHeight | ControlStyles.FixedWidth, true);
            //ScrollBars =
            //AutoScroll = true;
            mainPanel.Font = font;// new System.Drawing.Font("Segue UI", 9F);
            this.Controls.Add(mainPanel);

            parentForm = null;

            trace.TraceInformation("AsyncTreePanel1::AsyncTreePanel1()");



            handleNewIndividual = new HandleNewIndividual(HandleNewIndividual_Function);
            handleNewFamily     = new HandleNewFamily(HandleNewFamily_Function);

            //this.VScroll = true;
            //this.HScroll = true;
            //SetStyle(ControlStyles.FixedHeight | ControlStyles.FixedWidth, true);
            //ScrollBars =
            //AutoScroll = true;
            this.Dock = DockStyle.Fill;

            updateDelay = null;

            this.VisibleChanged += TreeViewPanel_VisibleChanged;
        }
예제 #16
0
        public override void SetParentForm(FamilyForm2 parentForm)
        {
            this.parentForm = parentForm;

            parentForm.SelectedPersonChanged += OnSelectedPersonChangedEvent;
        }
예제 #17
0
        public RelationFinderPanel()
        {
            controlList = new List <Control>();

            this.Dock  = DockStyle.Fill;
            parentForm = null;
            //checkDescendants = false;

            startButton = new Button();

            startButton.Text = "Analyse";

            startButton.Name = "Parent";

            startButton.Left = 0;

            this.startButton.MouseClick += startButton_MouseClick;

            this.Controls.Add(startButton);

            stopButton = new Button();

            stopButton.Left = startButton.Right;

            stopButton.Text = "Stop";

            stopButton.Enabled = false;
            //stopButton.

            resultNoCtrl = new DomainUpDown();

            resultNoCtrl.Left = stopButton.Right;

            resultNoCtrl.Items.Add("All");
            for (int i = 20; i >= 5; i--)
            {
                resultNoCtrl.Items.Add(i.ToString());
            }
            resultNoCtrl.SelectedItem = "5";
            resultNoCtrl.Width        = 50;
            //resultNoCtrl.AutoSize = true;

            this.Controls.Add(resultNoCtrl);

            this.stopButton.MouseClick += stopButton_MouseClick;

            this.Controls.Add(stopButton);

            resultList = new TreeView();

            resultList.Top = startButton.Bottom;
            //resultList.Width = 400;
            //resultList.Height = 400;

            resultList.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Right;
            resultList.Left   = 3;
            //resultList.Margin.Right = 3;
            resultList.Location = new System.Drawing.Point(3, 20);
            resultList.Size     = new System.Drawing.Size(200, 80);
            //resultList.Left = 3;

            resultList.NodeMouseClick += resultList_NodeMouseClick;

            resultList.ContextMenuStrip = new ContextMenuStrip();
            ToolStripItem openItem = new ToolStripMenuItem();

            openItem.Text     = "Open...";
            openItem.MouseUp += ContextMenuStrip_SelectOpen;
            ToolStripItem saveItem = new ToolStripMenuItem();

            saveItem.Text     = "Save...";
            saveItem.MouseUp += ContextMenuStrip_SelectSave;
            ToolStripItem exportItemText = new ToolStripMenuItem();

            exportItemText.Text     = "Export text...";
            exportItemText.MouseUp += ContextMenuStrip_SelectExportText;

            ToolStripItem exportItemHtml = new ToolStripMenuItem();

            exportItemHtml.Text     = "Export HTML...";
            exportItemHtml.MouseUp += ContextMenuStrip_SelectExportHtml;

            //matchListView1.ContextMenuStrip.Items.Add("Open");
            resultList.ContextMenuStrip.Items.Add(openItem);
            resultList.ContextMenuStrip.Items.Add(saveItem);
            resultList.ContextMenuStrip.Items.Add(exportItemText);
            resultList.ContextMenuStrip.Items.Add(exportItemHtml);

            utility = new FamilyUtility();

            this.Controls.Add(resultList);

            relWorker = null;

            trace.TraceInformation("RelationFinderPanel::RelationFinderPanel()");
            ResetGui();
        }