Esempio n. 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            using (SaveFileDialog svDialog = new SaveFileDialog())
            {
                svDialog.Filter           = "G510 Image|*.g510";
                svDialog.InitialDirectory = string.IsNullOrEmpty(_lastPath) ? Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) : _lastPath;
                svDialog.AddExtension     = true;
                svDialog.FileName         = "Tastaturtext";

                if (svDialog.ShowDialog() == DialogResult.OK)
                {
                    _lastPath = Path.GetDirectoryName(svDialog.FileName);
                    _core.SaveToFile(svDialog.FileName);
                }
            }
        }