Orhan Türk | Software,System,C#,Asp Net ,Java,Vb.Net,SQLServer,LINQ

C# İphone WebBrowser

14. January 2010

Evet arkadaşlar bir web  browser projesi  yapıyordum nasıl bişey olsun derken bende iphone web browser  uygulaması  yazdım :) umarım  işe yarar sizlerde  yeni  eklentiler yazabilirsiniz sade  bir görüm oldu ama kullanılır :)

  Source code = İphoneİpaDownloadManager.rar (566,07 kb)

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace İphoneİpaDownloadManager
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            webBrowser1.Navigate(txtara.Text);
            txtara.Text = "";
            txtara.Focus();
        }

        private void Form1_Load_1(object sender, EventArgs e)
        {

            try
            {
                cmblist.Items.Clear();
                StreamReader srRead = new StreamReader(@"adresler.txt");
                while (srRead.EndOfStream == false)
                {
                    cmblist.Items.Add(srRead.ReadLine().ToString());
                }
                srRead.Close();
            }
            catch (Exception ex)
            {

                MessageBox.Show("Hatalı Yükleme !\n\n" + ex.Message);
            }

        }

        private void cmblist_SelectedIndexChanged_1(object sender, EventArgs e)
        {
            webBrowser1.Navigate(cmblist.Text);
            txtara.Text = "";
            txtara.Focus();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            frmadres adrs = new frmadres();

            adrs.ShowDialog();

        }

        private void btnfwrd_Click_1(object sender, EventArgs e)
        {
            webBrowser1.GoForward();
        }

        private void btnback_Click_1(object sender, EventArgs e)
        {
            webBrowser1.GoBack();
        }

        private void btnhome_Click_1(object sender, EventArgs e)
        {
            webBrowser1.GoHome();
        }

        private void btnreflesh_Click(object sender, EventArgs e)
        {
            webBrowser1.Refresh();
        }

        private void btnsearch_Click(object sender, EventArgs e)
        {
            webBrowser1.GoSearch();
        }

    }
}

 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace İphoneİpaDownloadManager
{
    public partial class frmadres : Form
    {
        public frmadres()
        {
            InitializeComponent();
        }

        private void btnclose_Click(object sender, EventArgs e)
        {
            Close();
        }
        StreamWriter sw;
        private void btnekle_Click(object sender, EventArgs e)
        {
            sw = new StreamWriter(@"adresler.txt", true, Encoding.GetEncoding(1254));
            string eklenecekVeri = String.Format("{0}", txtAdres.Text);
            sw.WriteLine(eklenecekVeri);
            sw.Flush();
            txtAdres.Text = "";
            this.Close();
        }     
    }
}
 

 

Evet arkadaşlar örnek bir projenin  sonuna gelmiş olduk yeni  bir projede görüşmek üzere herkeze iyi calışmalar

 Saygılarımla Orhan Türk 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

C# , İphone ,

Süper karikatür‏

11. January 2010
 Sabah bir abim  tarafından gönderilen mail sizinle burada  paylaşmak istedim  

 


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

karikatür‏ler

Windows 7 Enterprise ta oyunlar yok

10. January 2010

Windows 7 Enterprise kurdunuz. Sonra bir de baktınız oyunlar yok :)

Hani Professional, Home Edition'un bütün özelliklerini içeriyordu; Hani Enterprise de Professional sürümünün bütün özelliklerini içeriyordu !?

Tabi ki aslında içeriyor. Sadece ilk kurulumda gözükmüyor. Oyunların görünmesi için aşağıdaki komutu Administrator yetkisine sahip bir komut satırında çalıştırınız :


dism /online /enable-feature /featurename:InboxGames

Eğer daha sonra oyunları yine gizlemek isterseniz şu komutu kullanabilirsiniz :

dism /online /disable-feature /featurename:InboxGames

Ama yok ben bir bakayım başka neler kurulu değil bwnim windowsumda derseniz şu komutla kurulu ve kurulabilecek ek özellikleri görebilirsiniz:

DISM /Online /get-features   

| more (tilde more) komutuyla isterseniz sayfa sayfa göstertebilirsiniz tabi.

 Kaynak  : http://www.egeonline.com/index.php/isletimdizgeleri/windows7/180-windows-7-enterprise-ta-oyunlar-yok.html

Bu Makkale için  Teşekkürler İlyas Bey 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Windows 7

sqlite türkçe harf sıralaması, sqlite turkish collation

10. January 2010

Kullandığım projelerde ACCESS yerine SQLite kullanmayı uzun zamandır düşünüyordum. Fakat SQLite altında sorgu yaptığımda harfleri Türkçe sıralayamıyordu.

Bu sorunu çözmek için önce SQLite ve ICU bileşenlerini kendim derlemeyi denedim. Fakat C bilgim olmadığı için bu konuda başarılı olamadım.

Ardından yılmadım ve denemelerime devam ettim.

En sonunda bu adresteki kodu kullanarak sorunumu çözebildim.

Öncelikle Bir class oluşturuyoruz ve bu Class başlığına şı satırlaır ekliyoruz:

using System.Data.SQLite;
using System.Globalization;

Ardından Class ın kod alanına bu satırları ekliyoruz:

namespace SQLiteUTF8CIComparison
{
    ///
    /// This function adds case-insensitive sort feature to SQLite engine
    /// To initialize, use SQLiteFunction.RegisterFunction() before all connections are open
    ///
    [SQLiteFunction(FuncType = FunctionType.Collation, Name = "UTF8CI")]
    public class SQLiteCaseInsensitiveCollation : SQLiteFunction
    {
        ///
        /// CultureInfo for comparing strings in case insensitive manner
        ///
        private static readonly CultureInfo _cultureInfo = CultureInfo.CreateSpecificCulture("tr-TR");
        ///
        /// Does case-insensitive comparison using _cultureInfo
        ///
        /// Left string
        /// Right string
        /// The result of a comparison
        public override int Compare(string x, string y)
        {
            return string.Compare(x, y, _cultureInfo, CompareOptions.IgnoreCase);
        }
    }
}

Şimdi bu fonksiyonu kullanabilmemiz için programın başlangıcına şu satırları ekliyoruz:

Header kısmına :

using System.Data.SQLite;
using SQLiteUTF8CIComparison;

 Form Load Event'ına:

SQLiteFunction.RegisterFunction(typeof(SQLiteCaseInsensitiveCollation));

Eğer tabloları herhangi bir SQLite Yönetim programıyla oluşturduysanız Türkçe sıralama yine çalışmayacaktır.

Tabloları kendimiz program içinde oluşturmalıyız. SQL konusunda iyi değilseniz SQLite yönetim programlarını herhangi biriyle oluşturduğunuz tabloyu EXPORT ederek SQL kodlarını elde edebilirsiniz. 

Burada sıralama yapacağınız (ORDER BY) FIELD'ların oluşturma koduna COLLATE UTF8CI kelimelerini ekliyoruz:

CREATE TABLE `tablom` (
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
`adi` TEXT NULL COLLATE UTF8CI,
`soyadi` TEXT)

 Bundan sonra yapacağınız insert ve select sorgularında sıralama Türkçe oalcaktır.

Eğer 

No such collation: UTF8CI

şeklinde hata alırsanız select sorgusunun sonuna COLLATE BINARY kelimelerini ekleyin :

select * from tablom order by adi COLLATE BINARY

İyi kodlamalar.

Kaynak   : http://www.egeonline.com/index.php/yazilimgelistirme/c/179-sqlite-tuerkce-harf-sralamas-sqlite-turkish-collation.html

Bu Güzel Makkale için Teşekkürler İlyas Bey 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

SQL SERVER, SQLite ,

C# Toplu Mail Gönderme Programı

9. January 2010

Evet Arkadaşlar sziler için bir yararlı  uygulama daha  hazırladım  bu  uygulamada c#  kullanarak  kullanıcılara toplu  mail gönderme işlemi yapan bir program  hazırladım   örnek programın

bitmiş hali  daha gelişmiş  versiyonu    yazıyorum   tabiki biter bitmez blog  da yayınlanmış  oluçaktır 

