Willkommen auf myCSharp.de! Anmelden | kostenlos registrieren
 | Suche | FAQ

Hauptmenü
myCSharp.de
» Startseite
» Forum
» Suche
» Regeln
» Wie poste ich richtig?

Mitglieder
» Liste / Suche
» Wer ist online?

Ressourcen
» FAQ
» Artikel
» C#-Snippets
» Jobbörse
» Microsoft Docs

Team
» Kontakt
» Cookies
» Spenden
» Datenschutz
» Impressum

  • »
  • Community
  • |
  • Diskussionsforum
Forumsprogramm
pdelvo
myCSharp.de - Member

Avatar #avatar-3354.png


Dabei seit:
Beiträge: 1.346

beantworten | zitieren | melden


using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }
}
private Nachricht | Beiträge des Benutzers
Kevka
myCSharp.de - Member

Avatar #avatar-2664.png


Dabei seit:
Beiträge: 83

beantworten | zitieren | melden


using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
           while(true)
           {
              Warte(1);
           }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }
}
private Nachricht | Beiträge des Benutzers
Floste
myCSharp.de - Member

Avatar #avatar-2376.jpg


Dabei seit:
Beiträge: 1.130
Herkunft: Norddeutschland

Themenstarter:

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
           while(true)
           {
              Warte(1);
           }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value,string name)
        {
        }
        T value;
        public T Value
        {   get
            {
        }  }
        public override string ToString()
        {
        }
    }

    class PrayForm:Form
    {
        public PrayForm()
        {
        }
    }
}
Projekte:Jade, HttpSaver
Zum Rechtschreiben gibts doch schon die Politiker. Aber die bauen auch nur mist!
private Nachricht | Beiträge des Benutzers
markus111
myCSharp.de - Member

Avatar #avatar-3108.png


Dabei seit:
Beiträge: 479
Herkunft: Henstedt-Ulzburg

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
           while(true)
           {
              Warte(1);
           }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value,string name)
        {
        }
        T value;
        public T Value
        {   get
            {
        }  }
        public override string ToString()
        {
        }
    }

    class PrayForm:Form
    {
        public PrayForm()
        {
          InitForm();
        }

        private InitForm()
        {
           this.Text = "Pray Form";
        }
    }
}
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von markus111 am .
private Nachricht | Beiträge des Benutzers
Floste
myCSharp.de - Member

Avatar #avatar-2376.jpg


Dabei seit:
Beiträge: 1.130
Herkunft: Norddeutschland

Themenstarter:

beantworten | zitieren | melden


using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
           while(true)
           {
              Warte(1);
           }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value,string name)
        {
        }
        T value;
        public T Value
        {   get
            {
        }  }
        public override string ToString()
        {
        }
    }

    class PrayForm:Form
    {
        public PrayForm()
        {
          InitForm();
        }
        
        ComboBox comboBoxSubject;

        private InitForm()
        {
            comboBoxSubject=new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
    }
}
Projekte:Jade, HttpSaver
Zum Rechtschreiben gibts doch schon die Politiker. Aber die bauen auch nur mist!
private Nachricht | Beiträge des Benutzers
pdelvo
myCSharp.de - Member

Avatar #avatar-3354.png


Dabei seit:
Beiträge: 1.346

beantworten | zitieren | melden


using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
           while(true)
           {
              Warte(1);
           }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value,string name)
        {
        }
        T value;
        public T Value
        {   get
            {
        }  }
        public override string ToString()
        {
        }
    }

    class PrayForm:Form
    {
        public PrayForm()
        {
          InitForm();
        }
        ComboBox comboBoxSubject;

        private InitForm()
        {
            comboBoxSubject=new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL", 
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));
            base.OnPaint(e);
        }
    }
}
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von pdelvo am .
private Nachricht | Beiträge des Benutzers
Kevka
myCSharp.de - Member

Avatar #avatar-2664.png


Dabei seit:
Beiträge: 83

