예제 #1
0
        private void CheckForNewLapCount(ProgressLine previousProgressLine)
        {
            if (previousProgressLine == null)
            {
                return;
            }

            if (CurrentProgressLine.Offset == 0 && previousProgressLine.Offset == lastProgressLineOffset)
            {
                laps++;
            }
            else if (previousProgressLine.Offset == 0 && CurrentProgressLine.Offset == lastProgressLineOffset)
            {
                laps--;
            }
        }
예제 #2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RealSplashScreen));
     this.m_lblSuiteName = new System.Windows.Forms.Label();
     this.m_picSilLogo   = new System.Windows.Forms.PictureBox();
     this.lblProductName = new System.Windows.Forms.Label();
     this.lblCopyright   = new System.Windows.Forms.Label();
     this.lblMessage     = new System.Windows.Forms.Label();
     this.lblAppVersion  = new System.Windows.Forms.Label();
     this.m_panel        = new System.Windows.Forms.Panel();
     this.marqueeGif     = new System.Windows.Forms.PictureBox();
     this.progressLine   = new SIL.FieldWorks.Common.Controls.ProgressLine();
     this.lblFwVersion   = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.m_picSilLogo)).BeginInit();
     this.m_panel.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.marqueeGif)).BeginInit();
     this.SuspendLayout();
     //
     // m_lblSuiteName
     //
     resources.ApplyResources(this.m_lblSuiteName, "m_lblSuiteName");
     this.m_lblSuiteName.BackColor = System.Drawing.Color.Transparent;
     this.m_lblSuiteName.Name      = "m_lblSuiteName";
     //
     // m_picSilLogo
     //
     resources.ApplyResources(this.m_picSilLogo, "m_picSilLogo");
     this.m_picSilLogo.Name    = "m_picSilLogo";
     this.m_picSilLogo.TabStop = false;
     //
     // lblProductName
     //
     resources.ApplyResources(this.lblProductName, "lblProductName");
     this.lblProductName.BackColor   = System.Drawing.Color.Transparent;
     this.lblProductName.ForeColor   = System.Drawing.Color.Black;
     this.lblProductName.Name        = "lblProductName";
     this.lblProductName.UseMnemonic = false;
     //
     // lblCopyright
     //
     resources.ApplyResources(this.lblCopyright, "lblCopyright");
     this.lblCopyright.BackColor = System.Drawing.Color.Transparent;
     this.lblCopyright.ForeColor = System.Drawing.Color.Black;
     this.lblCopyright.Name      = "lblCopyright";
     //
     // lblMessage
     //
     resources.ApplyResources(this.lblMessage, "lblMessage");
     this.lblMessage.BackColor = System.Drawing.Color.Transparent;
     this.lblMessage.ForeColor = System.Drawing.Color.Black;
     this.lblMessage.Name      = "lblMessage";
     //
     // lblAppVersion
     //
     resources.ApplyResources(this.lblAppVersion, "lblAppVersion");
     this.lblAppVersion.BackColor   = System.Drawing.Color.Transparent;
     this.lblAppVersion.Name        = "lblAppVersion";
     this.lblAppVersion.UseMnemonic = false;
     //
     // m_panel
     //
     this.m_panel.BackColor   = System.Drawing.Color.Transparent;
     this.m_panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.m_panel.Controls.Add(this.marqueeGif);
     this.m_panel.Controls.Add(this.progressLine);
     this.m_panel.Controls.Add(this.lblFwVersion);
     this.m_panel.Controls.Add(this.m_picSilLogo);
     this.m_panel.Controls.Add(this.m_lblSuiteName);
     this.m_panel.Controls.Add(this.lblAppVersion);
     this.m_panel.Controls.Add(this.lblMessage);
     this.m_panel.Controls.Add(this.lblCopyright);
     this.m_panel.Controls.Add(this.lblProductName);
     resources.ApplyResources(this.m_panel, "m_panel");
     this.m_panel.Name = "m_panel";
     //
     // marqueeGif
     //
     resources.ApplyResources(this.marqueeGif, "marqueeGif");
     this.marqueeGif.Image   = global::SIL.FieldWorks.FwCoreDlgs.Properties.Resources.wait22trans;
     this.marqueeGif.Name    = "marqueeGif";
     this.marqueeGif.TabStop = false;
     //
     // progressLine
     //
     this.progressLine.BackColor          = System.Drawing.Color.White;
     this.progressLine.ForeColor          = System.Drawing.SystemColors.Control;
     this.progressLine.ForeColor2         = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(90)))), ((int)(((byte)(152)))));
     this.progressLine.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
     resources.ApplyResources(this.progressLine, "progressLine");
     this.progressLine.MaxValue = 1000;
     this.progressLine.Name     = "progressLine";
     //
     // lblFwVersion
     //
     resources.ApplyResources(this.lblFwVersion, "lblFwVersion");
     this.lblFwVersion.BackColor   = System.Drawing.Color.Transparent;
     this.lblFwVersion.Name        = "lblFwVersion";
     this.lblFwVersion.UseMnemonic = false;
     //
     // RealSplashScreen
     //
     resources.ApplyResources(this, "$this");
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor     = System.Drawing.Color.White;
     this.ControlBox    = false;
     this.Controls.Add(this.m_panel);
     this.ForeColor       = System.Drawing.Color.Black;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "RealSplashScreen";
     this.Opacity         = 0;
     ((System.ComponentModel.ISupportInitialize)(this.m_picSilLogo)).EndInit();
     this.m_panel.ResumeLayout(false);
     this.m_panel.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.marqueeGif)).EndInit();
     this.ResumeLayout(false);
 }