i




Source Code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net.Mail;
using System.Net;

namespace ExpTopluMailProject
{
    public partial class frmtoplumial : Form
    {
        public frmtoplumial()
        {
            InitializeComponent();
        }

        private void btnyukle_Click(object sender, EventArgs e)
        {
            try
            {
                opfileDialog.ShowDialog();
                if (opfileDialog.FileName != "")
                {
                    lblMail.Items.Clear();
                    StreamReader srRead = new StreamReader(opfileDialog.FileName);

                    while (srRead.EndOfStream == false)
                    {
                        lblMail.Items.Add(srRead.ReadLine().ToString());
                    }
                    srRead.Close();
                }
            }

            catch (Exception ex)
            {

                MessageBox.Show("Hatalı Yükleme !\n\n" + ex.Message);
            }
        }

        private void btngonder_Click(object sender, EventArgs e)
        {


            try
            {
                SmtpClient MailSender = new SmtpClient(txtmailSunucusu.Text);
                MailSender.Credentials = new NetworkCredential(txtmailAdresi.Text, txtsifre.Text);
                MailMessage Mail = new MailMessage();
                Mail.Body = txtIcerik.Text; // Mesajınız
                Mail.IsBodyHtml = true; // Mail Formatı // Eğer Mailiniz Html Kodu içermeyecekse False olsun
                Mail.Subject = txtkonu.Text; // Mailinizin Konusu
                Mail.From = new MailAddress(txtmailAdresi.Text); // Gönderen Adresi
                for (int i = 0; i < lblMail.Items.Count; i++) // Gönderilecek Maillerin Yüklenmesi.
                {
                    Mail.To.Add(lblMail.Items[i].ToString());
                }
                MailSender.Send(Mail); // Mailin Gönderilmesi
                Temizle();

                lblMail.Items.Clear();
                MessageBox.Show("Tüm Mailler Başarı İle Gönderildi");
                txtmailSunucusu.Focus();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Hata Oluştu :\n\n" + ex.Message);
            }

        }
        //Tüm TextBox Temizle
        void Temizle()
        {
            txtmailSunucusu.Text = "";
            txtmailAdresi.Text = "";
            txtsifre.Text = "";
            txtIcerik.Text = "";
            txtkonu.Text = "";
        }
    }
}
 

Projenin  full    ExpTopluMailProject.rar (41,34 kb)

  Kaynak gelecekcoknet

Evet arkadaşlar örnek bir projein sonuna gelmiş olduk tekrar yeni bir projede görüşmek üzere herkeze iyi calışmalar 

Saygılarımla Orhan Türk 

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

C# , Tüm Projelerim

checkbox kullanarak liste öğeleri alın

7. January 2010

 

Merhaba arkadaşlar bu örnek projede console application  uygulamasında bir  windows projesi nasıl   calıştırılır onu  görelim

Örnek Proje

