public LogosWS()
    {
        LogosWebService = new LogosMobile.LogosWebService.ILogosWSservice();

        string nrip      = string.Empty;
        string lastuser  = string.Empty;
        string snpreetiq = string.Empty;
        string nrtmpatv  = string.Empty;

        Controller.GetConfig(ref nrip, ref lastuser, ref snpreetiq, ref nrtmpatv);

        if (nrip.Trim() != string.Empty)
        {
            SetURL(nrip);
            Cursor.Current = Cursors.Default;
        }
        else
        {
            Cursor.Current = Cursors.Default;
            SIS004 FrmIP = new SIS004(nrip, lastuser, snpreetiq, true, true, true, nrtmpatv);
            FrmIP.ShowDialog();

            if (FrmIP.DialogResult == DialogResult.OK)
            {
                nrip      = FrmIP.Nrip;
                lastuser  = FrmIP.LastUser;
                snpreetiq = FrmIP.SnPreEtiq;
                nrtmpatv  = FrmIP.TmpAtv;

                Controller.SetConfig(nrip, lastuser, snpreetiq, nrtmpatv);

                LogosWebService.Url = "http://" + FrmIP.Nrip + "/logos/logosws.exe/soap/ILogosWS";
            }
            else
            {
                Controller.ShowMessage("Não foi possível completar a configuracao!!! Esta aplicação será encerrada.");
                Application.Exit();
            }

            FrmIP.Dispose();
        }
    }
        private void imgConfNet_Click(object sender, EventArgs e)
        {
            string nrip      = string.Empty;
            string lastuser  = string.Empty;
            string snpreetiq = string.Empty;
            string nrtmpatv  = string.Empty;

            Controller.GetConfig(ref nrip, ref lastuser, ref snpreetiq, ref nrtmpatv);

            SIS004 FrmIP = new SIS004(nrip, EdtCdUsuari.Text, snpreetiq, true, true, true, nrtmpatv);
            FrmIP.ShowDialog();

            if (FrmIP.DialogResult == DialogResult.OK)
            {
                Controller.SetConfig(FrmIP.Nrip, FrmIP.LastUser, FrmIP.SnPreEtiq, FrmIP.TmpAtv);
                EdtCdUsuari.Text = FrmIP.LastUser;
                Controller.WsLogos.SetURL(FrmIP.Nrip);
            }

            FrmIP.Dispose();
        }
        private void imgConfNet_Click(object sender, EventArgs e)
        {
            string nrip = string.Empty;
            string lastuser = string.Empty;
            string snpreetiq = string.Empty;
            string nrtmpatv = string.Empty;

            Controller.GetConfig(ref nrip, ref lastuser, ref snpreetiq, ref nrtmpatv);

            SIS004 FrmIP = new SIS004(nrip, lblUsuario.Text, snpreetiq, false, false, true, nrtmpatv);
            FrmIP.ShowDialog();

            if (FrmIP.DialogResult == DialogResult.OK)
            {
                Controller.SetConfig(FrmIP.Nrip, FrmIP.LastUser, FrmIP.SnPreEtiq, FrmIP.TmpAtv);

                timerAtvNaoConv.Interval = Convert.ToInt32(FrmIP.TmpAtv);
                timerAtvNaoConv.Enabled = true;
            }

            FrmIP.Dispose();
        }