beantworten | zitieren | melden


using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
        }
        T value;
        public T Value
        {
            get
            {
                return default(T);
            }
        }
        public override string ToString()
        {
            return value.ToString();
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));
            base.OnPaint(e);
        }
    }
}
private Nachricht | Beiträge des Benutzers
Floste
myCSharp.de - Member

Avatar #avatar-2376.jpg


Dabei seit:
Beiträge: 1.130
Herkunft: Norddeutschland

Themenstarter:

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value=value;
            this.name=name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));
            base.OnPaint(e);
        }
    }
}
Projekte:Jade, HttpSaver
Zum Rechtschreiben gibts doch schon die Politiker. Aber die bauen auch nur mist!
private Nachricht | Beiträge des Benutzers
markus111
myCSharp.de - Member

Avatar #avatar-3108.png


Dabei seit:
Beiträge: 479
Herkunft: Henstedt-Ulzburg

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value=value;
            this.name=name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));
            base.OnPaint(e);
        }
    }
}
private Nachricht | Beiträge des Benutzers
dechavue
myCSharp.de - Member

Avatar #avatar-2999.png


Dabei seit:
Beiträge: 179
Herkunft: Österreich

beantworten | zitieren | melden


using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value=value;
            this.name=name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
				new System.Drawing.Point(p.X,                                    
                                         p.Y),
				new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)), 
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
				new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),                               
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)), 
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
				new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)), 
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}
private Nachricht | Beiträge des Benutzers
Floste
myCSharp.de - Member

Avatar #avatar-2376.jpg


Dabei seit:
Beiträge: 1.130
Herkunft: Norddeutschland

Themenstarter:

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
            Application.Run(new PrayForm());
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value=value;
            this.name=name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}
Projekte:Jade, HttpSaver
Zum Rechtschreiben gibts doch schon die Politiker. Aber die bauen auch nur mist!
private Nachricht | Beiträge des Benutzers
markus111
myCSharp.de - Member

Avatar #avatar-3108.png


Dabei seit:
Beiträge: 479
Herkunft: Henstedt-Ulzburg

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}

Ich habe das Programm schonmal getestet. Bisher geht alles
private Nachricht | Beiträge des Benutzers
Floste
myCSharp.de - Member

Avatar #avatar-2376.jpg


Dabei seit:
Beiträge: 1.130
Herkunft: Norddeutschland

