コード例 #1
0
        public void LoadEntries()
        {
            CardTable.Controls.Clear();
            this.TopLabel.Text    = "Profile of " + _profileName;
            _profile              = DbConnector.GetInstance().GetPatientProfile(_profileName);
            this.NameBox.Text     = _profile.Name;
            this.AddressBox.Text  = _profile.Address;
            this.AgeBox.Text      = _profile.Age.ToString();
            this.PhoneBox.Text    = _profile.PhoneNumber;
            this.SessionsBox.Text = _profile.SessionsTaken.ToString();

            cards = DbConnector.GetInstance().GetCards(_profile.id);
            CardTable.RowCount = cards.Count;
            for (int i = 0; i < cards.Count; i++)
            {
                LinkLabel lb = new LinkLabel(); lb.AutoSize = true;
                lb.Font = new Font("Calibri", 12); lb.Text = cards[i].Name; lb.Show();
                Label lb1 = new Label(); lb1.Font = new Font("Calibri", 12);
                lb1.Text = cards[i].YearsSuffered.ToString(); lb1.Show();
                Label lb2 = new Label(); lb2.Font = new Font("Calibri", 12);
                lb2.Text = cards[i].Doctor; lb2.Show();
                Label lb3 = new Label(); lb3.Font = new Font("Calibri", 12);
                lb3.Text = cards[i].Type; lb3.Show();
                DeleteButton b = new DeleteButton(cards[i].id, "medical_card"); b.Click += b_Click;
                lb.Click += lb_Click;
                this.CardTable.Controls.Add(lb, 0, i);
                this.CardTable.Controls.Add(lb1, 1, i);
                this.CardTable.Controls.Add(lb2, 2, i);
                this.CardTable.Controls.Add(lb3, 3, i);
                this.CardTable.Controls.Add(b, 4, i);
            }
        }
コード例 #2
0
        private void numeroPaginas(int tope)
        {
            int posicionInicial  = 3;
            int aumentoPosicion  = 17;
            int aumentoContendor = 1000;
            int contenedorTag    = 0;

            LinkLabel link;

            for (int posicion = 0; posicion < tope; posicion++)
            {
                link              = new LinkLabel();
                link.Location     = new Point(posicionInicial, 10);
                link.Size         = new Size(13, 13);
                link.Tag          = contenedorTag;
                link.Text         = posicion.ToString();
                link.Name         = posicion.ToString();
                link.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.paginacion);
                pnPaginador.Controls.Add(link);
                link.Show();
                contenedorTag   = contenedorTag + aumentoContendor;
                posicionInicial = posicionInicial + aumentoPosicion;

                if (link.Name == ConstanteGeneral.SIN_VALOR_NUMERICO.ToString())
                {
                    link.LinkVisited = true;
                }
            }
        }
コード例 #3
0
        /// <summary>
        /// Construct a new ConfigForm and initialize it with ConfigHelper.
        /// </summary>
        public ConfigForm()
        {
            InitializeComponent();

            // Show welcome message if this is the first launch of the app
            if (!SettingsService.Current.NoWelcome)
            {
                MessageBox.Show(Resources.WelcomeMessage, "SharpCrop");
                SettingsService.Current.NoWelcome = true;
            }

            // Init version checker
            var url = VersionService.GetLatestLink();

            if (url != null)
            {
                updateLinkLabel.LinkClicked += (s, e) => Process.Start(url);
                updateLinkLabel.Show();
            }

            // Register an update event and update provider list
            ProviderService.RegisteredProvidersChanged += UpdateProviderList;
            ProviderService.LoadedProvidersChanged     += UpdateProviderList;
            UpdateProviderList();
        }
コード例 #4
0
 /// <summary>
 /// Affiche un champ contenant plusieurs informations, separes par SEPARATEUR_LISTE,
 /// un lien pour chaque morceau d'information
 /// </summary>
 /// <param name="key"></param>
 /// <param name="link"></param>
 /// <param name="texte"></param>
 private void afficheInfoLinks(Label key, LinkLabel link, string texte)
 {
     char[] SEPARATEURS = { ',' };
     if (texte?.Length > 0)
     {
         key.Show();
         link.Show();
         link.Links.Clear();
         string[] valeurs = texte.Split(BaseFilms.SEPARATEUR_LISTES_CHAR);
         string   label   = "";
         int      start   = 0;
         foreach (string url in valeurs)
         {
             label += url + ", ";
             int            length = url.Length;
             LinkLabel.Link lk     = new LinkLabel.Link(start, length, $"https://www.google.com/search?q={InternetUtils.urlRecherche(url)}");
             link.Links.Add(lk);
             start += length + 2;
         }
         link.Text = label;
     }
     else
     {
         key?.Hide();
         link?.Hide();
     }
 }