예제 #3
0
        //public static System.Deployment.Application.ApplicationDeployment CurrentDeployment { get; }
        static void Main(string[] args)
        {
            /*Declaration FASE */
            string pLink;
            string link;
            string fullNameFile;
            string baseNameFile;
            string replace = "";
            string path    = System.Reflection.Assembly.GetExecutingAssembly().Location;

            path = path.Replace(path.Split('\\')[path.Split('\\').Length - 1], "");
            int           riprendiDalla = 0, nEpisodi = 0;
            NumberEpisode objNEs;
            Serie         serie;

            /*Preparation FASE*/
            Console.WriteLine($"--- <-_ Benvenuti su AnimeWorldDownloader v{version} by Arutosio - Testo a cura di Jamlegend _-> ---");
            Console.Write("         ~  "); CColor.WriteC("Per informazione consultare la pagina GitHub della repository", "cyan"); Console.WriteLine("  ~        ");
            CColor.WriteLineC("Nota: si consiglia fortemente di scaricare l'eseguibile dal sito dello sviluppatore al seguente link", "darkyellow");
            CColor.WriteLineC("       https://github.com/Arutosio/AnimeWorldDownloader/releases", "cyan");
            Console.Write("Path: "); CColor.WriteC(path, "yellow");
            do
            {
                Console.WriteLine();
                LineFase("Inizio fase PREPARATORIA");
                do
                {
                    Console.WriteLine("--- Inserisci l'URL diretto dell'episodio da Scaricare: ");
                    pLink = CColor.ReadLineC("cyan");
                } while (!IsValidUri(pLink));

                fullNameFile = FixStringChar(pLink.Split('/')[pLink.Split('/').Length - 1]);
                baseNameFile = fullNameFile.Split('_')[0];
                try
                {
                    if (Convert.ToInt32(fullNameFile.Split('_')[2]) != -1)
                    {
                        replace = fullNameFile.Split('_')[2];
                        //numOfZeroOnNumberEp = (fullNameFile.Split('_')[2].Length);
                        Console.Write("Numero dell'episodio riconosciuto con sucesso: ");
                        CColor.WriteLineC(replace, "yellow");
                    }
                }
                catch
                {
                    CColor.WriteLineC("Numero dell'episodio non riconosciuto, inserire manualmente.", "red");
                    Console.Write("--- Inserisci il Numero dell'episodio tratto dall'URL (ES:00, 04, 11): ");
                    replace = CColor.ReadLineC("Yellow");
                }
                nEpisodi = GetNumberOfC("--- Inserisci il numero di episodi: ", "yellow");
                if (IsRipresa())
                {
                    riprendiDalla = GetNumberOfC("--- Inserisci il numero dell'episodio da cui vuoi riprendere a scaricare: ", "yellow");
                    objNEs        = new NumberEpisode(riprendiDalla, replace);
                }
                else
                {
                    objNEs = new NumberEpisode(replace);
                }

                serie = new Serie(baseNameFile, nEpisodi, fullNameFile, objNEs);
                /*Procces FASE*/
                LineFase("Inizio fase SCARICAMENTO!");
                CreateFolder(path, baseNameFile);
                while (serie.nEpisodes >= serie.numberEpisode.GetNumber())
                {
                    pL   = new ProgressLine(30);
                    link = pLink.Replace(replace, serie.numberEpisode.ToString());
                    Console.Write(" GET> "); CColor.WriteLineC(link, "cyan");
                    if (FileDownloader.IsURLExist(link))
                    {
                        string filePath = path + serie.nameSerie + @"\" + serie.GetNameFile();
                        FileDownloader.DoAGetRequest(link, filePath);
                        pL.SincePrintProgress();
                    }
                    serie.numberEpisode.IncrementNumber();
                }
                Console.Write("\r\n======> "); CColor.WriteC("PROCESSO CONCLUSO!", "green"); Console.WriteLine(" <======");
                Console.Write("Premi "); CColor.WriteC("Y", "green"); Console.Write(" se vuoi scaricare un'altro anime, altrimenti premi un altro tasto per "); CColor.WriteC("USCIRE", "red"); Console.Write(": ");
            } while (Console.ReadKey().KeyChar.ToString().ToLower().Equals("y"));
        }
