private void frmEncrypt_OnFinished() { Logger.Info("--加密完成--"); Invoke(new Action(() => { btnEncrypt.Enabled = true; btnCancle.Enabled = false; panel1.Enabled = true; PopWindow.Information("视频加密完成!", "系统提示", this); if (chkDelete.Checked) { string msg = string.Format("是否要删除【{0}】?", Path.GetFileName(txtFileName.Text)); if (PopWindow.Question(msg, "系统提示", this) == DialogResult.Yes) { try { File.Delete(txtFileName.Text); } catch { } } } if (OnNewVideo != null) { OnNewVideo(txtFileName.Text, TargetFile); } })); }
private void convert_OnFinished(object sender, Ruihit.Ffmpeg.ConvertEventArgs e) { Logger.Info("转码完成"); Invoke(new Action(() => { btnConvert.Enabled = true; panel1.Enabled = true; btnCancle.Enabled = false; PopWindow.Information("视频转码完成!", "系统提示", this); IsRunning = false; })); }
private void btnSave_Click(object sender, EventArgs e) { config.MaxLogs = (int)maxLog.Value; config.VideoDir = txtVideoDir.Text; config.AutoSaveLog = chkSaveLog.Checked; config.LogFile = txtLogFile.Text; config.LogLevel = (LogLevel)Enum.Parse(typeof(LogLevel), cmnLogLevel.Text); config.Save(); PopWindow.Information("设置完成,部分设置需重启程序后生效!"); }