All pastes #2109995 Raw Edit

Someone

public text v1 · immutable
#2109995 ·published 2012-02-05 20:55 UTC
rendered paste body
set
            {   //Lock to ensure full values is set or returned
                lock (this)     //This value is always locked while the thread is live?
                {
                    //Needs to check if the value has changed much - i.e. draughts etc
                    //if (value > 0)
                    {
                        m_scales = value;
                        //This needs invoke incase called from another thread!!
                        if(this.InvokeRequired)    //*** Needs testing!!
                            this.Invoke(new EventHandler(setScalesWeight));
                        else
                            setScalesWeight(new object(), new EventArgs());
                    }
                }