Ejemplo n.º 1
0
        public GameForm(StartForm startForm, int velicina, int mode)
        {
            InitializeComponent();
            this.startForm = startForm;
            this.velicina  = velicina;
            this.mode      = mode;
            this.tabla     = new Tabla((short)this.velicina);
            this.logPoruka = new LogPoruka();

            process = new Process();
            if (mode == 0)
            {
                process.StartInfo.FileName = "pvp.bat";
            }
            else
            {
                process.StartInfo.FileName = "cvp.bat";
            }

            process.StartInfo.UseShellExecute        = false;
            process.StartInfo.CreateNoWindow         = true;
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.RedirectStandardError  = true;
            process.StartInfo.RedirectStandardInput  = true;
            process.EnableRaisingEvents = true;
            process.OutputDataReceived += new DataReceivedEventHandler(OutputHandler);

            processprikaz       = 0;
            processRacunarPotez = false;
            processPotezX       = false;
            processPotezY       = false;
            clickUp             = false;
            gameOver            = false;
            pomeranje           = false;

            process.Start();
            process.BeginOutputReadLine();
            process.BeginErrorReadLine();
        }
Ejemplo n.º 2
0
 public SizeForm(StartForm startForm)
 {
     InitializeComponent();
     this.startForm = startForm;
 }