ویژوال 30 شارپ

سورس کدهای جالب سی شارپ فقط با یک نگاه

ویژوال 30 شارپ

سورس کدهای جالب سی شارپ فقط با یک نگاه

سورس دیکشنری

این هم سورس دیکشنری البته کار من نیست اما واقعا قشنگه حتما دانلود کنید. 

 

http://dl.4downloads.ir/majalleh/2/DictionaryFrom%20C%20sharp_%28www.4DOWNLOADS.ir%29.zip

پاک کردن همه تکست باکس ها

foreach(control c in this.contols) 

 if(c is textbox) 

{  

c.text="";

}

}

Text Coder

        private void button1_Click(object sender, EventArgs e)
        {
            string otext = textBox1.Text;
            string ntext = string.Empty;
            for (int i = 0; i < textBox1.Text.Length; i++)
            {
                int j = char.ConvertToUtf32(otext, i);
                ntext += char.ConvertFromUtf32(255-j );

            }
            textBox1.Text = ntext;
        }

In The Name Of God

        int i = 0;
        private void timer1_Tick(object sender, EventArgs e)
        {
            Bitmap b = new Bitmap(Width, Height);
            Graphics g = Graphics.FromImage(b);
            i+=1;
            g.DrawString("به نام", new Font("Tahoma", 14,FontStyle.Underline), Brushes.Black, new PointF((float)Math.Cos(Math.PI * i / 180) * 100 + Width / 2, (float)(float)Math.Sin(Math.PI * i / 180) * 100 + Height / 2));
            g.DrawString("خداوند", new Font("Tahoma", 14, FontStyle.Underline), Brushes.Black, new PointF((float)Math.Cos(Math.PI * (i + 90) / 180) * 100 + Width / 2, (float)(float)Math.Sin(Math.PI * (i + 90) / 180) * 100 + Height / 2));
            g.DrawString("بخشنده", new Font("Tahoma", 14, FontStyle.Underline), Brushes.Black, new PointF((float)Math.Cos(Math.PI * (i + 180) / 180) * 100 + Width / 2, (float)(float)Math.Sin(Math.PI * (i + 180) / 180) * 100 + Height / 2));
            g.DrawString("بخشایشگر", new Font("Tahoma", 14, FontStyle.Underline), Brushes.Black, new PointF((float)Math.Cos(Math.PI * (i + 270) / 180) * 100 + Width / 2, (float)(float)Math.Sin(Math.PI * (i + 270) / 180) * 100 + Height / 2));
            this.BackgroundImage = b;
        }