コード例 #5
0
ファイル: MainHomepage.cs プロジェクト: Gamer-Gaming/shiftos
 public void Setup()
 {
     //Get the Fundamentals List
     flfundamentals.Controls.Clear();
     foreach (var type in Array.FindAll(ReflectMan.Types, t => t.GetInterfaces().Contains(typeof(IShiftnetSite)) && t.BaseType == typeof(UserControl) && Shiftorium.UpgradeAttributesUnlocked(t)))
     {
         var attrs     = type.GetCustomAttributes(false);
         var attribute = attrs.FirstOrDefault(x => x is ShiftnetSiteAttribute) as ShiftnetSiteAttribute;
         if (attribute != null)
         {
             if (attrs.OfType <ShiftnetFundamentalAttribute>().Any())
             {
                 var dash = new Label();
                 dash.Text     = " - ";
                 dash.AutoSize = true;
                 flfundamentals.Controls.Add(dash);
                 dash.Show();
                 var link = new LinkLabel();
                 link.Text   = attribute.Name;
                 link.Click += (o, a) =>
                 {
                     GoToUrl?.Invoke(attribute.Url);
                 };
                 flfundamentals.Controls.Add(link);
                 flfundamentals.SetFlowBreak(link, true);
                 link.Show();
                 link.LinkColor = SkinEngine.LoadedSkin.ControlTextColor;
             }
         }
     }
 }
コード例 #6
0
ファイル: Dashboard.cs プロジェクト: tnkemdilim/CU-API
        /// <summary>
        /// Generate label for all notes unser a course Id
        /// </summary>
        /// <param name="courseId"></param>
        private void LoadCourseNotesLabel(int courseId)
        {
            var noteData = GetCourseNotesFromDb(courseId);
            var location = new Point(9, 14);

            foreach (var note in noteData)
            {
                #region CREATE LINKLABEL FOR EACH NOTE IN A COURSE

                _noteCollection.Add(new Note
                {
                    noteName       = note.noteName,
                    noteCustomPath = note.noteCustomPath
                });

                var linkLabel = new LinkLabel
                {
                    #region LINK LABEL CONTROL PROPERTIES

                    AutoSize  = true,
                    BackColor = SystemColors.Window,
                    Font      = new Font(
                        "Microsoft YaHei UI Light", 9F, FontStyle.Italic,
                        GraphicsUnit.Point, 0),
                    LinkColor = Color.DarkOliveGreen,
                    Size      = new Size(187, 17)

                                #endregion LINK LABEL CONTROL PROPERTIES
                };

                #region LINK LABEL CONTROL PROPERTIES

                linkLabel.Location = new Point(9, location.Y + 10 + linkLabel.Size.Height);
                linkLabel.Name     = note.noteCustomPath;
                linkLabel.TabStop  = true;
                linkLabel.Text     = $@">> {note.noteName}";

                #endregion LINK LABEL CONTROL PROPERTIES

                linkLabel.Click += (obj, sender) =>
                {
                    Process.Start($"NOTES/{GetCourseNameById(courseId)}/{note.noteCustomPath}.pdf");
                };

                notePanel.Controls.Add(linkLabel);

                linkLabel.Show();

                #endregion CREATE LINKLABEL FOR EACH NOTE IN A COURSE
            }
        }