Themenstarter:

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    interface IPrayer
    {void Pray();}
    
    class ApocalypsePrayer:IPrayer
    {
        public void Pray()
        {
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            comboBoxSubject.Items.Add(new Item<IPrayer>(new ApocalypsePrayer(), "Apocalypse"));
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von Floste am .
Projekte:Jade, HttpSaver
Zum Rechtschreiben gibts doch schon die Politiker. Aber die bauen auch nur mist!
private Nachricht | Beiträge des Benutzers
markus111
myCSharp.de - Member

Avatar #avatar-3108.png


Dabei seit:
Beiträge: 479
Herkunft: Henstedt-Ulzburg

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Thread t = new Thread(EvileBackgroundThread);
            t.IsBackground = true;
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    interface IPrayer
    {void Pray();}

    class ApocalypsePrayer:IPrayer
    {
        public void Pray()
        {
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            comboBoxSubject.Items.Add(new Item<IPrayer>(new ApocalypsePrayer(), "Apocalypse"));
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}
private Nachricht | Beiträge des Benutzers
markus111
myCSharp.de - Member

Avatar #avatar-3108.png


Dabei seit:
Beiträge: 479
Herkunft: Henstedt-Ulzburg

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Console.WriteLine("ForumsProgramm by myCSharp.de");
            Console.WriteLine("-----------------------------");
            Thread t = new Thread(EvileBackgroundThread);
            t.IsBackground = true;
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    interface IPrayer
    {void Pray();}

    class ApocalypsePrayer:IPrayer
    {
        public void Pray()
        {
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            comboBoxSubject.Items.Add(new Item<IPrayer>(new ApocalypsePrayer(), "Apocalypse"));
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}

Mal wieder anschubsen!
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von markus111 am .
private Nachricht | Beiträge des Benutzers
Scarecraft
myCSharp.de - Member

Avatar #avatar-2558.jpg


Dabei seit:
Beiträge: 268
Herkunft: Lingen

beantworten | zitieren | melden

using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Console.WriteLine("ForumsProgramm by myCSharp.de");
            Console.WriteLine("---------------------------------------");
            Thread t = new Thread(EvileBackgroundThread);
            t.IsBackground = true;
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }
    }

    interface IPrayer
    {void Pray();}

    class ApocalypsePrayer:IPrayer
    {
        public void Pray()
        {
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            comboBoxSubject.Items.Add(new Item<IPrayer>(new ApocalypsePrayer(), "Apocalypse"));
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }
}
Name: Scarecraft
Language:C#
learning since:winter 2007
IDE: Visual Studio 2005/08 Professional Editon
Skill:Medium
qualifications: MCP - Microsoft Certified Professional
Homepage : FX RPG Maker
private Nachricht | Beiträge des Benutzers
Atomroflman
myCSharp.de - Member



Dabei seit:
Beiträge: 266
Herkunft: Hamburg

beantworten | zitieren | melden


using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Console.WriteLine("ForumsProgramm by myCSharp.de");
            Console.WriteLine("---------------------------------------");
            Thread t = new Thread(EvileBackgroundThread);
            t.IsBackground = true;
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            OMG();
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }

        private static void OMG()
        {
            string Exclaim = "";
            for (int i = 0; i < 10; i++)
            {
                Exclaim += "!";
                Console.WriteLine(string.Format("OMG{0} Ihr leidet doch{0}", Exclaim));
            }
        }
    }

    interface IPrayer
    { void Pray();}

    class ApocalypsePrayer : IPrayer
    {
        public void Pray()
        {
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            comboBoxSubject.Items.Add(new Item<IPrayer>(new ApocalypsePrayer(), "Apocalypse"));
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }

}
Von all den Sachen, die mir verloren gegangen, hab ich am meisten an meinem Verstand gehangen... MfG...
private Nachricht | Beiträge des Benutzers
winSharp93
myCSharp.de - Experte

Avatar #avatar-2918.png


Dabei seit:
Beiträge: 5.742
Herkunft: Stuttgart

beantworten | zitieren | melden

[offtopic]
Zitat
Wie viele Forenmitglieder braucht man zum Wechseln einer Glühbirne ?
[...]
und 1 User, der den Thread nach 6 Monaten wieder ausgräbt, damit alles von vorne losgeht.......
(siehe Humor: Java Programmierer ... und andere lustige Sachen)
SCNR
[/offtopic]
Dieser Beitrag wurde 1 mal editiert, zum letzten Mal von winSharp93 am .
private Nachricht | Beiträge des Benutzers
ANSI_code
myCSharp.de - Member

Avatar #avatar-2839.jpg


Dabei seit:
Beiträge: 467
Herkunft: Bayern

beantworten | zitieren | melden

wie lange ist das her? Naja egal. Ich implementiere mal den ApocalipsePlayer etwas weiter. Macht bitte mal in der Pray Methode den Schleifeninnhalt.
Dann muss man ihn noch einsetzen.


using System.Windows.Forms;
using System.Xml.Linq;
using System;
using System.IO; //hat gefehlt.
using System.Threading;

[assembly: Divine]

class DivineAttribute : Attribute
{
}

