Пример #1
0
 public void AddRange(TerrainListViewItemCollection items)
 {
     foreach (TerrainListViewItem item in items)
     {
         BC.Add(item);
     }
 }
Пример #2
0
        private void Apply_Click(object sender, RoutedEventArgs e)
        {
            // Set BC name and clear Nodal Values
            BC.Name = Name.Text;
            BC.Clear();

            // Check BC selected type
            string type = Type_Box.SelectedItem.ToString().Replace("System.Windows.Controls.ComboBoxItem: ", "");

            if (type == "Boundary SPC")
            {
                BC.Type = "SPC";
            }
            if (type == "Point load")
            {
                BC.Type = "PointLoad";
            }

            foreach (SPC_Row row in Table.Items)
            {
                BC.Add(row.NID, new double[3] {
                    row.X, row.Y, row.Z
                }, DB.NodeLib);
            }

            // Hide all actors and show this one
            foreach (BoundaryCondition bc in DB.BCLib.Values)
            {
                bc.HideActor();
            }
            BC.ColorID = Color_Box.SelectedIndex;
            BC.ShowActor();

            // Check if Clip Mode is ON based on Clip Plane Actor visibility
            bool ClipMode = false;

            if (iRen.Get_ClipPlaneActor().GetVisibility() == 1)
            {
                ClipMode = true;
            }

            // Update Arrow Actors
            BC.Update_Arrows(DB.NodeLib, ArrowScale, Step, ClipMode);

            // Refresh Viewport
            iRen.Refresh();

            //Change names in TreeView
            TreeItem.Header = "BC ID " + BC.ID + ": " + BC.Name;
        }
Пример #3
0
 public TerrainListViewItem Add(string key, string text, int imageIndex)
 {
     return((TerrainListViewItem)BC.Add(key, text, imageIndex));
 }
Пример #4
0
 public TerrainListViewItem Add(string key, string text, string imageKey)
 {
     return((TerrainListViewItem)BC.Add(key, text, imageKey));
 }
Пример #5
0
 public TerrainListViewItem Add(TerrainListViewItem value)
 {
     return((TerrainListViewItem)BC.Add(value));
 }