コード例 #1
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            backgroundWorker1.WorkerSupportsCancellation = true;
            var    destination    = e.Argument.ToString();
            string checkFinalPath = @Properties.Settings.Default.FinalPath + @"\" + Settings.Default.CurrentTitle;
            bool   DontRip        = Ripping.CheckForRecentRip(checkFinalPath);

            if (Settings.Default.LastRipTitle == Settings.Default.CurrentTitle)
            {
                DontRip = false;
            }
            if (!DontRip)
            {
                Ripping.MakeWorkingDirs();
                string makeMKVPath = Settings.Default.MakeMKVPath;

                if (System.IO.File.Exists(makeMKVPath))
                {
                    string ripPath = @destination + @"\" + CurrentTitle;
                    Ripping.UpdateStatusText("Ripping to: " + ripPath);
                    char[] charsToTrim    = { '\\' };
                    string activeDisc     = Settings.Default.DVDDrive.TrimEnd(charsToTrim);
                    string minTitleLength = Settings.Default.MinTitleLength;
                    var    driveID        = Ripping.DVDDriveToUse;

                    string MakeMKVOptions = " --robot --messages=" + @ripPath + "riplog.txt --decrypt --noscan --minlength=" + minTitleLength + " --directio=true mkv disc:0 all " + @ripPath;

                    string app = makeMKVPath;

                    Ripping.LaunchCommandLineApp(@app, @MakeMKVOptions);
                }
                else
                {
                    // Initializes the variables to pass to the MessageBox.Show method.
                    string            message = "MakeMKV not found";
                    string            caption = "Error Detected in Input";
                    MessageBoxButtons buttons = MessageBoxButtons.OK;
                    DialogResult      result;

                    // Displays the MessageBox.
                    result = MessageBox.Show(message, caption, buttons);

                    if (result == System.Windows.Forms.DialogResult.OK)
                    {
                    }
                }
            }
            else
            {
                if (Settings.Default.RipRetry >= 2)
                {
                    return;
                }
            }
            Ripping.SaveSettings();
            return;
        }
コード例 #2
0
        private void backgroundWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            backgroundWorker.WorkerSupportsCancellation = true;

            while (textBoxCurrentTitle.Text == "" || textBoxCurrentTitle.Text == null)
            {
                Thread.Sleep(500);
                Ripping.refreshdata();
            }
            StartTheTimer();
        }
コード例 #3
0
        public Preferences()
        {
            InitializeComponent();
            this.WindowState = FormWindowState.Normal;

            Ripping.CheckHandBrakeInstall();
            Ripping.CheckMakeMKVInstall();

            //AutoRip2MKV.Convert.AddTitleToConvvertList();
            //AutoRip2MKV.Convert.ConvertWithHandbrake();


            StartTheTimer();
        }
コード例 #4
0
        private void button2_Click_1(object sender, EventArgs e)
        {
            OpenOrCloseCDDrive.Close();
            Thread.Sleep(5000);
            var DVDDriveToUse = Ripping.GetDriveInfo("drive");
            var CurrentTitle  = Ripping.GetDriveInfo("label");

            Settings.Default.CurrentTitle = CurrentTitle;
            Settings.Default.DVDDrive     = DVDDriveToUse;
            textBoxCurrentTitle.Text      = CurrentTitle;
            dvdDriveID.Text = DVDDriveToUse;
            Ripping.SaveSettings();
            this.Refresh();
            StartTheTimer();
        }
コード例 #5
0
        private void Save_Click(object sender, EventArgs e)
        {
            // Copy window location to app settings
            Settings.Default.WindowLocation = this.Location;
            Settings.Default.WindowSize     = this.Size;

            // Copy window size to app settings
            if (this.WindowState == FormWindowState.Normal)
            {
                Settings.Default.WindowSize = this.Size;
            }
            else
            {
                Settings.Default.WindowSize = this.RestoreBounds.Size;
            }
            Ripping.SaveSettings();
        }
コード例 #6
0
ファイル: SMTPAsync.cs プロジェクト: gmoyle/AutoRip2MKV_3
        public static void Main(bool results)
        {
            SmtpClient        smtpClient      = new SmtpClient();
            NetworkCredential basicCredential = new NetworkCredential(smtpuser, smtppass);
            MailMessage       message         = new MailMessage();
            MailAddress       fromAddress     = new MailAddress(userfromemail, "AutoRip2MKV");

            smtpClient.Host = Properties.Settings.Default.SMTPAddress;
            //"email-smtp.us-east-1.amazonaws.com";
            smtpClient.Port = Properties.Settings.Default.SMTPPort;
            smtpClient.UseDefaultCredentials = false;
            smtpClient.DeliveryMethod        = SmtpDeliveryMethod.Network;
            smtpClient.EnableSsl             = Properties.Settings.Default.EnableTTL;
            smtpClient.Credentials           = basicCredential;

            message.From    = fromAddress;
            message.Subject = "AutoRip2MKV Status";
            //Set IsBodyHtml to true means you can send HTML email.
            //message.IsBodyHtml = true;
            if (results)
            {
                message.Body = "Rip of " + Properties.Settings.Default.CurrentTitle + " was successful";
            }
            else
            {
                message.Body = "Rip of " + Properties.Settings.Default.CurrentTitle +
                               " failed. \r\n  Verify you have the latest version of MakeMKV installed.";
            }

            message.To.Add(usertxtto);

            try
            {
                smtpClient.Send(message);
            }
            catch (Exception ex)
            {
                //Error, could not send the message
                Ripping.UpdateStatusText(ex.Message);
            }
        }
コード例 #7
0
        private void ExecuteRipProcess()
        {
            Ripping.SaveSettings();
            this.WindowState = FormWindowState.Minimized;
            List <object> arguments = new List <object>();

            if (textBoxCurrentTitle.Text != "")
            {
                if (Settings.Default.TempPath != "")
                {
                    arguments.Add(Settings.Default.TempPath + @"\" + Settings.Default.CurrentTitle);
                }
                else
                {
                    arguments.Add(Settings.Default.FinalPath + @"\" + Settings.Default.CurrentTitle);
                }
            }
            if (!backgroundWorker1.IsBusy)
            {
                backgroundWorker1.RunWorkerAsync(arguments[0].ToString());
            }
        }
コード例 #8
0
 private void button2_Click(object sender, EventArgs e)
 {
     Ripping.SaveSettings();
 }
コード例 #9
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     Ripping.SaveSettings();
     SMTPSender.Main(true);
     this.Refresh();
 }