Beispiel #1
0
        private void HandlesSaveToolStripMenuItemClick()
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.Filter = "BatchGuy File|*.batchGuyEac3toSettings";
            sfd.Title  = "Save eac3to Settings File";
            sfd.ShowDialog();

            if (!string.IsNullOrEmpty(sfd.FileName))
            {
                dgvFiles.CurrentCell = null; //force the cell change so cell changed event fires
                _batchGuyEAC3ToSettings.X264Files        = this.GetX264Files();
                _batchGuyEAC3ToSettings.X264FileSettings = this.GetX264FileSettings();
                IJsonSerializationService <BatchGuyEAC3ToSettings> jsonSerializationService = new JsonSerializationService <BatchGuyEAC3ToSettings>();
                IBatchGuyEAC3ToSettingsService batchGuyEAC3ToSettingsService = new BatchGuyEAC3ToSettingsService(jsonSerializationService);
                batchGuyEAC3ToSettingsService.Save(sfd.FileName, _batchGuyEAC3ToSettings);
                if (batchGuyEAC3ToSettingsService.Errors.Count() > 0)
                {
                    MessageBox.Show(batchGuyEAC3ToSettingsService.Errors.GetErrorMessage(), "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Beispiel #2
0
        private void HandlessaveToolStripMenuItemClick()
        {
            SaveFileDialog sfd = new SaveFileDialog();

            sfd.Filter = "BatchGuy File|*.batchGuyEac3toSettings";
            sfd.Title  = "Save eac3to Settings File";
            sfd.ShowDialog();

            if (!string.IsNullOrEmpty(sfd.FileName))
            {
                _batchGuyEAC3ToSettings.AVSBatchSettings = this.GetAVSBatchSettings();
                _batchGuyEAC3ToSettings.AVSScript        = this.GetAVSScript();
                this.SetFFMSIndexSettings();
                IJsonSerializationService <BatchGuyEAC3ToSettings> jsonSerializationService = new JsonSerializationService <BatchGuyEAC3ToSettings>();
                IBatchGuyEAC3ToSettingsService batchGuyEAC3ToSettingsService = new BatchGuyEAC3ToSettingsService(jsonSerializationService);
                batchGuyEAC3ToSettingsService.Save(sfd.FileName, _batchGuyEAC3ToSettings);
                if (batchGuyEAC3ToSettingsService.Errors.Count() > 0)
                {
                    MessageBox.Show(batchGuyEAC3ToSettingsService.Errors.GetErrorMessage(), "Error Occurred.", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }