DevExpress de ribbon menüdeki quick access Toolbarı kaldırma - Remove show quick access Toolbar below the ribbon

Csharp win form  kullanlar  için büyük kolaylıklar sağlayan DevExpress de  quick access Toolbarı kaldırmak istiyorsanız aşağıdaki kodu uyguayarak bu durumu çözebilirsiniz.

ribbonmenu.ShowToolbarCustomizeItem=false



Csharp ile şifre üretme (Win Form)

Merhaba bu  yazımda şifre üretme ile ilgili  yazı paylaşacağım.ilk olarak bir form projesi açıyoruz.10 adet textbox ,11 adet timer ,3 adet label ve 3 adet buton ekliyoruz


Programın çalışması : çalıştır butonuna bastığımızda timer1 aktif olup interval değerince textbox1 in değerini değiştiriyor.Bu değer rastgele metoduna bağlı olarak dizi değişkenimizden rastgele bir değeri seçmesiyle oluşuyor.Interval değeri tamamlandığında timer1 pasif duruma geçip timer 2 yi aktif ediyor sırasıyla diğer timerlar aynı şekilde  tetikleniyor.En sonunda bütün textbox değerleri label1 e aktalıp  üretilen şifremiz tamamlanmış oluyor.

Programın çalışma mantığı genel  hatlarıyla böyle.Geliştirilmeye müsait.


////////////////////////////////////////////////////////////////////////////////////////////////////////

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace Sifreleme
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }


        #region String Dizi

        public string [] Dizi = {
                             "0",
                             "1",
                             "2",
                             "3",
                             "4",
                             "5",
                             "6",
                             "7",
                             "8",
                             "9",
                             "A",
                             "B",
                             "C",
                             "D",
                             "E",
                             "F",
                             "G",
                             "H",
                             "I",
                             "J",
                             "K",
                             "L",
                             "M",
                             "N",
                             "O",
                             "P",
                             "R",
                             "S",
                             "T",
                             "U",
                             "I",
                             "W",
                             "Q",
                             "Y",
                             "Z",
                             "a",
                             "b",
                             "c",
                             "d",
                             "e",
                             "f",
                             "g",
                             "h",
                             "i",
                             "j",
                             "k",
                             "l",
                             "m",
                             "n",
                             "o",
                             "u",
                             "p",
                             "r",
                             "s",
                             "t",
                             "u",
                             "w",
                             "q",
                             "y",
                             "z",
                             "!",
                             "'",
                             "^^",
                             "+",
                             "%",
                             "&",
                             "/",
                             "(",
                             ")",
                             "="
                           
                             };


