示例#1
0
        /// <summary>
        /// 引发 <see cref="ResourceSelectionChanged" /> 事件
        /// </summary>
        /// <param name="ea">包含此事件的参数</param>
        protected virtual void OnResourceSelectionChanged(ResourceSelectionEventArgs ea)
        {
            var handler = ResourceSelectionChanged;

            if (handler != null)
            {
                handler(this, ea);
            }
        }
示例#2
0
        void InitSelection()
        {
            lv.SelectedIndexChanged += (s, e) =>
            {
                var ea = new ResourceSelectionEventArgs(CurrentSelection);

                OnResourceSelectionChanged(ea);
            };
        }
示例#3
0
        void lv_SelectedIndexChanged(object sender, EventArgs e)
        {
            var ea = new ResourceSelectionEventArgs(CurrentSelection, TorrentResourceProvider);

            OnResourceSelectionChanged(ea);
        }