Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 public void SaveTitle()
 {
     if (this.textBox.Text.Length != 0 && this.title != this.textBox.Text)
     {
         bool succes = SeriesCalenderFrom.UpdateXMLFile(this.day, this.title, this.textBox.Text);
         if (!succes)
         {
             MessageBox.Show("A " + this.title + " cím már létezik az adatbázisban!", this.day, MessageBoxButtons.OK, MessageBoxIcon.Information);
             this.textBox.ReadOnly = false;
         }
         else
         {
             this.title            = this.textBox.Text;
             this.textBox.ReadOnly = true;
             this.dsf = new DownloadSubtitleForm(this.title);
         }
     }
     else
     {
         this.textBox.ReadOnly = true;
     }
 }
Exemple #2
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="day"></param>
            /// <param name="title"></param>
            public SeriesPanel(string day, string title)
                : base()
            {
                this.Size = new Size(800, 30);

                this.day   = day;
                this.title = title;

                textBox          = new TextBox();
                textBox.Name     = "textbox";
                textBox.Text     = title;
                textBox.TabIndex = 0;
                textBox.Size     = new Size(300, 23);
                textBox.ReadOnly = true;
                textBox.Location = new Point(30, 2);
                textBox.Click   += new EventHandler(textbox_Click);
                textBox.KeyDown += new KeyEventHandler(textbox_KeyDown);

                torrentButton          = new Button();
                torrentButton.Name     = "torrentButton";
                torrentButton.Text     = "Torrent";
                torrentButton.TabIndex = 1;
                torrentButton.Location = new Point(350, 2);
                torrentButton.Size     = new Size(75, 23);
                torrentButton.Click   += new EventHandler(torrentButton_Click);

                subtitleButton          = new Button();
                subtitleButton.Name     = "subtitleButton";
                subtitleButton.Text     = "Felirat";
                subtitleButton.TabIndex = 2;
                subtitleButton.Location = new Point(450, 2);
                subtitleButton.Size     = new Size(75, 23);
                subtitleButton.Click   += new EventHandler(subtitleButton_Click);

                //findSubtitleButton = new Button();
                //findSubtitleButton.Name = "findSubtitleButton";
                //findSubtitleButton.Text = "Feliratkereső";
                //findSubtitleButton.TabIndex = 3;
                //findSubtitleButton.Location = new Point(550, 2);
                //findSubtitleButton.Size = new Size(75, 23);
                //findSubtitleButton.Click += new EventHandler(findSubtitleButton_Click);

                deleteButton          = new Button();
                deleteButton.Name     = "deleteButton";
                deleteButton.Image    = SeriesCommander.Properties.Resources.Delete.ToBitmap();
                deleteButton.TabIndex = 4;
                deleteButton.Location = new Point(550, 2);
                deleteButton.Size     = new Size(23, 23);
                deleteButton.Click   += new EventHandler(deleteButton_Click);

                ToolTip buttonToolTip = new ToolTip();

                //buttonToolTip.ToolTipTitle = "Törlés";
                //buttonToolTip.ToolTipIcon = ToolTipIcon.Info;
                buttonToolTip.UseFading    = true;
                buttonToolTip.UseAnimation = true;
                buttonToolTip.IsBalloon    = true;
                buttonToolTip.ShowAlways   = true;
                buttonToolTip.AutoPopDelay = 5000;
                buttonToolTip.InitialDelay = 500;
                buttonToolTip.ReshowDelay  = 500;
                buttonToolTip.SetToolTip(deleteButton, "Törlés");

                this.Controls.Add(textBox);
                this.Controls.Add(torrentButton);
                this.Controls.Add(subtitleButton);
                //this.Controls.Add(findSubtitleButton);
                this.Controls.Add(deleteButton);

                this.dsf = new DownloadSubtitleForm(this.title);
                //this.Click += new EventHandler(SeriesPanel_Click);
            }