#endregion


        public int Sayac=0;
        public int max = 50;
        public int Sayici = 0;

        private void Form1_Load(object sender, EventArgs e)
        {
            button2.Enabled = false;
            button3.Enabled = false;

            label3.Text = "";
            label2.Text = "";
            label2.Visible = false;

            label1.Visible = false;
            textBox1.Enabled = false;
            textBox2.Enabled = false;
            textBox3.Enabled = false;
            textBox4.Enabled = false;
            textBox5.Enabled = false;
            textBox6.Enabled = false;
            textBox7.Enabled = false;
            textBox8.Enabled = false;
            textBox9.Enabled = false;
            textBox10.Enabled = false;
            button2.Focus();
        }



        public   int  Rastgele ()

        {
     
            Random Rnd = new Random ();
            return  Rnd.Next(0,Dizi.Length);
   
        }



        private void button1_Click(object sender, EventArgs e)
        {
            button3.Enabled = true;
            timer11.Enabled = true;
            button2.Enabled = false;

            textBox1.Enabled = true;
            textBox2.Enabled = true;
            textBox3.Enabled = true;
            textBox4.Enabled = true;
            textBox5.Enabled = true;
            textBox6.Enabled = true;
            textBox7.Enabled = true;
            textBox8.Enabled = true;
            textBox9.Enabled = true;
            textBox10.Enabled = true;


            timer1.Enabled = true;

            button1.Enabled = false;
         

           
           
        }

        private void timer1_Tick(object sender, EventArgs e)
        {

            Sayac++;
            textBox1.Text = Dizi[Rastgele()];
         
     
            if (Sayac==max )
            {
                timer1.Enabled = false;
                timer2.Enabled = true;
                Sayac = 0;
               
            }


        }

        private void timer2_Tick(object sender, EventArgs e)
        {

            Sayac++;
            textBox2.Text = Dizi[Rastgele()];
            if (Sayac == max + 1)
            {
                timer2.Enabled = false;
                timer3.Enabled = true;
                Sayac = 0;

            }

        }

        private void timer3_Tick(object sender, EventArgs e)
        {
            Sayac++;
            textBox3.Text = Dizi[Rastgele()];
            if (Sayac == max +2 )
            {
                timer3.Enabled = false;
                timer4.Enabled = true;
                Sayac = 0;

            }
        }

        private void timer4_Tick(object sender, EventArgs e)
        {
            Sayac++;
            textBox4.Text = Dizi[Rastgele()];
            if (Sayac == max + 3)
            {
                timer4.Enabled = false;
                timer5.Enabled = true;
                Sayac = 0;

            }
        }

        private void timer5_Tick(object sender, EventArgs e)
        {
            Sayac++;
            textBox5.Text = Dizi[Rastgele()];
            if (Sayac == max + 4)
            {
                timer5.Enabled = false;
                timer6.Enabled = true;
                Sayac = 0;

            }
        }

        private void timer6_Tick(object sender, EventArgs e)
        {
            Sayac++;
            textBox6.Text = Dizi[Rastgele()];
            if (Sayac == max + 5)
            {
                timer6.Enabled = false;
                timer7.Enabled = true;
                Sayac = 0;

            }
        }

        private void timer7_Tick(object sender, EventArgs e)
        {
            Sayac++;
            textBox7.Text = Dizi[Rastgele()];
            if (Sayac == max + 6)
            {
                timer7.Enabled = false;
                timer8.Enabled = true;
                Sayac = 0;

            }
        }

        private void timer8_Tick(object sender, EventArgs e)
        {
            Sayac++;
            textBox8.Text = Dizi[Rastgele()];
            if (Sayac == max + 7)
            {
                timer8.Enabled = false;
                timer9.Enabled = true;
                Sayac = 0;

            }
        }

        private void timer9_Tick(object sender, EventArgs e)
        {
            Sayac++;
            textBox9.Text = Dizi[Rastgele()];
            if (Sayac == max + 4)
            {
                timer9.Enabled = false;
                timer10.Enabled = true;
                Sayac = 0;

            }
        }

        private void timer10_Tick(object sender, EventArgs e)
        {
            Sayac++;
            textBox10.Text = Dizi[Rastgele()];
            if (Sayac == max + 4)
            {
                timer10.Enabled = false;
                button3.Enabled = false;
                Sayac = 0;
                timer11.Enabled = false;
               
               
                label1.Visible = true;
                label1.Text = "ŞİFRENİZ : ";
                label2.Visible = true;
               

                label2.Text =   textBox1.Text + textBox2.Text + textBox3.Text + textBox4.Text + textBox5.Text + textBox6.Text + textBox7.Text + textBox8.Text + textBox9.Text + textBox10.Text;
                button2.Enabled = true;
            }

         
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Clipboard.Clear();
            Sayici = 0;
            Sayac = 0;
            label1.Text = "";
            label2.Text = "";
            label3.Text = "";
            button1.Enabled = true;
            textBox1.Text = "";
            textBox2.Text = "";
            textBox3.Text = "";
            textBox4.Text = "";
            textBox5.Text = "";
            textBox6.Text = "";
            textBox7.Text = "";
            textBox8.Text = "";
            textBox9.Text = "";
            textBox10.Text = "";
        }

       
     
        private void label2_Click(object sender, EventArgs e)
        {
            Clipboard.SetText(label2.Text);

            MessageBox.Show("Şifreniz Kopyalandı.");

        }

        private void timer11_Tick(object sender, EventArgs e)
        {
            Sayici++;

            label3.Text = Sayici.ToString();
        }

        private void button3_Click(object sender, EventArgs e)
        {

            timer1.Enabled = false;
            timer2.Enabled = false;
            timer3.Enabled = false;
            timer4.Enabled = false;

            timer5.Enabled = false;
            timer6.Enabled = false;
            timer7.Enabled = false;

            timer8.Enabled = false;
            timer9.Enabled = false;

            timer10.Enabled = false;

            timer11.Enabled = false;
            button1.Enabled = true;
            button2.Enabled = true;
        }




       

    }
}





Csharp Otomatik Website Açıcı (Form Uygulaması)


Programın çalışması 

Öncelikle siteler adında bir string tipinde dizi tanımlıyoruz.Bu dizi website isimlerini tutuyor.Int tipinde bir sayac ile dizimizin uzunluğunu tutarak hata vermesini engelliyoruz.
Form un load kısmında timer nesnesini aktif hale getirip  Interval değerini 10 sn olarak tanımlıyoruz 10 sn geçtikten sonra PerformClick() metodu ile  butonumuza  otomatik tıklattıyoruz.Aslına bakarsanız  iş burda bitiyor.