コード例 #7
0
ファイル: MainWindow.cs プロジェクト: xp4xbox/Bytelocker
        private void MainWindowScreenOne()
        {
            lbCurrentFileDecrypt.Hide();
            pbDecryptProgress.Hide();
            BtnVerify.Hide();
            tbPassInput.Hide();
            rtfInfo.Clear();
            UpdateTime();

            llAESInfo.Show();
            llListOfInfectedFiles.Show();
            lbTitle.Show();

            // rtf box
            rtfInfo.AppendText("Your important files, documents, pictures, etc. Have been encrypted." + "\n\n");

            llListOfInfectedFiles.Text     = "Here";
            llListOfInfectedFiles.AutoSize = true;
            llListOfInfectedFiles.Location = rtfInfo.GetPositionFromCharIndex(rtfInfo.TextLength);
            rtfInfo.Controls.Add(llListOfInfectedFiles);
            rtfInfo.AppendText(llListOfInfectedFiles.Text);
            rtfInfo.AppendText(new string(' ', 3));
            rtfInfo.SelectionStart = rtfInfo.TextLength;

            rtfInfo.AppendText("is a complete list of encrypted files, you can verify this manually." + "\n\n" +
                               "Encryption was produced" +
                               " using");

            llAESInfo.Text     = "AES-256";
            llAESInfo.AutoSize = true;
            llAESInfo.Location = rtfInfo.GetPositionFromCharIndex(rtfInfo.TextLength);
            rtfInfo.Controls.Add(llAESInfo);
            rtfInfo.AppendText(llAESInfo.Text);
            rtfInfo.AppendText(new string(' ', 3));
            rtfInfo.SelectionStart = rtfInfo.TextLength;

            rtfInfo.AppendText(
                "in order to decrypt the files, you need to obtain the password used to generate the key." + "\n\n" +
                "The password will only be available for a limited time, after this, the program will delete itself and there will be no way to recover encrypted files." +
                "\n\n");

            rtfInfo.AppendText(
                "NOTE: Removal of or modification of this software will lead to inability to decrypt files.");
            // end rtf box
        }
コード例 #8
0
        public void LoadEntries()
        {
            this.tableLayoutPanel1.Controls.Clear();
            List <PatientModel> patients = DbConnector.GetInstance().GetPatientList();

            this.tableLayoutPanel1.RowCount = patients.Count;
            this.tableLayoutPanel1.Update();
            for (int i = 0; i < patients.Count; i++)
            {
                LinkLabel lb = new LinkLabel(); lb.AutoSize = true;
                lb.Font   = new Font("Calibri", 12); lb.Text = patients[i].Name; lb.Show();
                lb.Click += lb_Click;
                Label lb1 = new Label(); lb1.Text = patients[i].Age.ToString(); lb1.Font = new Font("Calibri", 12); lb1.Show();
                Label lb2 = new Label(); lb2.AutoSize = true;
                lb2.Text = patients[i].Address; lb2.Font = new Font("Calibri", 12); lb2.Show();
                DeleteButton b = new DeleteButton(patients[i].id, "patient"); b.Click += b_Click;
                this.tableLayoutPanel1.Controls.Add(lb, 0, i);
                this.tableLayoutPanel1.Controls.Add(lb1, 1, i);
                this.tableLayoutPanel1.Controls.Add(lb2, 2, i);
                this.tableLayoutPanel1.Controls.Add(b, 3, i);
            }
        }
コード例 #9
0
 public void SetupListing()
 {
     fllist.Controls.Clear();
     foreach (var type in Array.FindAll(ReflectMan.Types, t => t.GetInterfaces().Contains(typeof(IShiftnetSite))))
     {
         var attr = type.GetCustomAttributes(false).FirstOrDefault(x => x is ShiftnetSiteAttribute) as ShiftnetSiteAttribute;
         if (attr != null)
         {
             if (attr.Url.StartsWith("shiftnet/"))
             {
                 var lnk = new LinkLabel();
                 lnk.LinkColor = SkinEngine.LoadedSkin.ControlTextColor;
                 lnk.Text      = attr.Name;
                 var desc = new Label();
                 desc.AutoSize    = true;
                 lnk.AutoSize     = true;
                 desc.MaximumSize = new Size(this.Width / 3, 0);
                 desc.Text        = attr.Description;
                 desc.Padding     = new Padding
                 {
                     Bottom = 25,
                     Top    = 0,
                     Left   = 10,
                     Right  = 10
                 };
                 lnk.Click += (o, a) =>
                 {
                     GoToUrl?.Invoke(attr.Url);
                 };
                 fllist.Controls.Add(lnk);
                 fllist.Controls.Add(desc);
                 ControlManager.SetupControls(lnk);
                 lnk.Show();
                 desc.Show();
             }
         }
     }
 }
