sábado, 8 de novembro de 2014

CRIANDO SOFTWARE DEMONSTRAÇÃO

 CRIANDO SOFTWARE DEMONSTRAÇÃO


Boa tarde, estive procurando algo na internet sobre esse assunto de criar software trial, demo ou similar, como não encopntrei nada sobre isso resolvi fazer algo parecido,não é algo definitivo mas já dá pra se ter uma ideia do que se deseja, veja estes videos, compartilha curte e muito mais.


Google+
segue o codigo da aplicação mostrada nos videos:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;

namespace DEMO
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            string serial;
            string folder = @"C:\ProgramData\ativar";
            if (! Directory.Exists(folder))
            {
                Directory.CreateDirectory(folder);
            }
            string arkivo = @"C:\ProgramData\ativar\reg" + ".txt";
            if (! File.Exists(arkivo))
            {
                File.Create(arkivo);
            }
            StreamReader leitor = new StreamReader(@"C:\ProgramData\ativar\reg.txt");
            serial = leitor.ReadLine();
            if (serial != "1234-5678-9876")
            {
                this.Text = "Software não Regitrado";
                button1.Enabled = false;
            }
            else
            {
                ativado();
            }
            leitor.Close();

        }
        private void ativado()
        {
            this.Text = "Software";
            button1.Enabled = true;
            btnAtivar.Visible = false;
            label2.Visible = false;
            textBox1.Visible = false;
            lblAviso.Visible = false;
        }

        private void btnAtivar_Click(object sender, EventArgs e)
        {
            if (textBox1.Text != "1234-5678-9876")
            {
                lblAviso.Text = "Serial Inválido";
            }
            else
            {
                string gravar;
                gravar = textBox1.Text;
                StreamWriter escrev = new StreamWriter(@"C:\ProgramData\ativar\reg.txt");
                escrev.WriteLine(gravar);
                escrev.Close();
                Form1_Load( sender,  e);

            }

        }

    }
}

NEOBUX

https://www.neobux.com/imagens/banner9/?u=arimateiab&u3=34402090