コード例 #1
0
        private void button_supertypeTest_Click(object sender, RoutedEventArgs e)
        {
            if (listBox_schemaList.SelectedItems.Count == 0 || listBox_schemaList.SelectedItems.Count > 1)
            {
                return;
            }

            DirectoryInfo dInfo      = new DirectoryInfo(textBox_folderLocation.Text);
            FileInfo      f          = dInfo.GetFiles(listBox_schemaList.SelectedItem.ToString()).First();
            string        schemaName = f.Name.Replace(".xsd", "");

            if (string.IsNullOrEmpty(textBox_type1.Text) || string.IsNullOrEmpty(textBox_type2.Text))
            {
                return;
            }

            bool res = IfcSchemaEntityTree.IsSuperTypeOf(schemaName, textBox_type1.Text, textBox_type2.Text);

            if (res)
            {
                checkBox_testResult.IsChecked = true;
            }
            else
            {
                checkBox_testResult.IsChecked = false;
            }
        }
コード例 #2
0
        private void button_supertypeTest_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrEmpty(textBox_type1.Text) || string.IsNullOrEmpty(textBox_type2.Text))
            {
                return;
            }

            bool res = IfcSchemaEntityTree.IsSuperTypeOf(textBox_type1.Text, textBox_type2.Text);

            if (res)
            {
                checkBox_testResult.IsChecked = true;
            }
            else
            {
                checkBox_testResult.IsChecked = false;
            }
        }