2012-07-23 15 views
0

有兩個網站;用戶(android)和服務器(c#)使用後面的代碼更改新圖像,c#和bitmapImage無法找到

程序需要接收用戶點擊的圖像。這些圖像(image1)將更改爲新的圖像(圖像2)在android中同樣到服務器。

我所做的是:

1- split the data 
2- check if the images gets a new ID number (new ID number refer to changes been made) 
3- change the old image with the new image 

代碼:

if (berjaya[23].Equals(70)) 
{ 
    //code where the old image is changed 
    pictureBox1.Image = new BitmapImage(new Uri(@"\\HospitalIcon\\images\\a3_01.gif")); 
} 

不幸的是,我竟然不知道如何使用代碼隱藏換一個新形象。我正在使用C#。新的BitmapImage說無法找到。有什麼我遺漏了嗎?

+0

WPF或Winforms? – 2012-07-23 05:40:56

回答

0

放置:

using System.Windows.Media.Imaging;

以上的命名空間:)

相關問題