// 双击ListBoxItem_soeName进入该材料的编辑界面
 private void updateSoe(object sender, RoutedEventArgs e)
 {
     if (curdType == "u" && ((System.Windows.Controls.ListBoxItem)sender).Content.ToString() != "")
     {
         currentClickRowOfListBox = listBox_soeName.SelectedIndex;
         EditMaterialAttrWindow edaw = new EditMaterialAttrWindow();
         // 如果已经修改过其他两个属性,则不去new
         if (currentMaterial == null)
         {
             currentMaterial = new Dictionary <string, Dictionary <string, string> >(findFromDataBaseMaterials[currentClickRowOfListBox]);
         }
         Dictionary <string, string> soeData = new Dictionary <string, string>(currentMaterial["soe"]);
         edaw.PassValuesEvent += new EditMaterialAttrWindow.PassValuesHandler(ReceivedVals);
         edaw.setSoe(soeData);
         edaw.Topmost = true;
         edaw.Show();
     }
 }
Пример #2
0
        private void editSoeClick(object sender, RoutedEventArgs e)
        {
            // 编辑soe参数
            EditMaterialAttrWindow edaw = new EditMaterialAttrWindow();

            if (gatherDataFromEditWindow == null)
            {
                e.Handled = true;
                System.Windows.MessageBox.Show("请先选择材料强度模型!", "警告");
                return;
            }
            Dictionary <string, string> soeData = gatherDataFromEditWindow["soe"];

            edaw.PassValuesEvent += new EditMaterialAttrWindow.PassValuesHandler(receivedEditSoeWindowData);
            edaw.setSoe(soeData);
            edaw.Topmost = true;
            edaw.Show();
        }