Ejemplo n.º 1
0
        private void _ThunderLinkText_MouseDown(object sender, MouseButtonEventArgs e)
        {
            MagnetItem resultItem = ((TextBlock)sender).Tag as MagnetItem;

            resultItem.StartThunderLink();
            e.Handled = true;
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            MagnetItem item = obj as MagnetItem;

            if (item != null)
            {
                if (!string.IsNullOrEmpty(this.MagneticLink) &&
                    !string.IsNullOrWhiteSpace(this.MagneticLink))
                {
                    return(string.Equals(this.MagneticLink, item.MagneticLink));
                }
                else if (!string.IsNullOrEmpty(this.ThunderLink) &&
                         !string.IsNullOrWhiteSpace(this.ThunderLink))
                {
                    return(string.Equals(this.ThunderLink, item.ThunderLink));
                }
                else
                {
                    return(object.ReferenceEquals(this, item));
                }
            }

            return(false);
        }