zoukankan      html  css  js  c++  java
  • dotNetClass "System.Windows.Forms.View").

     
    if (splitViewRollout != undefined) and (splitViewRollout.isDisplayed) do (destroyDialog splitViewRollout)
    global splitViewRollout
    rollout splitViewRollout " Modifiers"
    (
     -- TreeView
     fn initTreeView tv =
     (
      tv.checkboxes = true
      tv.sorted = true
     )
     fn addModifiers theNode theModifiers =
     (
      for m in theModifiers do
      (
       newNode = theNode.nodes.add m.name
       newNode.tag = dotNetMXSValue m
       newNode.checked = m.enabled
      )
     )
     fn addObjects theNode theObjects =
     (
      for c in theObjects do
      (
       newNode = theNode.nodes.add c.name
       newNode.tag = dotNetMXSValue c
       newNode.checked = not c.isHidden
       newNode.forecolor = (dotNetClass "System.Drawing.Color").fromARGB 200 0 0
      
       addModifiers newNode c.modifiers
      )
     )
     fn fillInTreeView tv =
     (
      theRoot = tv.nodes.add "(Objects)"
      rootNodes = for o in objects collect o
      addObjects theRoot rootNodes
     )
     -- ListView
     fn initListView lv =
     (
      lv.gridLines = true
      lv.view = (dotNetClass "System.Windows.Forms.View").Details
      lv.fullRowSelect = true
     
      layoutDef = #(#("Property", 120), #("Value", 60))
     
      for i in layoutDef do (lv.columns.add i[1] i[2])
     )
     fn fillInSpreadsheet lv =
     (
      lv.items.clear()
      theRange = #()
     
      if selection.count == 1 and myNode != undefined do
      (
       propNamesArray = getPropNames myNode
     
       for i = 1 to propNamesArray.count do
       (
     li = dotNetObject "System.Windows.Forms.ListViewItem" ((propNamesArray[i]) as string)
     sub_Li = li.subItems.add ((getProperty myNode propNamesArray[i]) as string)
     
     append theRange li
       )
       lv.items.addRange theRange
      )
     )
     
     dotNetControl tv "TreeView" 290 height:490 pos:[5,5]
     dotNetControl lv_Properties "System.Windows.Forms.Listview" 290 height:490 pos:[305,5]
     
     on tv Click arg do
     (
      hitNode = tv.getNodeAt (dotNetObject "System.Drawing.Point" arg.x arg.y)
     
      if hitNode != undefined do
      (
       try
       ( 
     if superClassOf hitNode.tag.value == modifier then (select hitNode.parent.tag.value)
     else (select hitNode.tag.value)
     
     global myNode = hitNode.tag.value
       )
       catch (max select none)
      
       fillInSpreadsheet lv_Properties
      )
     )
     on splitViewRollout open do
     (
      initTreeView tv
      fillInTreeView tv
     
      initListView lv_Properties
      fillInSpreadsheet lv_Properties
     )
    )
    createDialog splitViewRollout 600 525 style:#(#style_sysmenu, #style_titlebar, #style_toolwindow)
    callbacks.addScript #preNodeGeneralPropChanged "splitViewRollout.fillInSpreadsheet splitViewRollout.lv_Properties"

  • 相关阅读:
    python 模块基础介绍
    python 函数基础介绍
    性能测试总结与分享材料
    徒手撸一个简单的RPC框架
    【springcloud】一文带你搞懂API网关
    一次非常有意思的sql优化经历
    MySQL数据库之互联网常用分库分表方案
    后端开发应该掌握的Redis基础
    权限管理模块设计
    基于redis的分布式锁的分析与实践
  • 原文地址:https://www.cnblogs.com/gaitian00/p/2202464.html
Copyright © 2011-2022 走看看