コード例 #10
0
        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            i++;
            if (i % 2 == 1)
            {
                a.Location = new Point(1150, 70);
                a.Size     = new Size(87, 30);
                a.Text     = "Delete User";
                this.Controls.Add(a);
                a.Show();

                b.Location = new Point(1150, 110);
                b.Size     = new Size(87, 30);
                b.Text     = "Log out";
                this.Controls.Add(b);
                b.Show();
            }
            else
            {
                a.Hide();
                b.Hide();
            }
        }
コード例 #11
0
        private void AddPaneItems()
        {
            if (info_link_clicked)
            {
                bool file_exists = System.IO.File.Exists(Paths.Combine(
                                                             source.IpodDevice.ControlPath, "iTunes", "iTunesDB"));

                if (file_exists)
                {
                    pane.Append(Catalog.GetString(
                                    "You have used this iPod with a version of iTunes that saves a " +
                                    "version of the song database for your iPod that is too new " +
                                    "for Banshee to recognize.\n\n" +

                                    "Banshee can rebuild your database, but some settings might be lost. " +
                                    "Using Banshee and iTunes with the same iPod is not recommended."
                                    ));

                    LinkLabel link = new LinkLabel();
                    link.Xalign = 0.0f;
                    link.Markup = String.Format("<u>{0}</u>", GLib.Markup.EscapeText(Catalog.GetString(
                                                                                         "Learn more about Banshee's iPod support")));

                    link.Clicked += delegate { Banshee.Web.Browser.Open("http://banshee-project.org/IpodAndItunes"); };

                    link.Show();
                    pane.Append(link, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, true);
                }
                else
                {
                    pane.Append(Catalog.GetString(
                                    "An iPod database could not be found on this device.\n\n" +
                                    "Banshee can build a new database for you."
                                    ));
                }
            }
            else
            {
                LinkLabel link = new LinkLabel();
                link.Xalign = 0.0f;
                link.Markup = String.Format("<u>{0}</u>", GLib.Markup.EscapeText(Catalog.GetString(
                                                                                     "What is the reason for this?")));

                link.Clicked += delegate {
                    info_link_clicked = true;
                    pane.Clear();
                    AddPaneItems();
                };

                link.Show();
                pane.Append(link, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, true);
            }

            if (source.IpodDevice.VolumeInfo.IsMountedReadOnly)
            {
                pane.Append(Catalog.GetString("Your iPod is mounted read only. Banshee can not restore your iPod."),
                            true, IconThemeUtils.LoadIcon(48, "dialog-error"));
                return;
            }

            LinkLabel rebuild_link = new LinkLabel();

            rebuild_link.Xalign = 0.0f;
            rebuild_link.Markup = String.Format("<u>{0}</u>", GLib.Markup.EscapeText(Catalog.GetString(
                                                                                         "Rebuild iPod Database...")));
            rebuild_link.Clicked += OnRebuildDatabase;
            rebuild_link.Show();
            pane.Append(rebuild_link, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, true);
        }
コード例 #12
0
        public void LoadEntries()
        {
            this.tableLayoutPanel1.Controls.Clear();
            DbConnector          db        = DbConnector.GetInstance();
            List <EmployeeModel> staffList = new List <EmployeeModel>();

            staffList = db.GetStaffList();
            this.tableLayoutPanel1.AutoSize = true;
            this.tableLayoutPanel1.RowCount = staffList.Count;
            this.tableLayoutPanel1.Update();
            for (int i = 0; i < staffList.Count; i++)
            {
                LinkLabel    lb  = new LinkLabel(); lb.Font = new Font("Calibri", 12);  lb.Text = staffList[i].Name; lb.Show();
                Label        lb1 = new Label(); lb1.Font = new Font("Calibri", 12); lb1.Text = staffList[i].Specialty; lb1.Show();
                DeleteButton b   = new DeleteButton(staffList[i].id, "employee"); b.Show();
                lb.Click += lb_Click;
                b.Click  += b_Click;
                this.tableLayoutPanel1.Controls.Add(lb, 0, i);
                this.tableLayoutPanel1.Controls.Add(lb1, 1, i);
                this.tableLayoutPanel1.Controls.Add(b, 2, i);
            }
        }
