Ejemplo n.º 1
0
        private void OnFileGenerateExecute(object sender, RoutedEventArgs e)
        {
            Button btn = sender as Button;

            Record  record  = (Record)dgridTvRecord.SelectedItem;
            Program program = null;

            if (record.ProgramId.Length > 0)
            {
                program = programs.GetById(record.ProgramId);
            }

            if (program == null)
            {
                txtStatusBar.Text = "対象の番組が見つかりません";
                return;
            }

            ChannelData channel = channels.GetByChannel(program.GetChannel());

            if (btn.Content.Equals("P生成"))
            {
                txtStatusBar.Text = FilenameGenerate.GetFilenameProgram(channel, program, record, txtFileGenTargetName.Text, txtFileGenDuration.Text, txtFileGenProgramPrefix.Text);
            }
            else
            {
                txtStatusBar.Text = FilenameGenerate.GetFilename(channel, program, record, txtFileGenTargetName.Text, txtFileGenDuration.Text, txtFileGenPath.Text, txtFileGenExtension.Text);
            }
        }