EpgTimer.TunerReserveMainView.GetReserveItem C# (CSharp) Method

GetReserveItem() private method

マウス位置から予約情報を取得する
private GetReserveItem ( Point cursorPos, EpgTimer.ReserveData &reserve ) : bool
cursorPos Point [IN]マウス位置
reserve EpgTimer.ReserveData [OUT]予約情報
return bool
        private bool GetReserveItem(Point cursorPos, ref ReserveData reserve)
        {
            try
            {
                if (timeList.Count > 0)
                {
                    int timeIndex = (int)Math.Floor(cursorPos.Y / (60 * Settings.Instance.MinHeight));
                    TimePosInfo time = timeList.GetByIndex(timeIndex) as TimePosInfo;
                    foreach (ReserveViewItem resInfo in time.ReserveList)
                    {
                        if (resInfo.LeftPos <= cursorPos.X && cursorPos.X < resInfo.LeftPos + resInfo.Width &&
                            resInfo.TopPos <= cursorPos.Y && cursorPos.Y < resInfo.TopPos + resInfo.Height)
                        {
                            reserve = resInfo.ReserveInfo;
                            return true;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\r\n" + ex.StackTrace);
            }
            return false;
        }