|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using System.IO;
namespace SifreKontrol
{
public partial class UserControl1 : UserControl,Popup.IPopupUserControl
{
public UserControl1()
{
InitializeComponent();
icon = button13.ButtonIcon;//ana icon değerini tutacak
}
bool yon = false;//varsayılan değeri false yani seçili değil
Icon icon;
#region IPopupUserControl Members
public bool AcceptPopupClosing()
{
if (yon == true)
return false;
else
{
return true;
}
}
#endregion
private void button13_Click(object sender, EventArgs e)
{
if (yon == true)
{
button13.ButtonIcon = icon;
yon = false;
}
else
{
System.Reflection.Assembly program = System.Reflection.Assembly.GetExecutingAssembly();
Stream dosya = program.GetManifestResourceStream("SifreKontrol.Resources.305.ico");
Icon resim = new Icon(dosya);
dosya.Close();
button13.ButtonIcon = resim;
yon = true;
dosya.Dispose();
resim.Dispose();
}
}
private void button12_Click(object sender, EventArgs e)
{
button13.ButtonIcon = icon;
yon = false;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Since 1998...
MCPD - Enterprise Application Developer
“Hesaplı hareket ettiğini zanneden ve onunla iftihar eyliyen dar kafalar; kurtulmağa, yükselmeğe elverişli hiç bir eser vücüda getirmezler. Kurtuluş ve yükselişi, ancak varlığına dayanan ve mülkü milletin gizli kapalı hazinelerini verimli hale getirmesini bilen, şahsi menfaatini millet menfaati uğruna feda eden, ruhu idealist, dimağı realist şahsiyetlerde aramalıdır.”
Nuri Demirağ, 1947