private void BUT_browsedir_Click(object sender, EventArgs e)
{
try
{
folderBrowserDialog1.SelectedPath = Path.GetDirectoryName(TXT_logfile.Text);
}
catch { }
folderBrowserDialog1.ShowDialog();
if (folderBrowserDialog1.SelectedPath != "")
{
TXT_jpgdir.Text = folderBrowserDialog1.SelectedPath;
string file = folderBrowserDialog1.SelectedPath + Path.DirectorySeparatorChar + "location.txt";
if (File.Exists(file))
{
try
{
using (StreamReader sr = new StreamReader(file))
{
string cotent = sr.ReadToEnd();
Match match = Regex.Match(cotent, "seconds_offset: ([0-9]+)");
if (match.Success)
{
TXT_offsetseconds.Text = match.Groups[1].Value;
}
}
}
catch { }
}
}
}