SiteAc fonksiyonunuda ise  tarayıcımıza gönderilen site ismini varsayılan browser da açıyor.Genel hatlarıyla çalışması bu şekilde.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;


namespace AutoClick
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

         
        }

        // Değişkenler burda tanımlanır

        public int Sayac = 0;

        #region Siteler

        public string[] Siteler =

        {
            "http://www.gezginnerede.com",
            "http://www.jetsethayat.com",
            "http://www.hanedancity.com",
            "http://www.halil-sahin.blogspot.com",
            "http://www.facebook.com/sshneo",
            "http://www.hurriyet.com.tr",
            "http://www.mynet.com",
            "http://www.linkedin.com",
            "https://twitter.com/sshneo",
            "http://www.goodreads.com/sshneo",



        };

        #endregion

        public void SiteAc(string SiteAdi)

        {
            System.Diagnostics.Process.Start(SiteAdi);

        }

        private void timer1_Tick_1(object sender, EventArgs e)
        {
         

       

            if (Sayac > Siteler.Length-1)
            {

                timer1.Enabled = false;


                textBox1.Text = "Görev Tamamlandı...";
                textBox1.BorderStyle = BorderStyle.None;
                textBox1.BackColor = Color.Green;
                button1.Text = "OK..";
                Sayac = 0;
            }

            else
            {

         
            textBox1.Text = "";

            textBox1.Text = Siteler[Sayac];
            listBox1.Items.Add("Açılan Site : " + Siteler[Sayac]);

            listBox1.Items.Add("Timer Aktif Oldu");



            button1.Focus();
            listBox1.Items.Add("Buton 1 Focuslandı");


            listBox1.Items.Add("Butona Tıklandı");


            button1.Text = "Tıklandı........";



            button1.PerformClick();

            button1.Text = "Bekleniyor";
                label1.Text = (Sayac + 1).ToString();
            }

            Sayac++;
       

        }
        private void button1_Click_1(object sender, EventArgs e)
        {

            string SiteAdi = Siteler[Sayac];

            SiteAc(SiteAdi);
       

         
        }

        private void Form1_Load(object sender, EventArgs e)
        {

            textBox1.BackColor = Color.Red;
            textBox1.ForeColor = Color.White;
     
            button1.Text = "Yükleniyor...";
            label1.Text = "";
            timer1.Enabled = true;
            timer1.Interval = 10000;

            listBox1.Items.Add("Program Yüklendi.");
            listBox1.Items.Add("10 sn sonra çalışmaya başlıcak.");
        }
    }
}

Csharp Konsol Metodu - Renk Döndüren Metod



Yazdığım kod : konsol uygulamalarında kullanabileceğiniz bir metoddur.


 public static ConsoleColor Renkver(string str_Renk,string Param)

        {
            if (Param=="Yazı")
            {


                switch (str_Renk)

                {
                case "Mavi":
                case "mavi":

                    return Console.BackgroundColor = ConsoleColor.Blue;

                break;


                    case "sarı":
                    case "Sarı":
                        return Console.BackgroundColor = ConsoleColor.Yellow;
                        break;


                case "Yesil":
                case "yesil":

                    return Console.BackgroundColor = ConsoleColor.Green;
                break;


                case "Siyah":
                case "siyah":

                    return Console.BackgroundColor = ConsoleColor.Black;

                    break;

                case "Beyaz":
                case "beyaz":

                    return Console.BackgroundColor = ConsoleColor.White;
                    break;

                case "Kırmızı":
                case "kırmızı":

                    return Console.BackgroundColor = ConsoleColor.Red;


                    break;


                }
            }
                else if (Param=="Arkaplan")
       {

                switch (str_Renk)

                {
                    case "Mavi":
                    case "mavi":

                        return Console.ForegroundColor = ConsoleColor.Blue;

                        break;

                    case "sarı":
                    case "Sarı":
                        return Console.ForegroundColor = ConsoleColor.Yellow;
                        break;

                    case "Yesil":
                    case "yesil":

                        return Console.ForegroundColor = ConsoleColor.Green;
                        break;


                    case "Siyah":
                    case "siyah":

                        return Console.ForegroundColor = ConsoleColor.Black;

                        break;

                    case "Beyaz":
                    case "beyaz":

                        return Console.ForegroundColor = ConsoleColor.White;
                        break;

                    case "Kırmızı":
                    case "kırmızı":

                        return Console.ForegroundColor = ConsoleColor.Red;


                        break;


                }

            }


            return ConsoleColor.White;

        }


////////////////////////////////////////


Kullanım Kodu


  Renkver("mavi", "Arkaplan");
  Renkver("sarı","Yazı");
  Console.WriteLine("MERHABA DÜNYA...");



