private void imgLamp2_MouseUp(object sender, MouseButtonEventArgs e)
{
if (isOpen)
{
imgLamp2.Source = new BitmapImage(new Uri("images/LampOff.png", UriKind.Relative));
isOpen = false;
}
else
{
imgLamp2.Source = new BitmapImage(new Uri("images/LampOn.png", UriKind.Relative));
isOpen = true;
}
}
這是wpf中一段程式 這個if(isopen)中isopen有什么用?
imgLamp2.Source = new BitmapImage(new Uri("images/LampOn.png", UriKind.Relative));
還有大佬能不能說明一下上面這一行程式各個段的意思 ? 謝謝了!
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/284295.html
標籤:C#
上一篇:ps的輔助工具
下一篇:Linq如何動態查詢指定的欄位
