private void NewTtFile()
        {
            string fileName;

            if(data != null)
                data.CloseDB();
            FileLoaded = false;

            #if (PocketPC || WindowsCE || Mobile)
            SelectFileDialogEx saveFileDialog1 = new SelectFileDialogEx(null, Values.DefaultSaveFolder);
            //Kb.SetKeyboardToRegularOverride();  //set regular keyboard
            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            #else
            SaveFileDialog saveFileDialog1 = new SaveFileDialog();
            saveFileDialog1.Filter = "TwoTrails 2 Files|*.tt2";

            if (saveFileDialog1.ShowDialog() == DialogResult.OK)
            #endif
            {
                TtUtils.ShowWaitCursor();
                fileName = saveFileDialog1.FileName;

                if (fileName.Length > 4)
                {
                    if (fileName.Substring(fileName.Length - 4, 4) != ".tt2")
                        fileName += ".tt2";
                }
                else
                {
                    fileName += ".tt2";
                }

                data = NewOpenLogic.NewTwoTrailsFile(fileName);
                if (data != null)
                {
                    _FileName = fileName;

            #if (PocketPC || WindowsCE || Mobile)
                    tbTtFileName.Text = System.IO.Path.GetFileName(_FileName);
            #else
                    ChangeTitle(_FileName);
            #endif
                    data.OpenDAL();
                    tabControl1.SelectedIndex = 1;

                    Values.CurrentDbVersion = true;
                    FileLoaded = true;
                    Values.Settings.ProjectOptions.AddToRecent(_FileName, data.GetProjectID());
                    TtUtils.HideWaitCursor();

            #if !(PocketPC || WindowsCE || Mobile)
                    Values.UpdateStatusText(String.Format("File {0} Loaded.", Path.GetFileName(_FileName)));
                    pnlInfo.Visible = true;
                    UpdateInfo(File.GetCreationTime(_FileName));
                    ChangeTitle(Path.GetFileName(_FileName));
            #else
                        tbTtFileName.Text = System.IO.Path.GetFileName(fileName);
            #endif

                    using (ProjectInfoForm form = new ProjectInfoForm(data))
                    {
                        form.ShowDialog();
            #if!(PocketPC || WindowsCE || Mobile)
                        UpdateInfo();
            #endif
                    }

                    Values.DataExport.FolderName = System.IO.Path.GetFileNameWithoutExtension(_FileName);
                }
                else
                {
            #if!(PocketPC || WindowsCE || Mobile)
                    UpdateInfo();
            #endif
                }
            }
        }
 private void buttonProjectInfo_Click2(object sender, EventArgs e)
 {
     using (ProjectInfoForm form = new ProjectInfoForm(data))
     {
         form.ShowDialog();
     #if!(PocketPC || WindowsCE || Mobile)
         UpdateInfo();
     #endif
     }
 }