コード例 #13
0
        public void afterSelect()
        {
            String mbxGUID = "";

            formMain.start = 0;

            if (formMain.treeView1.SelectedNode.Tag == null)
            {
                return;
            }

            String       parentguid = "";
            ServerResult myres      = (ServerResult)formMain.treeView1.SelectedNode.Tag;

            parentguid = myres.documentId;
            if (myres.cvStub == null)
            {
                mbxGUID = "";
            }
            else
            {
                mbxGUID = myres.cvowner;
            }
            formMain.selectedItemGuid = parentguid;

            if (myres.dataType.Equals("5")) //if true, the selected node is a mailbox
            {
                formMain.listView1.Items.Clear();
                formMain.currentCore = formMain.treeView1.SelectedNode.Parent.Text;
                formMain.start       = 0;

                SolrQuery newQuery  = new SolrQuery(formMain.ip, parentguid, formMain, mbxGUID);
                XMLParser newParser = new XMLParser(newQuery.data);

                formMain.AppendTextBox("Query took" + newParser.timeForQuery + " ms");

                var subfolders = newParser.results.OrderBy(n => n.subject);

                foreach (ServerResult subfolder in subfolders)
                {
                    formMain.serverResults.Add(subfolder);
                }

                formMain.treeView1.SelectedNode.Nodes.Clear();

                foreach (ServerResult result in subfolders)
                {
                    TreeNode node = new TreeNode(result.subject);
                    node.Tag = result;
                    formMain.treeView1.SelectedNode.Nodes.Add(node);
                }
                //treeView1.SelectedNode.Expand();

                if (formMain.settings[3])
                {
                    formMain.addSmartFolders();
                }
            }
            else if (myres.dataType.Equals("6")) //the selected node is a smart folder
            {
                formMain.treeView1.SelectedNode.Nodes.Clear();
                formMain.smartFolderHandler.smartFolderClick();
            }
            else if (myres.dataType.Equals("7"))//the selected node is the child of a smart folder
            {
                formMain.smartFolderHandler.smartFolderChildClick();
            }
            else //the selected node is a subfolder
            {
                formMain.AppendTextBox("Now displaying page " + (formMain.start + 1).ToString());

                formMain.treeView1.SelectedNode.Nodes.Clear();

                if (((ServerResult)formMain.treeView1.SelectedNode.Tag).cvStub == null)
                {
                    mbxGUID = "";
                }
                SolrQuery newQuery = new SolrQuery(formMain.ip, 0, formMain, mbxGUID);
                if (newQuery.pagesNeeded(mbxGUID, parentguid) > 1)
                {/*kevin
                  * txtActivity.Height = 75;
                  * txtActivity.SelectionStart = txtActivity.Text.Length;
                  * txtActivity.ScrollToCaret();*/
                    LinkLabel previousPage = new LinkLabel();
                    previousPage.Height   = 15;
                    previousPage.Text     = "Previous Page";
                    previousPage.Width    = 30;
                    previousPage.Location = new Point(275, 639);
                    previousPage.Click   += new System.EventHandler(formMain.previousPageLink);
                    formMain.Controls.Add(previousPage);
                    previousPage.Show();

                    LinkLabel nextPage = new LinkLabel();
                    nextPage.Height   = 15;
                    nextPage.Text     = "Next Page";
                    nextPage.Location = new Point(310, 639);
                    nextPage.Width    = 30;
                    nextPage.Click   += new System.EventHandler(formMain.nextPageLink);
                    formMain.Controls.Add(nextPage);
                    nextPage.Show();
                }
                List <ServerResult> subfolders = new List <ServerResult>();
                try
                {
                    List <XmlDocument> results;
                    if (((ServerResult)formMain.treeView1.SelectedNode.Tag).cvStub == null)
                    {
                        results = newQuery.getSubfoldersForJournalMBX(parentguid);
                    }
                    else
                    {
                        results = newQuery.getSubfoldersForOneMailbox(mbxGUID, parentguid);
                    }
                    XMLParser parser = new XMLParser(results);
                    formMain.AppendTextBox("Query took" + parser.timeForQuery + " ms");
                    subfolders = parser.results;
                }
                catch
                {
                    //List<ServerResult> subfolders = new List<ServerResult>();
                }
                //if so ^ add subnodes

                if (subfolders == null)
                {
                    return;
                }

                var subfolders1 = subfolders.OrderBy(n => n.subject);

                if (subfolders.Count > 0)
                {
                    foreach (ServerResult subfolder in subfolders1)
                    {
                        formMain.serverResults.Add(subfolder);
                        if (subfolder.links.IndexOf(subfolder.subject + "\\") > -1)
                        {
                            TreeNode node = new TreeNode(subfolder.links.Substring(subfolder.links.IndexOf("\\" + subfolder.subject + "\\") + subfolder.subject.Length + 2));
                            node.Tag = subfolder;
                            formMain.treeView1.SelectedNode.Nodes.Add(node);
                        }
                        else
                        {
                            TreeNode node = new TreeNode(subfolder.subject);
                            node.Tag = subfolder;
                            formMain.treeView1.SelectedNode.Nodes.Add(node);
                        }
                    }
                }
                //check if the selected subfolder has any datatype2 children
                XMLParser           parser1 = new XMLParser(newQuery.getMailsForOneSubfolder(mbxGUID, formMain.selectedItemGuid, formMain.start, formMain.jid, formMain.mailSort));
                List <ServerResult> mails   = parser1.results;
                formMain.lastPage    = (parser1.numFound / formMain.pageSize);
                formMain.currentPage = mails;
                formMain.listView1.Items.Clear();
                if (mails != null)
                {
                    formMain.writeMailsInList(mails);
                }
            }

            if (formMain.listView1.Items.Count == 0)
            {
                formMain.nextButton.Visible     = false;
                formMain.previousButton.Visible = false;
                formMain.customPageBox.Visible  = false;
                formMain.label1.Visible         = false;
                formMain.lastPageButton.Visible = false;
            }
            else
            {
                formMain.nextButton.Visible     = true;
                formMain.previousButton.Visible = true;
                formMain.customPageBox.Visible  = true;
                formMain.label1.Visible         = true;
                formMain.lastPageButton.Visible = true;
            }
        }
