private void showUserCredentialsForm()
        {
            UserCredentialsForm userForm = new UserCredentialsForm();
            DialogResult        result   = userForm.ShowDialog(this);

            if (result == DialogResult.OK)
            {
                if (tabControl1.SelectedTab == tabPendingJobs)
                {
                    lstSignedJobsRefresh();
                }
                else
                {
                    lstSignedJobsRefresh();
                }
                toolStripCurrentUser.Text = WSTools.GetServiceCurrentUser();
            }
        }
        private void JobListForm_Load(object sender, EventArgs e)
        {
            m_bLoading = true;

            /*try
             * {
             *  AppDomain myDomain = Thread.GetDomain();
             *
             *  myDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);
             *  WindowsPrincipal myPrincipal = (WindowsPrincipal)Thread.CurrentPrincipal;
             *
             *  PrincipalPermission adminPermission = new PrincipalPermission(null, "SealSignSQS Admins");
             *  adminPermission.Demand();
             *  // Si el usuario es admin mostramos el menĂº de parĂ¡metros de firma
             *  mnuParameters.Visible = true;
             * }
             * catch
             * {
             * }*/

            m_lvwColumnSorter = new ListViewColumnSorter();
            lstPendingJobs.ListViewItemSorter = m_lvwColumnSorter;
            lstSignedJobs.ListViewItemSorter  = m_lvwColumnSorter;

            //this.WindowState = FormWindowState.Minimized;
            this.Hide();
            int interval = Convert.ToInt32(Tools.GetAppSettings("RefreshTimeout")) * 1000;

            if (interval == 0)
            {
                //timerRefresh.Interval = 60000;
                timerRefresh.Stop();
            }
            else
            {
                timerRefresh.Interval = interval;
                timerRefresh.Start();
            }
            lstPendingJobsRefresh(true);
            toolStripCurrentUser.Text = WSTools.GetServiceCurrentUser();
            m_bLoading = false;
        }