コード例 #1
0
        //新建工具树
        public DemoTools()
        {
            items = new List <ToolTreeItem>();

            ToolTreeItem item = new ToolTreeItem("Demo|Basic", "DemoTest", callDemoWindow);

            items.Add(item);

            menus = new List <iS3MenuItem>();
            iS3MenuItem mItem00 = new iS3MenuItem("地质|数据管理", "钻孔导入", true, "TBM.png", new DFunc(CalMenu00));

            menus.Add(mItem00);
            iS3MenuItem mItem10 = new iS3MenuItem("地质|数据管理", "地层导入", false, "Tunnel-32.png", new DFunc(CalMenu10));

            menus.Add(mItem10);
            iS3MenuItem mItem11 = new iS3MenuItem("地质|数据管理", "水位导入", false, "TunnelAxis-32.png", new DFunc(CalMenu11));

            menus.Add(mItem11);
            iS3MenuItem mItem12 = new iS3MenuItem("地质|数据管理", "断层导入", false, "TunnelCrossSection-32.png", new DFunc(CalMenu11));

            menus.Add(mItem12);
            iS3MenuItem mItem20 = new iS3MenuItem("地质|分析工具", "地质剖切", true, "TunnelDistToSt.png", new DFunc(CalMenu20));

            menus.Add(mItem20);
            iS3MenuItem mItem30 = new iS3MenuItem("监测|报警预警", "报警功能", true, "TunnelDistToSt.png", new DFunc(CalMenu20));

            menus.Add(mItem30);
        }
コード例 #2
0
        //新建工具树
        public DemoTools()
        {
            items = new List <ToolTreeItem>();

            ToolTreeItem item = new ToolTreeItem("Demo|Basic", "DemoTest", callDemoWindow);

            items.Add(item);
        }
コード例 #3
0
ファイル: DemoTools.cs プロジェクト: linxy5326/iS3-Desktop
        //新建工具树
        public DemoTools()
        {
            items = new List <ToolTreeItem>();

            ToolTreeItem item = new ToolTreeItem("Demo|Basic", "MonitorDemoTool", CallMonitorDemoTool);

            items.Add(item);

            ToolTreeItem item1 = new ToolTreeItem("Demo|Basic", "DomainTree", CallDomainTree);

            items.Add(item1);
        }
コード例 #4
0
        public ToolsPanel()
        {
            InitializeComponent();

            ToolTreeItem root = new ToolTreeItem(null, "Root");

            toolboxesTree = new ToolTreeItem(null, "Toolboxes");
            root.add(toolboxesTree);

            //ToolTreeItem test1 = new ToolTreeItem("Structure|Tunnel", "Test1");
            //toolboxesTree.add(test1);
            //ToolTreeItem tree = root.find("Toolboxes/Structure/Tunnel/Test1");

            ToolsTreeView.ItemsSource = root.items;
        }
コード例 #5
0
        private void ToolsTreeView_MouseDoubleClick(object sender,
                                                    MouseButtonEventArgs e)
        {
            ToolTreeItem tree = ToolsTreeView.SelectedItem as ToolTreeItem;

            try
            {
                if (tree != null && tree.func != null)
                {
                    tree.func();
                }
            }
            catch (Exception ex)
            {
                string format = "Error running plugin tool: {0}.";
                string msg    = String.Format(format, tree.displayName);
                ErrorReport.Report(msg);
                ErrorReport.Report(ex.Message);
            }
        }