コード例 #14
0
        private void AddPaneItems()
        {
            if (info_link_clicked)
            {
                LinkLabel link = new LinkLabel();
                link.Xalign = 0.0f;
                link.Markup = String.Format("<u>{0}</u>", GLib.Markup.EscapeText(Catalog.GetString(
                                                                                     "Back")));

                link.Clicked += delegate(object o, EventArgs args) {
                    info_link_clicked = false;
                    pane.Clear();
                    AddPaneItems();
                };

                link.Show();
                pane.Append(link, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, true,
                            IconThemeUtils.LoadIcon(24, "go-previous", Stock.GoBack));

                pane.Append(Catalog.GetString(
                                "iTunes\u00ae 7 introduced new compatibility issues and currently only " +
                                "works with other iTunes\u00ae 7 clients.\n\n" +
                                "No third-party clients can connect to iTunes\u00ae music shares anymore. " +
                                "This is an intentional limitation by Apple in iTunes\u00ae 7 and newer, we apologize for " +
                                "the unfortunate inconvenience."
                                ));
            }
            else
            {
                if (failure != DaapErrorType.UserDisconnect)
                {
                    Label header_label = new Label();
                    header_label.Markup = String.Format("<b>{0}</b>", GLib.Markup.EscapeText(Catalog.GetString(
                                                                                                 "Common reasons for connection failures:")));
                    header_label.Xalign = 0.0f;
                    header_label.Show();

                    pane.Append(header_label, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, false);

                    pane.Append(Catalog.GetString("The provided login credentials are invalid"));
                    pane.Append(Catalog.GetString("The login process was canceled"));
                    pane.Append(Catalog.GetString("Too many users are connected to this share"));
                }
                else
                {
                    pane.Append(Catalog.GetString("You are no longer connected to this music share"));
                }

                if (failure == DaapErrorType.UserDisconnect || failure == DaapErrorType.InvalidAuthentication)
                {
                    Button button = new Button(Catalog.GetString("Try connecting again"));
                    button.Clicked += delegate { source.Activate(); };

                    HBox bbox = new HBox();
                    bbox.PackStart(button, false, false, 0);
                    bbox.ShowAll();

                    pane.Append(bbox, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, false);
                    return;
                }

                LinkLabel link = new LinkLabel();
                link.Xalign = 0.0f;
                link.Markup = String.Format("<u>{0}</u>", GLib.Markup.EscapeText(Catalog.GetString(
                                                                                     "The music share is hosted by iTunes\u00ae 7 or newer")));

                link.Clicked += delegate(object o, EventArgs args) {
                    info_link_clicked = true;
                    pane.Clear();
                    AddPaneItems();
                };

                link.Show();
                pane.Append(link, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0, true);
            }
        }