예제 #1
0
        private void importToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ActiveMdiChild != null)
            {
                OpenFileDialog openFileDialog = new OpenFileDialog();
                openFileDialog.InitialDirectory = utility.GetCurrentDirectory();
                //openFileDialog.Filter = "Gedcom Files (*.ged)|*.ged|All Files (*.*)|*.*";
                childForm             = (FamilyForm2)this.ActiveMdiChild;
                openFileDialog.Filter = childForm.GetFileTypeFilter(FamilyFileTypeOperation.Import);

                if (openFileDialog.ShowDialog(this) == DialogResult.OK)
                {
                    string FileName = openFileDialog.FileName;

                    /*FamilyForm2*/
                    childForm.MdiParent = this;
                    childForm.Show();

                    //trace.TraceInformation("strip: " + childForm.statusStrip1.Text + " " + childForm.statusStrip1.ToString() + " " + childForm.statusStrip1.Visible);

                    childForm.ImportFile(FileName);
                    if (childForm.Text.IndexOf(newFamilyTreeStringName) >= 0)
                    {
                        int filenameStart = FileName.LastIndexOf('\\');
                        if ((filenameStart >= 0) && (filenameStart < (FileName.Length - 1)))
                        {
                            FileName = FileName.Substring(FileName.LastIndexOf('\\') + 1);
                        }
                        childForm.Text += "; " + FileName;
                    }
                }
            }
        }
예제 #2
0
        private void ShowNewForm(object sender, EventArgs e)
        {
            FamilyForm2 childForm = new FamilyForm2(true);

            childForm.MdiParent = this;
            childForm.Text      = newFamilyTreeStringName + childFormNumber++;
            childForm.Show();
        }
예제 #3
0
        void newWebItem_Click(object sender, EventArgs e)
        {
            trace.TraceInformation("select sub menu:" + sender.ToString());

            childForm = new FamilyForm2();

            /*FamilyForm2*/
            childForm.MdiParent = this;
            childForm.Text      = "Family Tree:" + sender.ToString();
            childForm.Show();

            //trace.TraceInformation("strip: " + childForm.statusStrip1.Text + " " + childForm.statusStrip1.ToString() + " " + childForm.statusStrip1.Visible);

            childForm.OpenWeb(sender.ToString());
        }
예제 #4
0
        private void OpenFile(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();

            openFileDialog.InitialDirectory = utility.GetCurrentDirectory();
            //openFileDialog.Filter = "Gedcom Files (*.ged)|*.ged|All Files (*.*)|*.*";
            childForm             = new FamilyForm2();
            openFileDialog.Filter = childForm.GetFileTypeFilter(FamilyFileTypeOperation.Open);

            if (openFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                string FileName = openFileDialog.FileName;

                /*FamilyForm2*/
                childForm.MdiParent = this;
                childForm.Show();

                //trace.TraceInformation("strip: " + childForm.statusStrip1.Text + " " + childForm.statusStrip1.ToString() + " " + childForm.statusStrip1.Visible);

                childForm.OpenFile(FileName);
            }
        }