コード例 #1
0
        protected void ReportAcceptedShare()
        {
            int          shareID = -1;
            OpenCLDevice device  = null;

            try { mMutex.WaitOne(5000); } catch (Exception) { }
            if (mDevicesWithShare.Count > 0)
            {
                device = mDevicesWithShare[0];
                mDevicesWithShare.RemoveAt(0);
                shareID = mShareIDs[0];
                mShareIDs.RemoveAt(0);
            }
            try { mMutex.ReleaseMutex(); } catch (Exception) { }

            if (!MainForm.DevFeeMode)
            {
                device.IncrementAcceptedShares();
                MainForm.Instance.ReportAcceptedShare();
            }

            if (shareID >= 0 && !MainForm.DevFeeMode)
            {
                MainForm.Logger("Share #" + shareID + " accepted.");
            }
            else
            {
                MainForm.Logger("Share accepted.");
            }
        }
コード例 #2
0
 protected void ReportShareAcceptance()
 {
     if (MainForm.DevFeeMode)
     {
         return;
     }
     try { mMutex.WaitOne(5000); } catch (Exception) { }
     if (mDevicesWithShare.Count > 0)
     {
         OpenCLDevice device = mDevicesWithShare[0];
         mDevicesWithShare.RemoveAt(0);
         device.IncrementAcceptedShares();
     }
     try { mMutex.ReleaseMutex(); } catch (Exception) { }
 }