|
@@ -195,7 +195,7 @@ namespace CollaborativePlatformMain.Form.MessageSubPage
|
|
|
sp_modelUser.Visibility = Visibility.Visible;
|
|
|
sp_modelEmploy.Visibility = Visibility.Collapsed;
|
|
|
}
|
|
|
- else if (value=="模型服务")
|
|
|
+ else if (value == "模型服务")
|
|
|
{
|
|
|
sp_autoModel.Visibility = Visibility.Collapsed;
|
|
|
sp_modelUser.Visibility = Visibility.Collapsed;
|
|
@@ -229,7 +229,12 @@ namespace CollaborativePlatformMain.Form.MessageSubPage
|
|
|
/// <param name="e"></param>
|
|
|
private void TextBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
|
|
{
|
|
|
-
|
|
|
+ bool isSelectDwg = ShowSelectDWGFiles(out string filePath);
|
|
|
+ if (isSelectDwg)
|
|
|
+ {
|
|
|
+ selectModelApplication.Text = "";
|
|
|
+ selectModelApplication.Text = filePath;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -250,5 +255,36 @@ namespace CollaborativePlatformMain.Form.MessageSubPage
|
|
|
button.Margin = new Thickness(0, 5, 0, 0);
|
|
|
sp_objectDraw.Children.Add(button);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 选择单个文件
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="filePath"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ public static bool ShowSelectDWGFiles(out string filePath)
|
|
|
+ {
|
|
|
+ filePath = "";
|
|
|
+ System.Windows.Forms.OpenFileDialog dlg = new System.Windows.Forms.OpenFileDialog();
|
|
|
+ dlg.Multiselect = false;//等于true表示可以选择多个文件
|
|
|
+ dlg.DefaultExt = ".rvt";
|
|
|
+ dlg.Filter = "RVT 文件|*.rvt";
|
|
|
+
|
|
|
+ if (dlg.ShowDialog() != System.Windows.Forms.DialogResult.OK) return false;
|
|
|
+
|
|
|
+ filePath = dlg.FileName;
|
|
|
+ return true;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void SelectmodelServices_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
|
|
+ {
|
|
|
+ bool isSelectDwg = ShowSelectDWGFiles(out string filePath);
|
|
|
+ if (isSelectDwg)
|
|
|
+ {
|
|
|
+ selectModelServices.Text = "";
|
|
|
+ selectModelServices.Text = filePath;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|