error line(the second line)
PHP Code:devFunctions dFunction = new devFunctions();
dFunction.receivedData += new LiNG_BiNG.Classes.devFunctions.receivedWebData(receivedPicture);
PHP Code:private void receivedPicture(byte[] data)
{
MemoryStream mS = new MemoryStream(data);
this.Image = Image.FromStream(mS);
}
error:PHP Code:public class devFunctions
{
/// <summary>
/// Gets the max number of Columns a devTab can get without spacing between pictures
/// </summary>
/// <param name="widthOfPictures">The size in pixels of the picture</param>
/// <param name="widthOfTab">The size in pixels of the devTab</param>
public static int getNumberOfColumns(int widthOfPictures, int widthOfTab)
{
double res = (double)widthOfTab / (double)(widthOfPictures);
return (int)Math.Floor(res);
}
/// <summary>
/// Gets the width in Pixels of each one of the borders of a devTab
/// </summary>
/// <param name="numberOfPictures">Number of pictures being populated into the devTab</param>
/// <param name="widthOfPictures">Width in pixels of the pictures being used</param>
/// <param name="widthOfTab">Width in pixels of the devTab being used</param>
public static int getSizeOfBorders(int numberOfPictures, int widthOfPictures, int widthOfTab)
{
int res = numberOfPictures * widthOfPictures;
return (widthOfTab - res) / 2;
}
/// <summary>
/// Delegate for receiving data through downloadData() function
/// </summary>
public delegate void receivedWebData(byte[] data);
/// <summary>
/// Event that fires when web data is received from downloadData() function
/// </summary>
public event receivedWebData receivedData;
public string downloadURL;
/// <summary>
/// Downloads an text or binary file from the internet
/// </summary>
/// <param name="url">The url of the file to be downloaded</param>
public void downloadData(string url)
{
try
{
downloadURL = url;
System.Threading.Thread thread =
new Thread(new System.Threading.ThreadStart(downloaddata));
}
catch (Exception e)
{
string err = "There was an error while creating a new thread\n" + e.Message;
throw (new Exception(err));
}
}
private void downloaddata()
{
WebClient web = new WebClient();
receivedData(web.DownloadData(downloadURL));
}
}
C:\Documents and Settings\JBRANCO\My Documents\Visual Studio Projects\LiNG BiNG\Classes\devButton.cs(95): Cannot access a nonstatic member of outer type 'LiNG_BiNG.Classes.devButton' via nested type 'LiNG_BiNG.Classes.devButton.devButtonOptions'
i am not getting the problem here..any help![]()




Reply With Quote