русский
Germany.ruForen → Архив Досок→ Programmierung

.NET und C# ohne Web?

09.06.21 15:15
Re: .NET und C# ohne Web?
 
uscheswoi_82 свой человек
разве?

Всё я сам решил проблему:


using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;


namespace ConsoleApplication2
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                Interp i = null;
                Interp i2 = null;


                i = new Interp(@"C:\test\demo.int");
                i2 = new Interp(@"C:\test\demo2.int");
                i.Load(new Rect { x = 1, y = 1, width = 80, height = 10 });
                i2.Load(new Rect { x = 1, y = 11, width = 80, height = 24  });
                i.StepEvent += new Interp.StepEventHandler(Interrupt);
                i2.StepEvent += new Interp.StepEventHandler(Interrupt);
                i.Execute();
                i2.Execute();
            }
            catch(Exception ex) {
                Console.WriteLine(ex.ToString());
            }
        }

        public static void Interrupt()
        {
            Console.WriteLine("Interrupt!");
        }
    }
}


Если я кому-то отвечаю, это не значит что я ему симпатизирую, каждый остаётся при своём мнение
 

Sprung zu