//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ //------------------------------------------------------------------------------------- #region << Constructors >> /// <summary> /// Конструктор по умолчанию. /// </summary> public InternalTreeView(SimTreeView treeView) : base() { InitializeComponent(); col = new SimTreeNodeCollection(base.Nodes); base.StateImageList = chImageList; this.treeView = treeView; base.ShowNodeToolTips = true; }
//------------------------------------------------------------------------------------- #region << Overrides Methods >> /// <summary> /// Initialize /// </summary> /// <param name="component"></param> public override void Initialize(IComponent component) { base.Initialize(component); //base.AutoResizeHandles = true; this.tree = component as SimTreeView; this.strip = this.tree.MainToolStrip; base.EnableDesignMode(this.tree.MainToolStrip, "MainToolStrip"); this.designerHost = (IDesignerHost)component.Site.GetService(typeof(IDesignerHost)); }
private void ftvTree_ItemDropped(object sender, SimTreeView.DragDropItemEventArgs e) { if(SimModalMessageBox.Show(PanelBack, String.Format("Перенести [{0}]?", e.DroppedItem.ItemText), "Перенос", MessageBoxIcon.Question, MessageBoxButtons.YesNo) != System.Windows.Forms.DialogResult.Yes) return; _menu.MoveItem((TreeItem<FormInfo>)e.DroppedItem, (TreeItem<FormInfo>)e.DestItem); }