Results 1 to 6 of 6

Thread: an error...hmm

Threaded View

  1. #1

    Thread Starter
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729

    an error...hmm

    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);
            } 

    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 widthOfPicturesint 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 numberOfPicturesint widthOfPicturesint 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));
            }
        } 
    error:
    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
    Last edited by PT Exorcist; Nov 23rd, 2002 at 04:13 PM.
    \m/\m/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width