예제 #4
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Windows.Forms.Label label1;
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RealSplashScreen));
     System.Windows.Forms.PictureBox pictureBox1;
     this.lblProductName = new System.Windows.Forms.Label();
     this.lblCopyright   = new System.Windows.Forms.Label();
     this.lblMessage     = new System.Windows.Forms.Label();
     this.lblAppVersion  = new System.Windows.Forms.Label();
     this.m_panel        = new System.Windows.Forms.Panel();
     this.progressLine   = new SIL.FieldWorks.Common.Controls.ProgressLine();
     this.lblFwVersion   = new System.Windows.Forms.Label();
     label1      = new System.Windows.Forms.Label();
     pictureBox1 = new System.Windows.Forms.PictureBox();
     ((System.ComponentModel.ISupportInitialize)(pictureBox1)).BeginInit();
     this.m_panel.SuspendLayout();
     this.SuspendLayout();
     //
     // label1
     //
     resources.ApplyResources(label1, "label1");
     label1.BackColor = System.Drawing.Color.Transparent;
     label1.Name      = "label1";
     //
     // pictureBox1
     //
     resources.ApplyResources(pictureBox1, "pictureBox1");
     pictureBox1.Name    = "pictureBox1";
     pictureBox1.TabStop = false;
     //
     // lblProductName
     //
     resources.ApplyResources(this.lblProductName, "lblProductName");
     this.lblProductName.BackColor   = System.Drawing.Color.Transparent;
     this.lblProductName.ForeColor   = System.Drawing.Color.Black;
     this.lblProductName.Name        = "lblProductName";
     this.lblProductName.UseMnemonic = false;
     //
     // lblCopyright
     //
     resources.ApplyResources(this.lblCopyright, "lblCopyright");
     this.lblCopyright.BackColor = System.Drawing.Color.Transparent;
     this.lblCopyright.ForeColor = System.Drawing.Color.Black;
     this.lblCopyright.Name      = "lblCopyright";
     //
     // lblMessage
     //
     resources.ApplyResources(this.lblMessage, "lblMessage");
     this.lblMessage.BackColor = System.Drawing.Color.Transparent;
     this.lblMessage.ForeColor = System.Drawing.Color.Black;
     this.lblMessage.Name      = "lblMessage";
     //
     // lblAppVersion
     //
     resources.ApplyResources(this.lblAppVersion, "lblAppVersion");
     this.lblAppVersion.BackColor   = System.Drawing.Color.Transparent;
     this.lblAppVersion.Name        = "lblAppVersion";
     this.lblAppVersion.UseMnemonic = false;
     //
     // m_panel
     //
     this.m_panel.BackColor   = System.Drawing.Color.Transparent;
     this.m_panel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.m_panel.Controls.Add(this.progressLine);
     this.m_panel.Controls.Add(this.lblFwVersion);
     this.m_panel.Controls.Add(pictureBox1);
     this.m_panel.Controls.Add(label1);
     this.m_panel.Controls.Add(this.lblAppVersion);
     this.m_panel.Controls.Add(this.lblMessage);
     this.m_panel.Controls.Add(this.lblCopyright);
     this.m_panel.Controls.Add(this.lblProductName);
     resources.ApplyResources(this.m_panel, "m_panel");
     this.m_panel.Name = "m_panel";
     //
     // progressLine
     //
     this.progressLine.BackColor          = System.Drawing.Color.White;
     this.progressLine.ForeColor          = System.Drawing.SystemColors.Control;
     this.progressLine.ForeColor2         = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(90)))), ((int)(((byte)(152)))));
     this.progressLine.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
     resources.ApplyResources(this.progressLine, "progressLine");
     this.progressLine.MaxValue = 1000;
     this.progressLine.Name     = "progressLine";
     this.progressLine.Step     = 100;
     //
     // lblFwVersion
     //
     resources.ApplyResources(this.lblFwVersion, "lblFwVersion");
     this.lblFwVersion.BackColor   = System.Drawing.Color.Transparent;
     this.lblFwVersion.Name        = "lblFwVersion";
     this.lblFwVersion.UseMnemonic = false;
     //
     // RealSplashScreen
     //
     resources.ApplyResources(this, "$this");
     this.BackColor  = System.Drawing.Color.White;
     this.ControlBox = false;
     this.Controls.Add(this.m_panel);
     this.ForeColor       = System.Drawing.Color.Black;
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "RealSplashScreen";
     this.Opacity         = 0;
     this.ShowInTaskbar   = false;
     ((System.ComponentModel.ISupportInitialize)(pictureBox1)).EndInit();
     this.m_panel.ResumeLayout(false);
     this.m_panel.PerformLayout();
     this.ResumeLayout(false);
 }
예제 #5
0
 private void Awake()
 {
     Instance   = this;
     _frontTint = FrontLine.GetComponent <UnitedTint>();
     _backTint  = BackLine.GetComponent <UnitedTint>();
 }