コード例 #1
0
        private void btSalvar_Click(object sender, EventArgs e)
        {
            WriteRegistro Salvar = new WriteRegistro((WriteRegistro.Servers)cobServidor.SelectedIndex, txtCidade.Text, txtUf.Text, txtCep.Text, cboTempo.SelectedItem.ToString(), chkPlaylist.Checked,
                                                     chkZara.Checked, txtFolderPlaylist.Text, txtFolderZara.Text, _Woeid1);

            MessageBox.Show("O software de ser reiniciado para que as alterarções entre em vigor!", "Aviso", MessageBoxButtons.OK, MessageBoxIcon.Information);
            this.Close();
        }
コード例 #2
0
        void carregarPreferencias()
        {
            WriteRegistro LerRegistros = new WriteRegistro();


            ServerTemperatura temp = new ServerTemperatura((int)LerRegistros.Server, LerRegistros.Cidade, LerRegistros.Estado, LerRegistros.SelectTimer, LerRegistros.FolderPlayList, LerRegistros.FolderZara, LerRegistros.AtvPlaylist, LerRegistros.AtvZara, LerRegistros.Woeid);

            lblTemperatura.Text = string.Format("{0:0}", temp.Temperatura) + "ºC";
            lblCondicao.Text    = temp.Condicao.ToString().ToUpper();
            lblHumidade.Text    = string.Format("{0:0}", temp.Humidade.ToString()) + "%";
            picTempo.Image      = temp.IconeTemp();
        }
コード例 #3
0
 bool carregar_Registros()
 {
     try
     {
         WriteRegistro LerRegistros = new WriteRegistro();
         cobServidor.SelectedIndex = (int)LerRegistros.Server;
         txtCep.Text            = LerRegistros.StrCep.ToString();
         txtCidade.Text         = LerRegistros.Cidade.ToString();
         txtUf.Text             = LerRegistros.Estado.ToString();
         cboTempo.SelectedItem  = LerRegistros.SelectTimer.ToString();
         chkPlaylist.Checked    = LerRegistros.AtvPlaylist;
         chkZara.Checked        = LerRegistros.AtvZara;
         txtFolderPlaylist.Text = LerRegistros.FolderPlayList;
         txtFolderZara.Text     = LerRegistros.FolderZara;
         _Woeid1 = LerRegistros.Woeid;
         return(true);
     }
     catch (ArgumentException)
     {
         return(false);
     }
 }