Example #1
0
        private void prs_barcode_btn_Click(object sender, EventArgs e)
        {
            string content = File.ReadAllText("demo");

            if (content != "")
            {
                TextWriter txt = new StreamWriter("demo");
                txt.Write("");
                txt.Close();
                timer1.Enabled = true;

                barcode.Show();
            }
            else
            {
                timer1.Enabled = true;

                barcode.Show();
            }


            // FileStream stream = File.Open("scanbarcode.exe", FileMode.Open);
            // barcode form2 = new barcode();
            //form2.Show();
            //this.Close();
            //cache1.A1();
            //Application.Run(new barcode());
            // barcode mod = new barcode();
            //mod.Show();
            //this.Hide();
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string content = File.ReadAllText("demo");

            if (content != "")
            {
                TextWriter txt = new StreamWriter("demo");
                txt.Write("");
                txt.Close();
                timer2.Enabled = true;
                timer1.Enabled = false;
                barcode.Show();
            }
            else
            {
                timer1.Enabled = true;
                barcode.Show();
            }
        }