public static void Start() { String Text; moves = 0; shifts = 0; Playground.RegisterKeyType(); Dateileser datain = new Dateileser(); GraphicEngine.currentContext = BufferedGraphicsManager.Current; GraphicEngine.myBuffer = GraphicEngine.currentContext.Allocate(Playground.CreateGraphics(), Playground.DisplayRectangle); Text = datain.leseein(); //GraphicEngine.initiateMap(Text, ref Playground._spieler); GraphicEngine.initiateMap(Text, ref Spieler); Engine.threadTargetStarter(); Playground.timer1.Start(); }
//public void End() //{ // timer1.Stop(); // DeRegisterKeyType(); // Engine.anzTargets = 0; // Engine.FieldMap_2D = null; // datain = null; // MessageBox.Show("Winning"); //} //private void Reset() //{ // threadTargetTest.Abort(); // timer1.Stop(); // DeRegisterKeyType(); // Engine.anzTargets = 0; // Engine.FieldMap_2D = null; // datain = null; //} //public void Start() //{ // String Text; // RegisterKeyType(); // datain = new Dateileser(); // currentContext = BufferedGraphicsManager.Current; // myBuffer = currentContext.Allocate(this.CreateGraphics(), this.DisplayRectangle); // Text = datain.leseein(); // GraphicEngine.initiateMap(Text, ref _spieler); // Engine.threadTargetStarter(out threadTargetTest); // timer1.Start(); //} private void OnTimer(object sender, EventArgs e) { GraphicEngine.paint(this); //GraphicEngine.paint(panel1); }