Tepsile (interface)

CorsaiR

Emektar
27 Ara 2005
1,228
18
Çekirdekten
Tepsile (interface)
interface kullanımı ile ilgili// -----------------------------1.İŞLEM-----------------------------------
//C# Programından New Project->ClassLibrary seçin
//proje adını Tepsile.cs olarak değiştirin
//aşağıdaki kodu yapıştırın ve derleyin
//Tepsile.cs Arayüz(interface) kullanımı için bir örnektir.
//Bu kod derlendikten sonra Aşağıdaki işlemleri yapın
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Windows.Forms;

namespace Tepsile
{
public interface ITepsi
{
string NotifyIconText
{
get;
set;
}
bool NotifyIconVisible
{
get;
set;
}
string Notify_icon
{
get;
set;
}

ContextMenu menu
{
get;
set;
}

**** Tepsile();
}
public class Tepsi:ITepsi
{
private string _NotifyIconText;
private bool _NotifyIconVisible;
private string _Notify_icon;
private ContextMenu _menu;

private NotifyIcon notifyIcon;


public string NotifyIconText
{
get
{
return _NotifyIconText;
}
set
{
_NotifyIconText=value;
}
}

public bool NotifyIconVisible
{
get
{
return _NotifyIconVisible;
}
set
{
_NotifyIconVisible=value;
}
}

public string Notify_icon
{
get
{
return _Notify_icon;
}
set
{
_Notify_icon = value;
}
}

public ContextMenu menu
{
get
{
return _menu;
}
set
{
_menu = value;
}
}

public **** Tepsile()
{
notifyIcon = new NotifyIcon();
notifyIcon.Text = NotifyIconText;
notifyIcon.Visible = NotifyIconVisible;
notifyIcon.Icon = new Icon(Notify_icon);
notifyIcon.ContextMenu = menu;
}
}
}
//-------------------------------------------------------------------
//------------------------2.İŞLEM----------------------------------------------
//C# NewProject->WindowsApplicaiton seçin
//Reference->Tepsile.dll ekleyin(Reference sağ tıkla Add Reference den
//Karşınıza çıkan Pencereden Browse sekmesinden Tepsile.dll yi seçin)
//Proje ismine Test.cs yazın sonra aşağıdaki kodu yazın ve derleyin
//Form Açılacak program çalıştığında saatin yanında programın simgesi
//olacak sağ tıklarsanız "KAPAT" menüsünü göreceksiniz
//Oluşturduğunuz Windows Application için Debug Klasöründe\bin Klasörünün içinde
//Programın exe dosyasının yanına "icon1.ico" adlı bir simge dosyası eklemeyi
//unutmayın yoksa çalışmaz


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

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

private **** Form1_Load(object sender, EventArgs e)
{
ContextMenu men = new ContextMenu();
men.MenuItems.Add(0, new MenuItem("KAPAT", new System.EventHandler(k)));
Tepsile.Tepsi tepsi = new Tepsile.Tepsi();
tepsi.Notify_icon = "groups.ico";
tepsi.NotifyIconText = "caner..";
tepsi.NotifyIconVisible = true;
tepsi.menu = men;
tepsi.Tepsile();
}
**** k(object o, System.EventArgs e)
{
Close();
}
}
}


C# Tepsile

 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.