Herhangi bi sorunuz olursa yorum kısmından sorabilirsiniz
         

Json Nedir

Bundan seneler önce xml(Extensible Markup Language – Genişletilebilir İşaretleme Dili) diye bir şey vardı.(Halen var )Bağımsız bir kuruluş olan W3C (World Wide Web Consortium) organizasyonu tarafından tasarlanan ve herhangi bir kurumun tekelinde bulunmayan xml ağaç yapısına sahip olup verileri node(nod diye okunur) denilen etiketlerle işaretler.Ozamanın  ihtiyaçlarını karşılayan xml  bir anda popüler oldu.Üzerine yüzlerce makaleler yazıldı.Sonradan ihtiyaçlar genişleyip ,değiştikçe farklı arayışlar içine gidildi.Nihayetinde json doğdu.


Json Nedir

Json (Javascript Object Notation) Genel anlamıyla veri depolama ve işleme için kullanılan veri değişim formatıdır.


Xml ile ortak yönleri ve farkı nedir

Xml de hiyerarşi/ağaç yapısı vardır ve bu nodlarla sağlanır.Nodlar arasında ebebeyn ilişkisi vardır.Json </> gibi tag(etiket) ler kullanmaz.Json'da da hiyerarşi vardır.İkiside düz yazıdır bu sebeble insanlar tarafından anlaşılması kolaydır.Json daha kısadır bu sebeble daha az yer kaplar ,daha hızlı okunur ve yazılır  ikisinde de değer içinde değer vardır.ikiside http isteklerinde kullanılabilir(Bunun ne anlama geldiği alt satırlarda daha iyi anlayacaksınız.)
En bariz fark ise JSON da array(dizi) kullanılabilir.

Eğer  projenizde API kullanmanız gerekiyorsa  mutlaka şahit olmuşsunuzdur veri formatı olarak json kullanıldığını.



Json nerelerde kullanılabilir

Javascript,node js,MongoDB ve bir çok yerde.Özellikle API kullanıyorsanız.


Json ın Kullanım Şekli Nasıldır ?

Json türündeki veriler iki Ana parçadan oluşur: key (anahtar) ve value (değer). ({isim:"değer"})
Anahtar’da nesnenin hangi özelliğinin olduğu tanımlanırken değerde ise kullandığımız değişkenin değeri  tanımlanır. Nesnelerdeki anahtar ve değerler
string türünde tanımlanır.

Veri alındığında isim yazılarak değere ulaşılır.
Bu şekilde bir dilden başka bir dile veriler taşınabilir.
Bir Örnek Yapalım.

{
   "Ad": "Halil ",
   "Soyad": "ŞAHİN"
}



Json ile array olarak kullanıdığımız örnek :


"AdSoyAd":[
    {"Adi":"Halil ", "Soyadi":"ŞAHİN"},
    {"Adi":"Bilge", "Sayadi":"Kağan"},
   
]

Bu örnekte "AdSoyAd"  isminde bir array oluşturduk.


Şimdilik yazacaklarım bu kadar.Daha geniş bilgiye ulaşmak istiyorsanız.Bu adresten detaylı bilgi alabilirsiniz.












Wordpress tema çevirisi


Eğer yabancı bir siteden wordpress tema satın aldıysanız genellikle   tema değişkenlerinde inglizce kelimeler görürsünüz.Tema geliştiricileri sanırım bu konuyu fazla düşünmediği için yine Türkçemiz yetim kalıyor.

Ama bunun bir çözümü var.Wordpress de tema poedit adı verilen bir program vasıta ile çevrilir.Türkçeleştirme yapmak için "\wp-content\themes\TEMA ADI\languages" yolunda bulunur.

Dosyalar iki türlüdür.İlki:.mo uzantılı olan.İkincisi:.po uzantılı olan.Siz po uzantılı olan dosyayı prgramdan okutup düzenlemeleri yapacaksınız.

PoEdit Programını şu adresten indirebilirsiniz.





İlgili Aramalar

Wordpress de Tema nasıl çevirilir ?
Wordpress de temanın türkçeleştirilmesi
Wordpress temasını türkçeleştirme
Wordpress türkçeleştirme eklentisi
Wordpess türkçe tema
wordpress tema türkçeleştirme poedit
ücretsiz wordpress tema
wordpress tema türkçeleştirme rehberi

DevExpress de ribbon menüdeki quick access Toolbarı kaldırma - Remove show quick access Toolbar below the ribbon

Csharp win form  kullanlar  için büyük kolaylıklar sağlayan  DevExpress de  quick access Toolbarı kaldırmak istiyorsanız aşağıdaki kodu uyg...