Esempio n. 1
0
        private void ThreeDimLayerBtn_Click(object sender, RoutedEventArgs e)
        {
            DGObjectsDefinition DObjsDef = DObjsDefGrid.DataContext as DGObjectsDefinition;

            if (DObjsDef == null)
            {
                return;
            }

            if (_u3dLayer == null)
            {
                PromptTB.Text = "Click the button again until the 3D model is loaded.";
                Preview3DLayerBtn_Click(this, null);
                return;
            }

            Select3DEMapLayersWindow select3DEMapLayersWnd = new Select3DEMapLayersWindow(_u3dLayer);

            select3DEMapLayersWnd.Owner = this;
            select3DEMapLayersWnd.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            bool?ok = select3DEMapLayersWnd.ShowDialog();

            if (ok != null && ok.Value == true)
            {
                if (select3DEMapLayersWnd.SelectLayerName != null)
                {
                    Layer3DNameTB.Text   = select3DEMapLayersWnd.SelectLayerName;
                    DObjsDef.Layer3DName = select3DEMapLayersWnd.SelectLayerName;
                }
            }
        }
Esempio n. 2
0
        private void ThreeDimLayerBtn_Click(object sender, RoutedEventArgs e)
        {
            DGObjectsDefinition DObjsDef = DObjsDefGrid.DataContext as DGObjectsDefinition;

            if (DObjsDef == null)
            {
                return;
            }

            Select3DEMapLayersWindow select3DEMapLayersWnd = new Select3DEMapLayersWindow(_unityLayer);

            select3DEMapLayersWnd.Owner = this;
            select3DEMapLayersWnd.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            bool?ok = select3DEMapLayersWnd.ShowDialog();

            if (ok != null && ok.Value == true)
            {
                if (select3DEMapLayersWnd.SelectLayerName != null)
                {
                    Layer3DNameTB.Text   = select3DEMapLayersWnd.SelectLayerName;
                    DObjsDef.Layer3DName = select3DEMapLayersWnd.SelectLayerName;
                }
            }
        }