private void panel1_MouseUp(object sender, MouseEventArgs e) { p_mouse_down = false; HitObject ho = GetHitPart(e.X, e.Y); if (HitObject.CompareHitPart(ho, p_md_hit)) { if (ho.Part == HitObjectPart.ExpandButton) { ho.Item.Expand(!ho.Item.Expanded); panel1.Invalidate(); } else if (ho.Part == HitObjectPart.Title) { SelectedNode = ho.Item; MNNotificationCenter.BroadcastMessage(this, "ObjectSelected", ho.Item.GetContentData()); panel1.Invalidate(); } else if (ho.Part == HitObjectPart.ActionButton) { if (SelectedNode == ho.Item) { ShowActionsForObject(ho.Item, new Point(e.X, e.Y - VerticalScroll.Value)); } else { SelectedNode = ho.Item; ho.Part = HitObjectPart.Title; MNNotificationCenter.BroadcastMessage(this, "ObjectSelected", ho.Item.GetContentData()); panel1.Invalidate(); } } } p_md_hit = null; }