namespace ForumsProgramm
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            Console.WriteLine("ForumsProgramm by myCSharp.de");
            Console.WriteLine("---------------------------------------");
            Thread t = new Thread(EvileBackgroundThread);
            t.IsBackground = true;
            t.Start();
            Console.WriteLine("Hello world?");

            PrayForm form = new PrayForm();
            form.ShowDialog();

            if (haveApocalypse())
            {
                string s = "Bye, World!";
                //this.SaySomething(s);
                Program.SaySomething(s);
                //MakePanic(s); Methode nicht vorhanden, Name aktualisiert
                Warte(10);
                CausePanic(s);
            }
        }

        static void SaySomething(string s)
        {
            MessageBox.Show(s, "Something very important to say");
        }

        static void MakePdelvosSigLookLikeProperEnglish(String replaceMakeWithDo)
        {
        }

        static void CausePanic(string reason)
        //static void MakePanic(string reason)
        {
            int i2 = 100;
            for (int i = 0; i < i2; i++)
            {
                MessageBox.Show("Panic Reason:" + reason, "Incite Panic", MessageBoxButtons.OK);
            }

        }

        static void EvileBackgroundThread()
        {
            OMG();
            while (true)
            {
                Warte(1);
                Console.Beep();
            }
        }

        static bool haveApocalypse()
        {
            String SFile = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
            SFile += "\\settings.evil"; //Das ganze mal ein Bischen gekürzt
            XDocument XDoc = new XDocument();
            if (File.Exists(SFile))
            {
                XDoc = XDocument.Load(SFile);
            }
            //return XDoc != null;
            return XDoc.Root != null;
        }

        static void Warte(int Seconds)
        {
            //Thread.Sleep(Seconds / 1000);
            Thread.Sleep(Seconds * 1000);
        }

        private static void OMG()
        {
            string Exclaim = "";
            for (int i = 0; i < 10; i++)
            {
                Exclaim += "!";
                Console.WriteLine(string.Format("OMG{0} Ihr leidet doch{0}", Exclaim));
            }
        }
    }

    interface IPrayer
    { void Pray();}

    class ApocalypsePrayer : IPrayer
    {
        public void Pray()
        {
                   //13 Mal!!!
               for(int i=0;i<13;i++)
                {

                }
                
        }
    }

    class Item<T>
    {
        public Item(T value, string name)
        {
            this.value = value;
            this.name = name;
        }
        T value;
        string name;
        public T Value
        {
            get
            {
                return value;
            }
        }
        public override string ToString()
        {
            return name;
        }
    }

    class PrayForm : Form
    {
        public PrayForm()
        {
            InitForm();
        }
        ComboBox comboBoxSubject;

        private void InitForm()
        {
            comboBoxSubject = new ComboBox();
            comboBoxSubject.Items.Add(new Item<IPrayer>(new ApocalypsePrayer(), "Apocalypse"));
            this.Text = "Pray Form";
            this.Controls.Add(comboBoxSubject);
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            e.Graphics.Clear(System.Drawing.Color.Black);
            e.Graphics.DrawString("EVIL",
                new System.Drawing.Font("Times New Roman", 40.0f),
                new System.Drawing.SolidBrush
                    (System.Drawing.Color.Red),
                    new System.Drawing.PointF(0.0f, 0.0f));

            System.Drawing.Point p = new System.Drawing.Point(Width / 2, 0);
            e.Graphics.DrawLines(new System.Drawing.Pen(System.Drawing.Color.Red, 10f), new System.Drawing.Point[]{
                new System.Drawing.Point(p.X,
                                         p.Y),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X +=                              (Width > Height ? Height : Width),
                                         p.Y),
                new System.Drawing.Point(p.X -= (int)(Math.Cos(Math.PI/ 5.0)*(Width > Height ? Height : Width)),
                                         p.Y += (int)(Math.Sin(Math.PI/ 5.0)*(Width > Height ? Height : Width))),
                new System.Drawing.Point(p.X += (int)(Math.Sin(Math.PI/10.0)*(Width > Height ? Height : Width)),
                                         p.Y -= (int)(Math.Cos(Math.PI/10.0)*(Width > Height ? Height : Width)))});
            base.OnPaint(e);
        }
    }

}  
 
private Nachricht | Beiträge des Benutzers