Console Application Code

 
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace console_test
{

    public class Form1 : System.Windows.Forms.Form
    {
        private System.Windows.Forms.CheckedListBox chkListPossibleValues;
        private System.Windows.Forms.ListBox lstSelected;
        private System.Windows.Forms.Button btnMove;
        private System.ComponentModel.Container components = null;

        public Form1()
        {
            InitializeComponent();
            this.chkListPossibleValues.Items.Add("Ten");
          
        }

        private void InitializeComponent()
        {
            this.lstSelected = new System.Windows.Forms.ListBox();
            this.btnMove = new System.Windows.Forms.Button();
            this.chkListPossibleValues = new System.Windows.Forms.CheckedListBox();
            this.SuspendLayout();

            this.lstSelected.Location = new System.Drawing.Point(232, 8);
            this.lstSelected.Name = "lstSelected";
            this.lstSelected.Size = new System.Drawing.Size(136, 186);
            this.lstSelected.TabIndex = 1;

            this.btnMove.Location = new System.Drawing.Point(152, 80);
            this.btnMove.Name = "btnMove";
            this.btnMove.TabIndex = 3;
            this.btnMove.Text = "Move";
            this.btnMove.Click += new System.EventHandler(this.btnMove_Click);

            this.chkListPossibleValues.CheckOnClick = true;
            this.chkListPossibleValues.Items.AddRange(new object[] {"One", "Two", "Three",
                  "Four", "Five","Six","Seven", "Eight", "Nine"});
            this.chkListPossibleValues.Location = new System.Drawing.Point(8, 8);
            this.chkListPossibleValues.Name = "chkListPossibleValues";
            this.chkListPossibleValues.Size = new System.Drawing.Size(136, 184);
            this.chkListPossibleValues.TabIndex = 0;

            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.ClientSize = new System.Drawing.Size(376, 205);
            this.Controls.AddRange(new System.Windows.Forms.Control[] {this.btnMove,
                                  this.lstSelected,  this.chkListPossibleValues});
            this.Name = "Form1";
            this.Text = "List Boxes";
            this.ResumeLayout(false);


 
        }

        static void Main()
        {
            Application.Run(new Form1());
            Console.WriteLine("Form  Devrede Dışı  ");
            Console.ReadLine();
        }

        private void btnMove_Click(object sender, System.EventArgs e)
        {
            if (this.chkListPossibleValues.CheckedItems.Count > 0)
            {
                this.lstSelected.Items.Clear();
                foreach (string item in this.chkListPossibleValues.CheckedItems)
                {
                    this.lstSelected.Items.Add(item.ToString());
                }
                for (int i = 0; i < this.chkListPossibleValues.Items.Count; i++)
                {
                    this.chkListPossibleValues.SetItemChecked(i, false);
                }
            }
        }
    }
}

  Kaynak Web Sitw : Java2s

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

C# , Console Application

C# İle Mobile Programlama

5. January 2010

Evet arkadaşlar sizler için bügün   birde Mobile Application  hazırladm  sadece başlangiç amaçlı bir örnek  yaptım 

 sizlerde visual studio nimetlerin den yararlanarak  böyle   başlıca projeler yaza bilirsiniz

Tabiki Unutmadan Microsoft Download Sayfasından Windows Mobile 6 Professional SDK Refresh indirmeyi unutmayalım   buda bir  bildiri.

 

 


Source Code :

using System;
using System.Windows.Forms;

namespace FirstMyDeviceProject
{
    public partial class Form1 : Form
    {

        public Form1()
        {
            InitializeComponent();

        }
        int _sayi1, _sayi2;
        double _sonuc;
        private void btnToplam_Click(object sender, EventArgs e)
        {
            if (chkTopla.Checked)
            {
                _sayi1 = Convert.ToInt32(txtsayi1.Text);
                _sayi2 = Convert.ToInt32(txtsayi2.Text);
                _sonuc = _sayi1 + _sayi2;
                lblSonuc.Text = _sonuc.ToString();
                Temiz();
            }
            else if (chkCarp.Checked)
            {
                _sayi1 = Convert.ToInt32(txtsayi1.Text);
                _sayi2 = Convert.ToInt32(txtsayi2.Text);
                _sonuc = _sayi1 * _sayi2;
                lblSonuc.Text = _sonuc.ToString();

                Temiz();
            }
            else if (chkcikart.Checked)
            {
                _sayi1 = Convert.ToInt32(txtsayi1.Text);
                _sayi2 = Convert.ToInt32(txtsayi2.Text);
                _sonuc = _sayi1 - _sayi2;
                lblSonuc.Text = _sonuc.ToString();
                Temiz();
            }
            else if (chkbol.Checked)
            {
                _sayi1 = Convert.ToInt32(txtsayi1.Text);
                _sayi2 = Convert.ToInt32(txtsayi2.Text);
                 _sonuc = _sayi1 / _sayi2;               

                  lblSonuc.Text = _sonuc.ToString();
                Temiz();
            }

        }

        void  Temiz()
        {
            txtsayi1.Text = "";
            txtsayi2.Text = "";
            txtsayi1.Focus();
        }
      
    }
}

Projenin Solution Kodu indir

Evet arkadaşlar örnek bir projenin sona gelmiş olduk  herkeze  iyi calışmalar kibk  

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

C# , Windows Mobile