Example #1
0
        private void FrmFunc_Load(object sender, EventArgs e)
        {
            tsBotoes.ImageList = imlBotoes;
            int indice = 0;

            foreach (ToolStripItem item in tsBotoes.Items)
            {
                if (item is ToolStripButton)
                {
                    (item as ToolStripButton).ImageIndex = indice++;
                }
            }

            bool SelecionouArquivo = false;


            while (!(SelecionouArquivo))
            {
                SelecionouArquivo = dlgAbrir.ShowDialog() == DialogResult.OK;
            }

            asPalavras = new VetCadastro(100);
            asPalavras.LerDados(dlgAbrir.FileName);

            asPalavras.PosicionarNoInicio();
            AtualizarTela();
        }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            dlgAbrir.Title = "Escolha o arquivo texto para o jogo";

            bool SelecionouArquivo = false;


            while (!(SelecionouArquivo))
            {
                SelecionouArquivo = dlgAbrir.ShowDialog() == DialogResult.OK;
            }

            if (SelecionouArquivo)
            {
                vetor.LerDados(dlgAbrir.FileName); // ler os dados na classe vetor passando como parĂ¢metro o nome do arquivo aberto
            }
        }