BatchGuy.App.CreateEAC3ToBatchForm.HandleBtnOpenBatchFilePathDialogClick C# (CSharp) Method

HandleBtnOpenBatchFilePathDialogClick() private method

private HandleBtnOpenBatchFilePathDialogClick ( ) : void
return void
        private void HandleBtnOpenBatchFilePathDialogClick()
        {
            SaveFileDialog sfd = new SaveFileDialog();
            Setting setting = Program.ApplicationSettingsService.GetSettingByName(Constant.FeatureCreateEac3toBatchFileFormSaveEac3ToBatchFileDirectory);

            if (setting != null)
                sfd.InitialDirectory = setting.Value;
            else
                sfd.InitialDirectory = @"C:\";

            sfd.Filter = "Batch File|*.bat";
            sfd.Title = "Save eac3to Batch File";
            sfd.ShowDialog();

            if (!string.IsNullOrEmpty(sfd.FileName))
            {
                OnDialogInitialDirectoryChanged(this, new DialogInitialDirectoryChangedEventArgs() { FeatureName = Constant.FeatureCreateEac3toBatchFileFormSaveEac3ToBatchFileDirectory, DirectoryPath = Path.GetDirectoryName(sfd.FileName) });
                using (FileStream fs = File.Create(sfd.FileName))
                {
                }
                txtBatFilePath.Text = sfd.FileName;
            }
        }
CreateEAC3ToBatchForm