Пример #1
0
        private void TSIRenderMouseMove(object sender, MouseEventArgs e)
        {
            if (this.MainBar.Items[MainBar.SelectedDockTab].GetType() == typeof(TSIDockContainer))
            {
                TSIDockContainer SelectTSIDockContainer = (TSIDockContainer)this.MainBar.Items[MainBar.SelectedDockTab];
                if (TreeTSI.SelectedNode != null)
                {
                    if (TreeTSI.SelectedNode.Level == 1)
                    {
                        int ElementIndex = TreeTSI.SelectedNode.Index;
                        int DDSIndex     = TreeTSI.SelectedNode.Parent.Index;

                        if (TSIclick)
                        {
                            if (e.X - SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].X > 0 && e.Y - SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].Y > 0)
                            {
                                SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].Width  = e.X - SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].X;
                                SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].Height = e.Y - SelectTSIDockContainer.tsi.listDDS[DDSIndex].ListDDS_element[ElementIndex].Y;
                            }
                        }

                        SelectTSIDockContainer.DrawDDS(DDSIndex);
                        SelectTSIDockContainer.DrawAera(DDSIndex, ElementIndex);
                    }
                }
            }
        }
Пример #2
0
 private void TreeTSI_NodeClick(object sender, DevComponents.AdvTree.TreeNodeMouseEventArgs e)
 {
     if (e.Node.Level == 0)
     {
         addDDSToolStripMenuItem.Enabled        = true;
         removeDDSToolStripMenuItem.Enabled     = true;
         addElementToolStripMenuItem.Enabled    = true;
         removeElementToolStripMenuItem.Enabled = false;
         copyTreeTSIMenuItem.Enabled            = true;
         pasteTreeTSIMenuItem.Enabled           = true;
         TSIDockContainer selectTSIDockContainer = (TSIDockContainer)MainBar.SelectedDockContainerItem;
         propertyGrid.SelectedObject = selectTSIDockContainer.tsi.listDDS[e.Node.Index];
         try
         {
             selectTSIDockContainer.DrawDDS(e.Node.Index);
         }
         catch
         {
             AddLog(String.Format("Error , {0} can't be load", selectTSIDockContainer.tsi.listDDS[e.Node.Index].Path), LogType.MSG_ERROR);
         }
     }
     if (e.Node.Level == 1)
     {
         addDDSToolStripMenuItem.Enabled        = false;
         removeDDSToolStripMenuItem.Enabled     = false;
         addElementToolStripMenuItem.Enabled    = true;
         removeElementToolStripMenuItem.Enabled = true;
         copyTreeTSIMenuItem.Enabled            = true;
         pasteTreeTSIMenuItem.Enabled           = true;
         TSIDockContainer selectTSIDockContainer = (TSIDockContainer)MainBar.SelectedDockContainerItem;
         propertyGrid.SelectedObject = selectTSIDockContainer.tsi.listDDS[e.Node.Parent.Index].ListDDS_element[e.Node.Index];
         try
         {
             selectTSIDockContainer.DrawDDS(e.Node.Parent.Index);
             selectTSIDockContainer.DrawAera(e.Node.Parent.Index, e.Node.Index);
         }
         catch
         {
             AddLog(String.Format("Error , {0} can't be load", selectTSIDockContainer.tsi.listDDS[e.Node.Index].Path), LogType.MSG_ERROR);
         }
     }
     else
     {
     }
 }
Пример #3
0
 private void propertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (propertyGrid.SelectedObject.GetType() == typeof(TSI.DDS))
     {
         DevComponents.AdvTree.Node selectNode = TreeTSI.SelectedNode;
         TSI.DDS selectDDS = (TSI.DDS)propertyGrid.SelectedObject;
         selectNode.Name = selectDDS.Path;
         selectNode.Text = selectDDS.Path;
     }
     else if (propertyGrid.SelectedObject.GetType() == typeof(TSI.DDS.DDSElement))
     {
         DevComponents.AdvTree.Node selectNode       = TreeTSI.SelectedNode;
         TSI.DDS.DDSElement         selectDDSElement = (TSI.DDS.DDSElement)propertyGrid.SelectedObject;
         selectNode.Name = selectDDSElement.Name;
         selectNode.Text = selectDDSElement.Name;
         TSIDockContainer selectTSIDockContainer = (TSIDockContainer)MainBar.SelectedDockContainerItem;
         selectTSIDockContainer.DrawAera(TreeTSI.SelectedNode.Parent.Index, TreeTSI.SelectedNode.Index);
     }
 }