Пример #1
0
        private void AddNewNetwork(NetworkObject network)
        {
            TreeNode tn = new TreeNode(network.Network, 19, 19);

            tn.ContextMenuStrip = contextMenuStripNetworkNode;
            m_tnNetworkRoot.Nodes.Add(tn);
            TreeNode treeNodeSegmentation = new TreeNode("Dynamic Segmentation", 14, 14);
            FormImageViewSegmentation formSegmentation = new FormImageViewSegmentation(network);

            object[] parameters = new object[3];
            parameters[0]            = null;
            parameters[1]            = "DynamicSegmentation";
            parameters[2]            = network;
            treeNodeSegmentation.Tag = parameters;
            tn.Nodes.Add(treeNodeSegmentation);

            AddNetworkViewers(network, tn);
        }
Пример #2
0
        private void CreateForms(object[] arguments)
        {
            switch (arguments[1].ToString())
            {
            case "ImageViewer":
                arguments[0] = new FormImageViewer(arguments[2].ToString());
                break;

            case "RawAttribute":
                FormAttributeDocument formAttributeDocument = new FormAttributeDocument(arguments[2].ToString());
                arguments[0] = formAttributeDocument;
                ImageViewManager.Navigation.AddFormEvent(formAttributeDocument);
                break;

            case "LinearNetworkDefinition":
                arguments[0] = new FormNetworkDefinition(true, null);
                break;

            case "SectionNetworkDefinition":
                arguments[0] = new FormNetworkDefinition(false, null);
                break;

            case "GISViewer":
                FormGISView formGISViewer = new FormGISView(arguments[2].ToString(), Global.GetAttributeYear(arguments[3].ToString()));
                formGISViewer.Tag     = arguments[2].ToString();
                formGISViewer.TabText = arguments[2].ToString();
                arguments[0]          = formGISViewer;
                ImageViewManager.Navigation.AddFormEvent(formGISViewer);
                break;

            case "AssetView":
                FormAssetView formAssetView = new FormAssetView(arguments[2].ToString(), Global.GetAttributeYear(arguments[2].ToString()));
                arguments[0] = formAssetView;
                break;

            case "Attribute":
                Hashtable         hashAttributeYear = Global.GetAttributeYear(arguments[3].ToString());
                FormAttributeView formAttribute     = new FormAttributeView(arguments[2].ToString(), hashAttributeYear);
                arguments[0] = formAttribute;
                ImageViewManager.Navigation.AddFormEvent(formAttribute);
                break;

            case "SectionView":
                FormSectionView formSectionView = new FormSectionView(arguments[2].ToString(), Global.GetAttributeYear(arguments[3].ToString()));
                arguments[0] = formSectionView;
                ImageViewManager.Navigation.AddFormEvent(formSectionView);
                break;

            case "GoogleView":
                FormGoogleMap formGoogleMap = new FormGoogleMap();
                arguments[0] = formGoogleMap;
                ImageViewManager.Navigation.AddFormEvent(formGoogleMap);
                break;

            case "DynamicSegmentation":
                NetworkObject             network          = (NetworkObject)arguments[2];
                FormImageViewSegmentation formSegmentation = new FormImageViewSegmentation(network);
                arguments[0] = formSegmentation;
                break;
            }
            return;
        }