Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facilitates a clearer understanding of the rapid creation of new database files #84

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 45 additions & 31 deletions LiteDB.Studio/Forms/ConnectionForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 12 additions & 7 deletions LiteDB.Studio/Forms/ConnectionForm.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System;
using ICSharpCode.TextEditor.Util;

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ICSharpCode.TextEditor.Util;

namespace LiteDB.Studio.Forms
{
Expand All @@ -28,7 +26,7 @@ public ConnectionForm(ConnectionString cs)

chkUpgrade.Checked = cs.Upgrade;

cmbCulture.DataSource =
cmbCulture.DataSource =
CultureInfo.GetCultures(CultureTypes.AllCultures)
.Select(x => x.LCID)
.Distinct()
Expand Down Expand Up @@ -129,5 +127,12 @@ private void ConnectionForm_DragDrop(object sender, DragEventArgs e)
txtFilename.Text = ((System.Array)e.Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();
}
}

private void buttonBuildDefaultFileName_Click(object sender, EventArgs e)
{
var fileName = $"{DateTime.Now:yyyyMMddHHmmss}.db";
var fullFileNamePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, fileName);
txtFilename.Text = fullFileNamePath;
}
}
}