Müzik Çalar (Winamp) Programı — Csharp
Soru :
Müzik Oynatıcı programının csharp windows forms application kodlarını yazınız.
Örnek : Winamp,Windows Medaia Player

[code lang=”csharp”]
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.Runtime.InteropServices;
using System.IO;
using System.Data.OleDb;
namespace CsLite_Player
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
#region "Gerekli Değişkenler
public static string parcaadi;
public static string sirasi;
OleDbConnection cn=new OleDbConnection ("Provider=Microsoft.Jet.Oledb.4.0;Data Source=Mp3.mdb");
OleDbDataReader vericek;
[DllImport("kernel32.dll", SetLastError = true)]
static extern void Sleep(int dwMilliseconds);
MP3Header mp3hdr = new MP3Header();
private Point mouseOffset;
private bool isMouseDown = false;
string dosyaad;
string duzgunad;
int sure;
Form2 frm = new Form2();
int secilen;
//int y = 0;
bool tekrarlandi = false;
bool durum=false ;
//bool gerisayim = false;
bool karisik = false;
bool tekrar = false;
int kacta = 0;
int sayac = 0;
int liste;
List<string> calmalistesi = new List<string>();
Random rnd = new Random();
[DllImport("winmm.dll")]
private static extern int mciSendString(string strCommand, StringBuilder strReturn, int iReturnLength, IntPtr hwndCallback); public string Pcommand; public bool isOpen;
StringBuilder mssg = new StringBuilder(255);
bool parcabitti = false;
int secili;
#endregion
#region "Methodlarım"
private void dskonum()
{
if (durum == true)
{
MessageBox.Show(oynatici.Ctlcontrols.currentItem.sourceURL.ToString(), "Dosya Konumu", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void veritabaninayaz()
{
DataSet ds = new DataSet();
OleDbDataAdapter ad = new OleDbDataAdapter("delete * from DosyaAdinaGoreSirala where dosyano>=0", "Provider=Microsoft.Jet.Oledb.4.0;Data Source=Mp3.mdb");
ad.Fill(ds);
cn.Open();
for (int i = 0; i <= listBox1.Items.Count – 1; i++)
{
OleDbCommand cmd = new OleDbCommand("insert into DosyaAdinaGoreSirala(dosyano,dosyaad,dosyayol)values" + "(" + i + ",’" + listBox1.Items[i].ToString() + "’,’" + listBox2.Items[i].ToString() + "’)", cn);
cmd.ExecuteNonQuery();
} cn.Close();
}
private void adagoresirala()
{
cn.Open();
listBox1.Items.Clear();
listBox2.Items.Clear();
OleDbCommand cmd = new OleDbCommand("select * from DosyaAdinaGoreSirala order by dosyaad", cn);
vericek = cmd.ExecuteReader();
while (vericek.Read())
{ listBox1.Items.Add(vericek["dosyaad"].ToString()); listBox2.Items.Add(vericek["dosyayol"].ToString()); }
cn.Close();
}
private void adresegoresirala()
{
cn.Open();
listBox1.Items.Clear();
listBox2.Items.Clear();
OleDbCommand cmd = new OleDbCommand("select * from DosyaAdinaGoreSirala order by dosyayol", cn);
vericek = cmd.ExecuteReader();
while (vericek.Read())
{ listBox1.Items.Add(vericek["dosyaad"].ToString()); listBox2.Items.Add(vericek["dosyayol"].ToString()); }
cn.Close();
}
private void listekaydet()
{
if (listBox1.Items.Count > 0)
{
StreamWriter file = new StreamWriter("Playlist.m3u");
for (int i = 0; i <= listBox1.Items.Count – 1; i++)
{
file.WriteLine(listBox1.Items[i].ToString());
}
file.WriteLine("——Dosya Adresleri——");
for (int i = 0; i <= listBox1.Items.Count – 1; i++)
{
file.WriteLine(listBox2.Items[i].ToString());
}
file.Close();
}
}
private void listeac()
{ try{
listebul.InitialDirectory = Application.StartupPath ;
listebul.Title = "Mp3 Çalma Listesi Seçiniz";
listebul.Multiselect = false;
listebul.ShowDialog();
StreamReader file = new StreamReader( listebul.SafeFileName.ToString());
listBox1.Items.Clear();
listBox2.Items.Clear();
string str = file.ReadLine();
if (listebul.SafeFileName == "Playlist.m3u")
{
while (str != null)
{
listBox1.Items.Add(str);
str = file.ReadLine();
if (str == "——Dosya Adresleri——")
{
while (str != null)
{
str = file.ReadLine();
listBox2.Items.Add(str);
}
}
}
}
else
{ MessageBox.Show("Hatalı Dosya Seçtiniz", "Uyarı", MessageBoxButtons.OK, MessageBoxIcon.Error); }
kacta = listBox1.Items.Count;
listBox1.SelectedIndex = 0;
}catch { }
}
private void dosyaac(ListBox list)
{
kacta = listBox1.Items.Count;
int s = kacta;
try
{
listebul.Reset();
listebul.Title = "Müzik Dosyası Ara";
listebul.Multiselect = true;
listebul.ShowDialog();
liste = listebul.SafeFileNames.Count();
for (sayac=0; sayac <= liste – 1; sayac++)
{
s++;
calmalistesi.Add(listebul.FileNames[sayac]);
listBox2.Items.Add(listebul.FileNames[sayac]);
dosyaad = listebul.SafeFileNames[sayac];
//y++;
dosyaad = dosyaad.ToLower();
string bslngc = "";
string snc = ".mp3";
int basla = dosyaad.IndexOf(bslngc) + bslngc.Length;
int bitis = dosyaad.IndexOf(snc, basla);
duzgunad = dosyaad.Substring(basla, bitis – basla);
bool boolIsMP3 = mp3hdr.ReadMP3Information(listebul.FileNames[sayac]);
if (boolIsMP3)
{
list.Items.Add(Convert.ToString(s) + ". " + duzgunad + " " + mp3hdr.strLengthFormatted.ToString());
}
list.SelectedIndex = 0;
bool tru = mp3hdr.ReadMP3Information(calmalistesi[list.SelectedIndex]);
if (tru)
{
sure = Convert.ToInt32(mp3hdr.intLength);
}
CalmaDurumu.Maximum = sure;
CalmaDurumu.Value = 0;
}
}
catch { }
}
private void dsbilgisi()
{
if (durum == true)
{
MessageBox.Show("Dosya Adı :" + "-" + oynatici.Ctlcontrols.currentItem.name.ToString() + "***" + "Süresi :" + "-" + oynatici.Ctlcontrols.currentItem.durationString.ToString()+"***" + "Dosya Yolu :" + "-" + oynatici.Ctlcontrols.currentItem.sourceURL.ToString(), "Dosya Bilgisi", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void sonrakiparca()
{
label2.Text = "00:00"; try
{ //Karışık Kapalı Durumunda Çalınacak Parça
if (karisik == false)
{
if (tekrar != true)//Tekrar Kapalı Durumunda Çalınacak Parça
{
if (listBox1.SelectedIndex != listBox1.Items.Count – 1)
{
listBox1.SetSelected(listBox1.SelectedIndex + 1, true);
}
else
{
listBox1.SetSelected(0, true);
}
}
else
{
if (tekrarlandi == true)
{
listBox1.SetSelected(listBox1.SelectedIndex+1, true);
tekrarlandi = false;
}
else
{
listBox1.SetSelected(listBox1.SelectedIndex, true);
tekrarlandi = true;
}
}
}
//Karışık Açık Durumunda Çalınacak Parça
else
{
if (tekrar != true)
{
if (listBox1.SelectedIndex != listBox1.Items.Count – 1)
{
listBox1.SetSelected(rnd.Next(0,listBox1.Items.Count-1), true);
}
else
{
listBox1.SetSelected(0, true);
}
}
else
{
if (tekrarlandi == true )
{
listBox1.SetSelected(rnd.Next(0, listBox1.Items.Count – 1), true);
tekrarlandi =false ;
}
else
{ listBox1.SetSelected(listBox1.SelectedIndex, true);
tekrarlandi = true ;}
}
}
}
catch { }
}
private void oncekiparca()
{
try
{
if (karisik == false) //www.gorselprogramlama.com
{
if (tekrar != true)
{
if (listBox1.SelectedIndex != 0)
{
listBox1.SetSelected(listBox1.SelectedIndex – 1, true);
}
else
{
listBox1.SetSelected(listBox1.Items.Count – 1, true);
}
}
else
{ listBox1.SetSelected(listBox1.SelectedIndex, true); }
}
else
{
listBox1.SetSelected(rnd.Next(0, listBox1.Items.Count – 1), true);
}
}
catch { }
}
public void playmusic()
{
try
{
parcabitti = false;
oynatici.Ctlcontrols.stop();
durum = true;
secilen = listBox1.SelectedIndex;
oynatici.URL = listBox2.Items[secilen].ToString();
oynatici.Ctlcontrols.play();
frm.timer1.Enabled = true; frm.Show();
}
catch { }
}
#endregion
#region "Form Elemanları"
private void timer1_Tick(object sender, EventArgs e)
{
try
{
if ( durum==true )
{//www.gorselprogramlama.com
if (label2.Text == "00:00")
{ parcaadi = calinan.Text; sirasi = ((Convert.ToInt32(listBox1.SelectedIndex))+1).ToString() + "/" + listBox1.Items.Count.ToString();
CalmaDurumu.Maximum = Convert.ToInt32(oynatici.Ctlcontrols.currentItem.duration); //CalmaDurumu.Maximum = Convert.ToInt32(oynatici.Ctlcontrols.currentItem.duration.ToString());
}
CalmaDurumu.Value = Convert.ToInt32(oynatici.Ctlcontrols.currentPosition);
label2.Text = oynatici.Ctlcontrols.currentPositionString.ToString();
}
if (label2.Text == oynatici.Ctlcontrols.currentItem.durationString.ToString ())
{ parcabitti = true; }
}
catch { }
if (label2.Text=="00:00" )
{
oynaticibilgisial();
} calinan.Text = calinan.Text.Substring(1) + calinan.Text.Substring(0, 1);
if (parcabitti == true)
{
sonrakiparca(); playmusic();//www.gorselprogramlama.com
}
}
private void button5_Click(object sender, EventArgs e)
{
oncekiparca(); if (durum == true)
{
playmusic();
}
}
private void button1_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void trackBar1_Scroll(object sender, EventArgs e)
{
oynatici.Ctlcontrols.currentPosition = CalmaDurumu.Value;
}
private void Volume_Scroll(object sender, EventArgs e)
{
oynatici.settings.volume = Volume.Value;
vlmdgr.Text = "%" + " " + oynatici.settings.volume.ToString();
}
private void saniyeİleriToolStripMenuItem_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.currentPosition = Convert.ToInt32(oynatici.Ctlcontrols.currentPosition) + 10;
}
private void sesiYükseltToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Convert.ToInt32(oynatici.settings.volume) != 100)
{
oynatici.settings.volume++; vlmdgr.Text = "%" + " " + oynatici.settings.volume.ToString();
}
}
private void sesiAzaltToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Convert.ToInt32(oynatici.settings.volume) != 0)
{
oynatici.settings.volume–; vlmdgr.Text = "%" + " " + oynatici.settings.volume.ToString();
}
}
private void button3_Click(object sender, EventArgs e)
{
if (calmalistesipaneli.Visible == true)
{
this.Height = 200;
calmalistesipaneli.Visible = false;
}
else
{
calmalistesipaneli.Visible = true;
this.Height = 588;
}
}
private void açToolStripMenuItem_Click(object sender, EventArgs e)
{
dosyaac(listBox1);
}
private void button6_Click(object sender, EventArgs e)
{
if (button7.Text == "Devam Et") { oynatici.Ctlcontrols.play(); button7.Text = "Duraklat"; }
else
{
playmusic();
}
}
private void oynaticibilgisial()
{
try
{
calinan.Text = oynatici.Ctlcontrols.currentItem.name.ToString() + "(" + oynatici.Ctlcontrols.currentItem.durationString.ToString() + ")";
}
catch { }
}
private void button9_Click(object sender, EventArgs e)
{
sonrakiparca();
if (durum == true)
{
playmusic();
}
}
private void button7_Click(object sender, EventArgs e)
{
if (durum == true)
{
if (button7.Text == "Duraklat")
{
oynatici.Ctlcontrols.pause();
button7.Text = "Devam Et";
}
else
{
oynatici.Ctlcontrols.play()
;
button7.Text = "Duraklat";
}
}
}
private void button8_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.stop();
}
private void toolStripMenuItem7_Click(object sender, EventArgs e)
{
sonrakiparca();
}
private void karışıkToolStripMenuItem_Click(object sender, EventArgs e)
{
if (karışıkToolStripMenuItem.CheckState == CheckState.Unchecked)
{
label9.ForeColor = Color.White;
karışıkToolStripMenuItem.CheckState = CheckState.Checked;
karisik = true;//www.gorselprogramlama.com
}
else
{
label9.ForeColor = Color.Gray;
karışıkToolStripMenuItem.CheckState = CheckState.Unchecked;
karisik = false;
}
}
private void tekrarlaToolStripMenuItem_Click(object sender, EventArgs e)
{
if (tekrarlaToolStripMenuItem.CheckState == CheckState.Unchecked)
{
label10.ForeColor = Color.White;
tekrarlaToolStripMenuItem.CheckState = CheckState.Checked;
tekrar = true;
}
else
{
label10.ForeColor = Color.Gray;
tekrarlaToolStripMenuItem.CheckState = CheckState.Unchecked;
tekrar = false;
}
}
private void toolStripMenuItem3_Click(object sender, EventArgs e)
{
oncekiparca();
}
private void toolStripMenuItem4_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.play();
}
private void toolStripMenuItem5_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.pause();
}
private void toolStripMenuItem6_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.stop();
}
private void saniyeGeriToolStripMenuItem_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.currentPosition = Convert.ToInt32(oynatici.Ctlcontrols.currentPosition) – 10;
}
private void çalmaListesiKaydetToolStripMenuItem_Click(object sender, EventArgs e)
{
if (listBox1.Items.Count != 0)
listekaydet();
}
private void çalmaListesiAçToolStripMenuItem_Click(object sender, EventArgs e)
{
listeac();//www.gorselprogramlama.com
}
private void listBox1_KeyDown(object sender, KeyEventArgs e)
{
try
{
char key = (char)e.KeyCode;
int sc = listBox1.SelectedIndex;
if (key == (char)Keys.Delete)
{
listBox1.Items.RemoveAt(listBox1.SelectedIndex);
listBox2.Items.RemoveAt(listBox1.SelectedIndex);
}
if (listBox1.Items.Count<=0)
{
listBox1.SetSelected(0,true) ;
}
else
{ listBox1.SetSelected(sc +1 , true); }
}
catch { }
}
private void listBox1_DoubleClick(object sender, EventArgs e)
{
playmusic();
}
private void oynatici_DoubleClickEvent(object sender, AxWMPLib._WMPOCXEvents_DoubleClickEvent e)
{
if (oynatici.windowlessVideo == true)
{
oynatici.windowlessVideo = false;
}
else
{
oynatici.windowlessVideo = true;
}
}
private void oynatici_StatusChange(object sender, EventArgs e)
{
CalmaDurumu.Maximum = Convert.ToInt32(oynatici.Ctlcontrols.currentItem.durationString.ToString());
}
private void label1_MouseMove(object sender, MouseEventArgs e)
{
if (isMouseDown)
{
Point mousePos = Control.MousePosition;//www.gorselprogramlama.com
mousePos.Offset(mouseOffset.X, mouseOffset.Y);
Location = mousePos;
}
}
private void label1_MouseDown(object sender, MouseEventArgs e)
{
int xOffset;
int yOffset;
if
(e.Button == MouseButtons.Left)
{
xOffset = -e.X – SystemInformation.FrameBorderSize.Width;
yOffset = -e.Y – SystemInformation.CaptionHeight –
SystemInformation.FrameBorderSize.Height;
mouseOffset = new Point(xOffset, yOffset);
isMouseDown = true;
}
}
private void label1_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
isMouseDown = false;
}
}
private void label1_MouseHover(object sender, EventArgs e)
{
label1.ForeColor = Color.PaleTurquoise;
}
private void label1_MouseLeave(object sender, EventArgs e)
{
label1.ForeColor = Color.White;
}
private void toolStripMenuItem12_Click(object sender, EventArgs e)
{
if (toolStripMenuItem12.Checked)
{
toolStripMenuItem12.CheckState = CheckState.Unchecked;
this.TopMost = false;
}
else
{
toolStripMenuItem12.CheckState = CheckState.Checked;
this.TopMost = true;//www.gorselprogramlama.com
}
}
private void label9_Click(object sender, EventArgs e)
{
if (label9.ForeColor == Color.Gray)
{
label9.ForeColor = Color.White;
karisik = true;
}
else
{
label9.ForeColor = Color.Gray;
karisik = false;
}
}
private void label10_Click(object sender, EventArgs e)
{
if (label10.ForeColor == Color.Gray)
{
label10.ForeColor = Color.White;
tekrar = true;
}
else
{
label10.ForeColor = Color.Gray;
tekrar = false;//www.gorselprogramlama.com
}
}
private void toolStripMenuItem65_Click(object sender, EventArgs e)
{
try
{
if (toolStripMenuItem65.CheckState == CheckState.Unchecked)
{
toolStripMenuItem65.CheckState = CheckState.Checked;
listBox1.SelectionMode = SelectionMode.MultiExtended;
for (int i = 0
; i <= listBox1.Items.Count – 1; i++)
{
listBox1.SetSelected(i, true);
}
}
else
{
listBox1.SelectionMode = SelectionMode.One;
listBox1.SetSelected(0, true);
toolStripMenuItem65.CheckState = CheckState.Unchecked;
}
}
catch { }
}
private void toolStripMenuItem66_Click(object sender, EventArgs e)
{
try
{
///////////////////////////////////////////////////////
}
catch { }
}
private void toolStripMenuItem69_Click(object sender, EventArgs e)
{
try
{
for (int i = 0; i <= listBox1.Items.Count – 1; i++)
{
listBox1.Items.Remove(listBox1.SelectedItems[i]);
}
for (int j = 0; j <= listBox1.Items.Count – 1; j++)
{
if (listBox1.GetSelected(j) == true)
{
secili = listBox2.SelectedIndex;
}
listBox2.Items.Remove(listBox2.Items[Convert.ToInt32(secili)]);
}
}
catch { }
}
private void toolStripMenuItem68_Click(object sender, EventArgs e)
{
try
{
listBox1.SelectionMode = SelectionMode.One;
listBox2.SetSelected(listBox1.SelectedIndex, false);
}
catch { }
}
private void toolStripMenuItem67_Click(object sender, EventArgs e)
{
try { for (int i = 0; i <= listBox1.Items.Count; i++) { if (listBox1.GetSelected(i) == true) { listBox1.SetSelected(i, false); } else { listBox1.SetSelected(i, true); } } }
catch { }
}
private void toolStripMenuItem77_Click(object sender, EventArgs e)
{
if (listBox1.Items.Count <= 0)//www.gorselprogramlama.com
{ MessageBox.Show("Çalma Listesi Boş", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
else
{
veritabaninayaz(); adagoresirala();
}
}
private void toolStripMenuItem79_Click(object sender, EventArgs e)
{
if (listBox1.Items.Count <= 0)
{ MessageBox.Show("Çalma Listesi Boş", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
else
{
veritabaninayaz(); adresegoresirala();
}
}
private void toolStripMenuItem50_Click(object sender, EventArgs e)
{
listBox1.Items.Clear(); listBox2.Items.Clear();
}
private void toolStripMenuItem51_Click(object sender, EventArgs e)
{
listeac();
}
private void toolStripMenuItem55_Click(object sender, EventArgs e)
{
dosyaac(listBox1);
}
private void çalmaListesiniKaydetToolStripMenuItem_Click(object sender, EventArgs e)
{
listekaydet();
}
private void dosyaBilgisiToolStripMenuItem_Click(object sender, EventArgs e)
{
dsbilgisi();
}
private void dosyaToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
dosyaac(listBox1); listBox1.SetSelected(listBox1.Items.Count – 1, true); playmusic();
}
catch { }
}
private void toolStripMenuItem31_Click(object sender, EventArgs e)
{
dsbilgisi();
}
private void toolStripMenuItem33_Click(object sender, EventArgs e)
{
if (calmalistesipaneli.Visible == true)
{
this.Height = 200;
calmalistesipaneli.Visible = false;//www.gorselprogramlama.com
}
else
{
calmalistesipaneli.Visible = true;
this.Height = 588;
}
}
private void herZamanÜstteToolStripMenuItem_Click(object sender, EventArgs e)
{
if (herZamanÜstteToolStripMenuItem.Checked)
{
herZamanÜstteToolStripMenuItem.CheckState = CheckState.Unchecked;
this.TopMost = false;
}
else
{
herZamanÜstteToolStripMenuItem.CheckState = CheckState.Checked;
this.TopMost = true;
}
}
private void karışıkToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (karışıkToolStripMenuItem1.CheckState == CheckState.Unchecked)
{
label9.ForeColor = Color.White;
karışıkToolStripMenuItem1.CheckState = CheckState.Checked;
karisik = true;
}
else
{
label9.ForeColor = Color.Gray;
karışıkToolStripMenuItem1.CheckState = CheckState.Unchecked;
karisik = false;
}
}
private void tekrarlaToolStripMenuItem1_Click(object sender, EventArgs e)
{
if (tekrarlaToolStripMenuItem.CheckState == CheckState.Unchecked)
{
label10.ForeColor = Color.White;
tekrarlaToolStripMenuItem1.CheckState = CheckState.Checked;
tekrar = true;
}
else
{
label10.ForeColor = Color.Gray;//www.gorselprogramlama.com
tekrarlaToolStripMenuItem1.CheckState = CheckState.Unchecked;
tekrar = false;
}
}
private void öncekiToolStripMenuItem_Click(object sender, EventArgs e)
{
oncekiparca(); playmusic();
}
private void oynatToolStripMenuItem_Click(object sender, EventArgs e)
{
playmusic();
}
private void duraklatToolStripMenuItem_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.pause();
}
private void durdurToolStripMenuItem_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.stop();
}
private void sonrakiToolStripMenuItem_Click(object sender, EventArgs e)
{
sonrakiparca(); playmusic();
}
private void saniyeGeriToolStripMenuItem1_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.currentPosition = Convert.ToInt32(oynatici.Ctlcontrols.currentPosition) – 10;
}
private void saniyeİleriToolStripMenuItem1_Click(object sender, EventArgs e)
{
oynatici.Ctlcontrols.currentPosition = Convert.ToInt32(oynatici.Ctlcontrols.currentPosition) + 10;
}
private void listeBaşıToolStripMenuItem_Click(object sender, EventArgs e)
{
try { listBox1.SetSelected(0, true); playmusic(); }
catch { }
}
private void listeSonuToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
listBox1.SetSelected(listBox1.Items.Count – 1, true); playmusic();
}
catch { }
}
private void toolStripMenuItem34_Click(object sender, EventArgs e)
{
this.Opacity = 100 / 100;
}
private void toolStripMenuItem35_Click(object sender, EventArgs e)
{
this.Opacity = 0.75;
}
private void toolStripMenuItem36_Click(object sender, EventArgs e)
{
this.Opacity = 0.5;//www.gorselprogramlama.com
}
private void toolStripMenuItem37_Click(object sender, EventArgs e)
{
this.Opacity = 0.25;
}
private void toolStripMenuItem38_Click(object sender, EventArgs e)
{
this.Opacity = 0.1;
}
private void label12_MouseHover(object sender, EventArgs e)
{
label12.ForeColor = Color.PaleTurquoise;
}
private void label12_MouseLeave(object sender, EventArgs e)
{
label12.ForeColor = Color.White;
}
private void toolStripMenuItem49_Click(object sender, EventArgs e)
{
try
{
for (int i = 0; i <= listBox1.Items.Count – 1
; i++)
{
if (listBox1.GetSelected(i) != true)
{ listBox1.Items.Remove(listBox1.Items[i]); listBox2.Items.Remove(listBox2.Items[i]); }
}
}
catch { }
}
private void toolStripMenuItem54_Click(object sender, EventArgs e)
{
listBox1.Items.Clear(); listBox2.Items.Clear();
}
private void toolStripMenuItem53_Click(object sender, EventArgs e)
{
try { listBox2.Items.RemoveAt(listBox1.SelectedIndex); listBox1.Items.RemoveAt(listBox1.SelectedIndex); }
catch { }
}
private void toolStripMenuItem18_Click(object sender, EventArgs e)
{
dosyaac(listBox1);
}
private void toolStripMenuItem58_Click(object sender, EventArgs e)
{
try
{
if (toolStripMenuItem58.CheckState == CheckState.Unchecked)
{
toolStripMenuItem58.CheckState = CheckState.Checked;
listBox1.SelectionMode = SelectionMode.MultiExtended;
for (int i = 0
; i <= listBox1.Items.Count – 1; i++)
{
listBox1.SetSelected(i, true);
}
}
else
{
listBox1.SelectionMode = SelectionMode.One;
listBox1.SetSelected(0, true);
toolStripMenuItem58.CheckState = CheckState.Unchecked;
}
}
catch { }
}
private void toolStripMenuItem60_Click(object sender, EventArgs e)
{
try { for (int i = 0; i <= listBox1.Items.Count; i++) { if (listBox1.GetSelected(i) == true) { listBox1.SetSelected(i, false); } else { listBox1.SetSelected(i, true); } } }
catch { }
}
private void toolStripMenuItem59_Click(object sender, EventArgs e)
{
try
{
listBox1.SelectionMode = SelectionMode.One;
listBox2.SetSelected(listBox1.SelectedIndex, false);//www.gorselprogramlama.com
}
catch { }
}
private void dosyaBilgisiToolStripMenuItem1_Click(object sender, EventArgs e)
{
dsbilgisi();
}
private void dosyaKonumuToolStripMenuItem_Click(object sender, EventArgs e)
{
dskonum();
}
private void sıralaToolStripMenuItem_Click(object sender, EventArgs e)
{
if (listBox1.Items.Count <= 0)
{ MessageBox.Show("Çalma Listesi Boş", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
else
{
veritabaninayaz(); adagoresirala();
}
}
private void dosyaYolunaGöreListeleToolStripMenuItem_Click(object sender, EventArgs e)
{
if (listBox1.Items.Count <= 0)
{ MessageBox.Show("Çalma Listesi Boş", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
else
{
veritabaninayaz(); adresegoresirala();
}
}
private void toolStripMenuItem42_Click(object sender, EventArgs e)
{
listeac();
}
private void toolStripMenuItem43_Click(object sender, EventArgs e)
{
listekaydet();
}
private void toolStripMenuItem44_Click(object sender, EventArgs e)
{
listBox1.Items.Clear(); listBox2.Items.Clear();
}
#endregion
private void toolStripMenuItem47_Click(object sender, EventArgs e)
{
MessageBox.Show("Kullanım Kılavuzunu Okuyunuz.", "Yardım", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
private void toolStripMenuItem48_Click(object sender, EventArgs e)
{
MessageBox.Show("Telif Hakkı(c).2011-2012 Nullsoft, Inc.\n\rv1.0 – 07 Temmuz 2011\n\rGöksel Sağır Tarafından Yapılmıştır.", "Hakkında", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
private void toolStripMenuItem16_Click(object sender, EventArgs e)
{
MessageBox.Show("Kullanım Kılavuzunu Okuyunuz.", "Yardım", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
private void toolStripMenuItem17_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
}
private void menuStrip4_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
}
private void Form1_Load(object sender, EventArgs e)
{
//try { listeac(); }
//catch { }
}
private void Fors_Paint(object sender, PaintEventArgs e)
{
}
private void timer2_Tick(object sender, EventArgs e)
{if (durum==true)
timer1.Start();
}
private void timer2_Tick_1(object sender, EventArgs e)
{
}
private void button9_MouseHover(object sender, EventArgs e)
{
(sender as Button).BackColor = Color.Orange;
}
private void button9_MouseLeave(object sender, EventArgs e)
{
(sender as Button).BackColor = Color.PaleTurquoise;//www.gorselprogramlama.com
}
private void button2_Click(object sender, EventArgs e)
{
}
private void oynatici_Enter(object sender, EventArgs e)
{
}
private void button2_Click_1(object sender, EventArgs e)
{
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
}
private void button4_Click(object sender, EventArgs e)
{
}
}
}
[/code]
