Преглед изворни кода

Merge branch 'master' of https://git.dev.tencent.com/xuhuo1234/saga

xulisong пре 6 година
родитељ
комит
a9fab764d6

+ 12 - 1
MBI/Menu/MBITool.xml

@@ -198,7 +198,18 @@
       <MenuTab>MBITool_W</MenuTab>
       <Modules>MBITool</Modules>
     </Button>
-    
+    <Button ButtonStyles="Stacked">
+      <ButtonName>SAGA.MBI.RenameSystemNameCommand</ButtonName>
+      <ButtonText>重命名系统名称</ButtonText>
+      <ImageName>1、打开楼层模型</ImageName>
+      <DllName>..\OutputDll\SAGA.MBI.exe</DllName>
+      <ClassName>SAGA.MBI.RenameSystemNameCommand</ClassName>
+      <ToolTip>根据excel规则重命名风管和水管系统名称</ToolTip>
+      <LongDescription>重命名系统名称</LongDescription>
+      <ToolTipImage></ToolTipImage>
+      <MenuTab>MBITool_W</MenuTab>
+      <Modules>MBITool</Modules>
+    </Button>
   </Panel>
  <Panel PanelName="功能扩展" GroupFlag="True" GroupImage="" RevitVer="R14,R15,R16,R17"  ButtonStyles="Large">   
     <Button ButtonStyles="Large">

+ 1 - 1
MBI/SAGA.DotNetUtils/NPOI/NPOIHelper.cs

@@ -326,7 +326,7 @@ namespace SAGA.DotNetUtils.NPOI
                 IRow row;
                 // List<int> showIndex = new List<int> { 1, 2, 3, 4 };
 
-                for (int i = sheetInfo.RowStartIndex; i < sheet.LastRowNum; i++)
+                for (int i = sheetInfo.RowStartIndex; i <= sheet.LastRowNum; i++)
                 {
                     row = sheet.GetRow(i);
                     if (row != null)

+ 3 - 3
MBI/SAGA.DotNetUtils/SAGA.DotNetUtils.csproj

@@ -504,8 +504,8 @@
     <Compile Include="WPF\UserControl\SelectFile_Hyperlink.xaml.cs">
       <DependentUpon>SelectFile_Hyperlink.xaml</DependentUpon>
     </Compile>
-    <Compile Include="WPF\UserControl\SelectPath_Start.xaml.cs">
-      <DependentUpon>SelectPath_Start.xaml</DependentUpon>
+    <Compile Include="WPF\UserControl\SelectPath.xaml.cs">
+      <DependentUpon>SelectPath.xaml</DependentUpon>
     </Compile>
     <Compile Include="WPF\UserControl\SliderCheckBox.xaml.cs">
       <DependentUpon>SliderCheckBox.xaml</DependentUpon>
@@ -567,7 +567,7 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="WPF\UserControl\SelectPath_Start.xaml">
+    <Page Include="WPF\UserControl\SelectPath.xaml">
       <SubType>Designer</SubType>
       <Generator>XamlIntelliSenseFileGenerator</Generator>
     </Page>

+ 15 - 3
MBI/SAGA.DotNetUtils/WPF/UserControl/SelectFile_Hyperlink.xaml.cs

@@ -16,7 +16,7 @@ using SAGA.DotNetUtils.Extend;
 namespace SAGA.DotNetUtils.WPF.UserControl
 {
     /// <summary>
-    /// SelectPath_Start.xaml 的交互逻辑
+    /// SelectPath.xaml 的交互逻辑
     /// </summary>
     public partial class SelectFile_Hyperlink
     {
@@ -30,6 +30,18 @@ namespace SAGA.DotNetUtils.WPF.UserControl
             get { return (string)GetValue(TextProperty); }
             set { SetValue(TextProperty, value); }
         }
+        public static readonly DependencyProperty FullPathProperty = DependencyProperty.Register("FullPath", typeof(string), typeof(SelectFile_Hyperlink));
+        public string FullPath
+        {
+            get { return (string)GetValue(FullPathProperty); }
+            set { SetValue(FullPathProperty, value); }
+        }
+        public static readonly DependencyProperty IsDisplayFullPathProperty = DependencyProperty.Register("IsDisplayFullPath", typeof(bool), typeof(SelectFile_Hyperlink));
+        public bool IsDisplayFullPath
+        {
+            get { return (bool)GetValue(IsDisplayFullPathProperty); }
+            set { SetValue(IsDisplayFullPathProperty, value); }
+        }
 
 
         public static readonly DependencyProperty BtnImageProperty = DependencyProperty.Register("BtnImage", typeof(BitmapImage), typeof(SelectFile_Hyperlink));
@@ -57,9 +69,9 @@ namespace SAGA.DotNetUtils.WPF.UserControl
 
                 if (dialog.ShowDialog() == true)
                 {
-                    this.Tag = dialog.FileName;
+                    FullPath = dialog.FileName;
                     string foldPath = Path.GetFileName(dialog.FileName);
-                    Text = foldPath;
+                    Text = IsDisplayFullPath?FullPath:foldPath;
                     AttachAction?.Invoke();
                 }
             }

+ 56 - 0
MBI/SAGA.DotNetUtils/WPF/UserControl/SelectPath.xaml

@@ -0,0 +1,56 @@
+<UserControl x:Class="SAGA.DotNetUtils.WPF.UserControl.SelectPath"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:userControl="clr-namespace:SAGA.DotNetUtils.WPF.UserControl"
+             mc:Ignorable="d" x:Name="Uc"
+             d:DesignHeight="25" d:DesignWidth="300">
+    <UserControl.Resources>
+        <userControl:ButtonWidthConverter x:Key="startWidthConverter" IsInverce="False"></userControl:ButtonWidthConverter>
+        <userControl:ButtonWidthConverter x:Key="endWidthConverter" IsInverce="True"></userControl:ButtonWidthConverter>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="Auto" >
+                <!--<ColumnDefinition.Width>
+                    <MultiBinding Converter="{StaticResource startWidthConverter}">
+                        <Binding Path="Height"  RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=UserControl}" UpdateSourceTrigger="PropertyChanged"></Binding>
+                        <Binding Path="ButtonPosition"  RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=UserControl}" UpdateSourceTrigger="PropertyChanged"></Binding>
+                    </MultiBinding>
+                </ColumnDefinition.Width>-->
+            </ColumnDefinition>
+            <ColumnDefinition Width="*"/>
+            <ColumnDefinition Width="Auto">
+                <!--<ColumnDefinition.Width>
+                    <MultiBinding Converter="{StaticResource endWidthConverter}"  >
+                        <Binding Path="Height"  RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=UserControl}"  UpdateSourceTrigger="PropertyChanged"></Binding>
+                        <Binding Path="ButtonPosition"  RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=UserControl}" UpdateSourceTrigger="PropertyChanged"></Binding>
+                    </MultiBinding>
+                </ColumnDefinition.Width>-->
+            </ColumnDefinition>
+        </Grid.ColumnDefinitions>
+        <Button Grid.Column="0" Click="Button_Click" >
+            <Button.Width>
+                <MultiBinding Converter="{StaticResource startWidthConverter}">
+                    <Binding Path="Height"  RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=UserControl}" UpdateSourceTrigger="PropertyChanged"></Binding>
+                    <Binding Path="ButtonPosition"  RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=UserControl}" UpdateSourceTrigger="PropertyChanged"></Binding>
+                </MultiBinding>
+            </Button.Width>
+            <Image Source="{Binding Path=BtnImage, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></Image>
+        </Button>
+        <TextBox Grid.Column="1" x:Name="TextBox"
+                 VerticalContentAlignment="Center"
+HorizontalContentAlignment="Left"
+                 Text="{Binding Path=Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></TextBox>
+        <Button Grid.Column="2" Click="Button_Click">
+            <Button.Width>
+                <MultiBinding Converter="{StaticResource endWidthConverter}">
+                    <Binding Path="Height"  RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=UserControl}" UpdateSourceTrigger="PropertyChanged"></Binding>
+                    <Binding Path="ButtonPosition"  RelativeSource="{RelativeSource Mode=FindAncestor,AncestorType=UserControl}" UpdateSourceTrigger="PropertyChanged"></Binding>
+                </MultiBinding>
+            </Button.Width>
+            <Image Source="{Binding Path=BtnImage, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></Image>
+        </Button>
+    </Grid>
+</UserControl>

+ 46 - 7
MBI/SAGA.DotNetUtils/WPF/UserControl/SelectPath_Start.xaml.cs

@@ -7,7 +7,9 @@
 
 
 using System;
+using System.Globalization;
 using System.Windows;
+using System.Windows.Data;
 using System.Windows.Forms;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
@@ -15,29 +17,35 @@ using System.Windows.Media.Imaging;
 namespace SAGA.DotNetUtils.WPF.UserControl
 {
     /// <summary>
-    /// SelectPath_Start.xaml 的交互逻辑
+    /// SelectPath.xaml 的交互逻辑
     /// </summary>
-    public partial class SelectPath_Start
+    public partial class SelectPath
     {
-        public SelectPath_Start()
+        public SelectPath()
         {
             InitializeComponent();
         }
-        public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(SelectPath_Start));
+        public static readonly DependencyProperty TextProperty = DependencyProperty.Register("Text", typeof(string), typeof(SelectPath));
         public string Text
         {
             get { return (string)GetValue(TextProperty); }
             set { SetValue(TextProperty, value); }
         }
+        public static readonly DependencyProperty ButtonPositionProperty = DependencyProperty.Register("ButtonPosition", typeof(ButtonPosition), typeof(SelectPath));
+        public ButtonPosition ButtonPosition
+        {
+            get { return (ButtonPosition)GetValue(ButtonPositionProperty); }
+            set { SetValue(ButtonPositionProperty, value); }
+        }
 
-        public static readonly DependencyProperty BtnImageProperty = DependencyProperty.Register("BtnImage", typeof(ImageSource), typeof(SelectPath_Start));
+        public static readonly DependencyProperty BtnImageProperty = DependencyProperty.Register("BtnImage", typeof(ImageSource), typeof(SelectPath));
         public ImageSource BtnImage
         {
             get { return (ImageSource)GetValue(BtnImageProperty); }
             set { SetValue(BtnImageProperty, value); }
         }
 
-        public Action<System.Windows.Controls.UserControl,string> AttachAction;
+        public Action<System.Windows.Controls.UserControl, string> AttachAction;
 
         private void Button_Click(object sender, RoutedEventArgs e)
         {
@@ -48,9 +56,40 @@ namespace SAGA.DotNetUtils.WPF.UserControl
             {
                 string foldPath = dialog.SelectedPath;
                 Text = foldPath;
-                AttachAction?.Invoke(this,foldPath);
+                AttachAction?.Invoke(this, foldPath);
             }
         }
 
+
+    }
+    public enum ButtonPosition
+    {
+        Start,
+        End,
     }
+
+    public class ButtonWidthConverter : IMultiValueConverter
+    {
+        public bool IsInverce { get; set; }
+
+        
+
+        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+        {
+            var buttonPosition = (ButtonPosition)values[1];
+            double width = 0;
+            if (buttonPosition != ButtonPosition.Start)
+            {
+                width = 0;
+            }
+
+            return IsInverce ? values[0] : width;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException();
+        }
+    }
+
 }

+ 0 - 20
MBI/SAGA.DotNetUtils/WPF/UserControl/SelectPath_Start.xaml

@@ -1,20 +0,0 @@
-<UserControl x:Class="SAGA.DotNetUtils.WPF.UserControl.SelectPath_Start"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             mc:Ignorable="d" x:Name="Uc"
-             d:DesignHeight="25" d:DesignWidth="300">
-    <Grid>
-        <Grid.ColumnDefinitions>
-            <ColumnDefinition  Width="{Binding Path=Height, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"/>
-            <ColumnDefinition Width="*"/>
-        </Grid.ColumnDefinitions>
-        <Button Grid.Column="0" Click="Button_Click">
-            <Image Source="{Binding Path=BtnImage, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></Image>
-        </Button>
-        <TextBox Grid.Column="1"
-                 VerticalContentAlignment="Center"
-                 Text="{Binding Path=Text,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl}}"></TextBox>
-    </Grid>
-</UserControl>

+ 1 - 3
MBI/SAGA.MBI/Common/MBIConst.cs

@@ -217,9 +217,7 @@ namespace SAGA.MBI.Common
         /// 拓扑图文件存放文件夹地址
         /// </summary>
         public static string OssGplotFilePrefix => $"test/files/revit/GplotData/{ MBIControl.ProjectCur.Id}";
-
-        //信标族名称
-        public static string BeaconFamilyName = "Beacon";
+        
         //空间的code类型
         public static string SpaceCode = "ispace";
         

+ 50 - 0
MBI/SAGA.MBI/Common/MBIElementUtils.cs

@@ -0,0 +1,50 @@
+/* ==============================================================================
+ * 功能描述:MBIElementUtils  
+ * 创 建 者:Garrett
+ * 创建日期:2019/6/25 10:18:52
+ * ==============================================================================*/
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using SAGA.DotNetUtils;
+
+namespace SAGA.MBI.Common
+{
+    /// <summary>
+    /// MBIElementUtils
+    /// </summary>
+    class MBIElementUtils
+    {
+        /// <summary>
+        /// 组合形成CADID
+        /// </summary>
+        /// <param name="code"></param>
+        /// <param name="name"></param>
+        /// <returns></returns>
+        public static string GetCADID(string code, string name)
+        {
+            string result = "";
+            if (code.IsNotNullEmpty())
+            {
+                if (name.IsNotNullEmpty())
+                {
+                    result = code + ":" + name;
+                }
+                else
+                {
+                    result = code;
+                }
+            }
+            else
+            {
+                if (name.IsNotNullEmpty())
+                {
+                    result = name;
+                }
+            }
+            return result;
+        }
+    }
+}

+ 8 - 7
MBI/SAGA.MBI/Common/RegexConstPattern.cs

@@ -16,22 +16,23 @@ namespace SAGA.MBI.Common
     /// </summary>
     class RegexConstPattern
     {
-        public const string IsSpaceId = @"Si\S*";
-        public const string IsEquipId = @"Si\S*";
-        public const string IsEquipPartId = @"Si\S*";
-        public const string IsBeaconId = @"Si\S*";
+        public const string IsSpaceId = @"^Si\S*";
+        public const string IsEquipId = @"^Eq\S*";
+        public const string IsEquipPartId = @"^Ec\S*";
+        public const string IsBeaconId = @"^VOBc\S*";
 
         public const string IsFamilyCode = @"\s*-\s*\S*";
 
         public const string IsEquip = @"^[A-Z]{4}\s*-\s*\S*";
         public const string IsEquipPart = @"^[A-Z]{6}\s*-\s*\S*";
+        public const string IsBeacon = @"^Beacon$";
 
-        public const string IsMBILevel = @"([BF][1-9]\d*M?\d?|RFM?\d?)";
+        public const string IsMBILevel = @"^([BF][1-9]\d*M?\d?|RFM?\d?)$";
         public const string IsMBIView = @"^([BF][1-9]\d*M?\d?|RFM?\d?)-saga$";
-        public const string IsSandwich = @"([BF][1-9]\d*M\d?|RFM\d?)";
+        public const string IsSandwich = @"^([BF][1-9]\d*M\d?|RFM\d?)$";
 
         public const string IsRF = @"^RF(-saga)?$";
-        public const string IsRFM = @"RFM\d*";
+        public const string IsRFM = @"^RFM\d*$";
         public const string IsOnground = @"^F\s*";
         public const string IsUnderground = @"^B\s*";
 

+ 16 - 0
MBI/SAGA.MBI/DataArrange/DalUploadFloor.cs

@@ -509,6 +509,22 @@ namespace SAGA.MBI.DataArrange
                     if (dutyId.IsNotNullEmpty())
                     {
                         cdutys = cloudDutys.Where(t => t.Id == dutyId).ToList();
+                        if (!cdutys.Any())
+                        {
+                            //去跟据id物理世界查找
+                            var tempcduty = DalCommon.QueryObjectById(dutyId);
+                            if (tempcduty != null)
+                            {
+                                cdutys.Add(tempcduty);
+                                //添加设备所在楼层
+                                localContext.UnGroupDatas.Add(new RltEquipinFloor(dutyId,cloudContext.FloorId){Operator = DocumentChangedOperator.Add});
+                            }
+                                
+                        }
+                    }
+                    else
+                    {
+                        lduty.Id = dutyId;
                     }
                 }
                 cduty = cdutys.FirstOrDefault();

+ 1 - 1
MBI/SAGA.MBI/Extend/ElementExtend.cs

@@ -82,7 +82,7 @@ namespace SAGA.MBI.Tools
         public static bool IsBeacon(this Element elem)
         {
             var family = elem.GetFamilyName();
-            return family != null && (Regex.IsMatch(family, MBIConst.BeaconFamilyName));
+            return family != null && (Regex.IsMatch(family, RegexConstPattern.IsBeacon));
         }
 
         /// <summary>

+ 9 - 1
MBI/SAGA.MBI/Model/MEquipment.cs

@@ -70,6 +70,7 @@ namespace SAGA.MBI.Model
             {
                 m_LocalId = value;
                 NotifyPropertyChanged("LocalId");
+                NotifyPropertyChanged("CADID");
             }
         }
 
@@ -81,9 +82,16 @@ namespace SAGA.MBI.Model
             set
             {
                 m_LocalName = value;
-                RaisePropertyChanged(() => this.LocalName);
+                NotifyPropertyChanged("LocalName");
+                NotifyPropertyChanged("CADID");
             }
         }
+        private string m_CADID;
+        [Description("CADID")]
+        public string CADID
+        {
+            get { return MBIElementUtils.GetCADID(LocalId, LocalName); }
+        }
 
         #endregion CloudProperty
 

+ 10 - 1
MBI/SAGA.MBI/Model/MEquipmentPart.cs

@@ -77,9 +77,11 @@ namespace SAGA.MBI.Model
             {
                 m_LocalId = value;
                 NotifyPropertyChanged("LocalId");
+                NotifyPropertyChanged("CADID");
             }
         }
 
+
         private string m_LocalName;
         [Description("EquipLocalName")]
         public string LocalName
@@ -88,9 +90,16 @@ namespace SAGA.MBI.Model
             set
             {
                 m_LocalName = value;
-                RaisePropertyChanged(() => this.LocalName);
+                NotifyPropertyChanged("LocalName");
+                NotifyPropertyChanged("CADID");
             }
         }
+        private string m_CADID;
+        [Description("CADID")]
+        public string CADID
+        {
+            get { return MBIElementUtils.GetCADID(LocalId, LocalName); }
+        }
         #endregion Model
 
 

+ 40 - 58
MBI/SAGA.MBI/RequestData/UpLoadFileRequest.cs

@@ -15,6 +15,7 @@ using SAGA.MBI.Common;
 using Utilities;
 using Aliyun.OSS;
 using Aliyun.OSS.Common;
+using FWindSoft.SystemExtensions;
 using Newtonsoft.Json.Linq;
 using SAGA.DotNetUtils;
 using SAGA.DotNetUtils.Encrypt;
@@ -44,7 +45,7 @@ namespace SAGA.MBI.RequestData
         public static bool UseOss()
         {
             var flag = ConfigurationUtil.Default.GetSettingValue("UpDownFlag");
-            return flag==null||flag.Trim() == "0";
+            return flag == null || flag.Trim() == "0";
         }
         #region Download
 
@@ -90,7 +91,7 @@ namespace SAGA.MBI.RequestData
         #endregion
 
         #region DownLoadAsync
-        
+
         private static WinMFMDownloadProcress windown = null;
 
         public static WinMFMDownloadProcress GetProcessWin()
@@ -110,7 +111,7 @@ namespace SAGA.MBI.RequestData
             windown.LabelFloorName = $"正在下载{floorName}层模型文件,请稍后。。。";
             windown.LabelPath = fullPath;
             windown.Count = count;
-            windown.Cur = cur; 
+            windown.Cur = cur;
         }
         /// <summary>
         /// 下载指定文件到指定
@@ -132,7 +133,7 @@ namespace SAGA.MBI.RequestData
             if (state == 2)
                 FloorFileOperate.BakFile(fullPath);
             string key = $"{MBIConst.OssClientFileKey}{cloudName}";
-            
+
             DownLoadNew:
             OssClient client;
             if (WebRequestProxy.IsOnline(out ClientConfiguration conf))
@@ -143,7 +144,7 @@ namespace SAGA.MBI.RequestData
             {
                 client = new OssClient(MBIConst.Endpoint, MBIConst.AccessKeyId, MBIConst.AccessKeySecret);
             }
-            
+
             int timeoutNum = 20;
             long totalLength = 0;
             try
@@ -155,22 +156,21 @@ namespace SAGA.MBI.RequestData
                 //getObjectRequest.StreamTransferProgress += DownStreamProgressCallback;
                 var buffer = new byte[1024 * 1024];
                 long stargIndex = 0;
+                #region ProgressCallback
                 getObjectRequest.StreamTransferProgress += (s, args) =>
-                {
-                  
-                    var tempTrans = stargIndex + args.TransferredBytes;
-                    var tempTotal = stargIndex + args.TotalBytes;
-                    var currentData = Math.Round(((double)tempTrans)/ tempTotal *100d, 3);
-                    Debug.WriteLine("ProgressCallback - TotalBytes:{0}M, TransferredBytes:{1}M,上传百分比:{2}%",
-                        Math.Round(tempTotal / 1024d / 1024,3), Math.Round(tempTrans / 1024d / 1024,3), currentData);
-                    windown?.Update(currentData);
-                    //currentData >= 100d
-                    if (tempTrans >= tempTotal && windown!=null&&windown.Count == windown.Cur)
-                    {
-                        //MessageBox.Show("数据上传完毕!");
-                        CloseDownloadWin(true, false);
-                    }
-                };
+                               {
+
+                                   var tempTrans = stargIndex + args.TransferredBytes;
+                                   var tempTotal = stargIndex + args.TotalBytes;
+                                   var currentData = Math.Round(((double)tempTrans) / tempTotal * 100d, 3);
+                                   windown?.Update(currentData);
+                                   if (tempTrans >= tempTotal && windown != null && windown.Count == windown.Cur)
+                                   {
+                                       CloseDownloadWin(true, false);
+                                   }
+                               };
+                #endregion
+
                 using (var fs = new MemoryStream())
                 {
                     ReDownload:
@@ -190,7 +190,7 @@ namespace SAGA.MBI.RequestData
                             while ((bytesRead = stream.Read(buffer, 0, buffer.Length)) > 0)
                             {
                                 fs.Write(buffer, 0, bytesRead);
-                            }                    
+                            }
                         }
                         catch (WebException e)
                         {
@@ -201,7 +201,7 @@ namespace SAGA.MBI.RequestData
                                 //timeoutNum--;
                                 goto ReDownload;
                             }
-                            throw; 
+                            throw;
                             #endregion
                         }
                         if (fs.Length < totalLength)
@@ -220,15 +220,15 @@ namespace SAGA.MBI.RequestData
                     {
                         string per = Math.Round((fs.Length / (double)totalLength) * 100, 3) + "%";
                         string errorMessage = ($"楼层 {floorName} MD5校验失败,本地与服务器不一致!下载进度{per}");
-                        if (fs.Length== totalLength)
+                        if (fs.Length == totalLength)
                         {
                             if (MessageShowBase.Question(errorMessage + "\r\n是否重新下载该层文件"))
                             {
                                 goto DownLoadNew;
-                            }                          
+                            }
                         }
                         else
-                        {                         
+                        {
                             MessageShowBase.Infomation(errorMessage);
                         }
                         MailLog.Log("下载MD5异常", errorMessage);
@@ -240,39 +240,14 @@ namespace SAGA.MBI.RequestData
             }
             catch (Exception ex)
             {
-                MessageShowBase.Infomation("Revit文件下载失败!\r\n"+ex.Message+"\r\n"+ex.StackTrace);
+                MessageShowBase.Infomation("Revit文件下载失败!\r\n" + ex.Message + "\r\n" + ex.StackTrace);
                 result = false;
-                CloseDownloadWin(result,false);
+                CloseDownloadWin(result, false);
             }
 
             return result;
         }
         /// <summary>
-        /// 下载进度条
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="args"></param>
-        private static void DownStreamProgressCallback(object sender, StreamTransferProgressArgs args)
-        {
-            try
-            {
-                var currentData = Math.Round(args.TransferredBytes * 100d / args.TotalBytes, 3);
-                Debug.WriteLine("ProgressCallback - TotalBytes:{0}M, TransferredBytes:{1}M,上传百分比:{2}%",
-                    args.TotalBytes / 1024 / 1024, args.TransferredBytes / 1024 / 1024, currentData);
-                windown?.Update(currentData);
-                if (currentData >= 100d && windown.Count == windown.Cur)
-                {
-                    //MessageBox.Show("数据上传完毕!");
-                    CloseDownloadWin(true, false);
-                }
-            }
-            catch (Exception ex)
-            {
-
-                throw;
-            }
-        }
-        /// <summary>
         /// 关闭下载窗口
         /// </summary>
         public static void CloseDownloadWin(bool issucess, bool hasTip = true)
@@ -456,7 +431,7 @@ namespace SAGA.MBI.RequestData
         {
             if (!UpLoadFileRequest.UseOss())
             {
-                return FileContentTransferUnit.UpLoadRevitAsync(floorName, filePath, fileName,count,cur);
+                return FileContentTransferUnit.UpLoadRevitAsync(floorName, filePath, fileName, count, cur);
             }
             bool result = true;
             string key = $"{MBIConst.OssClientFileKey}{fileName}";
@@ -485,7 +460,7 @@ namespace SAGA.MBI.RequestData
                         MailLog.Log("上传MD5异常", errorMessage);
                         MessageShowBase.Infomation(errorMessage);
                         //不关闭窗体
-                       // throw new Exception(errorMessage);
+                        // throw new Exception(errorMessage);
                     }
 
                     #endregion
@@ -497,10 +472,13 @@ namespace SAGA.MBI.RequestData
             {
                 MessageShowBase.Infomation("Revit文件上传载失败!\r\n" + ex.Message + "\r\n" + ex.StackTrace);
                 result = false;
-                CloseUploadWindow(result,false);
+                CloseUploadWindow(result, false);
             }
             return result;
         }
+
+        //减少刷新界面次数,一兆更新一次
+        private static int m_TransferredMB = 0;
         /// <summary>
         /// 上传进度条
         /// </summary>
@@ -509,9 +487,13 @@ namespace SAGA.MBI.RequestData
         private static void StreamProgressCallback(object sender, StreamTransferProgressArgs args)
         {
             var currentData = Math.Round(args.TransferredBytes * 100d / args.TotalBytes, 3);
-            Debug.WriteLine("ProgressCallback - TotalBytes:{0}M, TransferredBytes:{1}M,上传百分比:{2}%",
-        args.TotalBytes / 1024 / 1024, args.TransferredBytes / 1024 / 1024, currentData);
-            win?.Update(currentData);
+            var transferredMb = (args.TransferredBytes / 1024 / 1024).ToDouble().RoundDown();
+            if (transferredMb != m_TransferredMB)
+            {
+                win?.Update(currentData);
+                m_TransferredMB = transferredMb;
+            }
+
             if (currentData >= 100d)
             {
                 CloseUploadWindow(true, false);

+ 9 - 0
MBI/SAGA.MBI/SAGA.MBI.csproj

@@ -274,6 +274,7 @@
     <Compile Include="Common\CacheAspect.cs" />
     <Compile Include="Common\EquipmentCodeMap.cs" />
     <Compile Include="Common\MailLog.cs" />
+    <Compile Include="Common\MBIElementUtils.cs" />
     <Compile Include="Common\MessageManager.cs" />
     <Compile Include="Common\PhaseUtil.cs" />
     <Compile Include="Common\RegexConstPattern.cs" />
@@ -330,6 +331,10 @@
     <Compile Include="Service\InputService.cs" />
     <Compile Include="Test\CopyParameterValue.cs" />
     <Compile Include="Test\CopyWallLocalName.cs" />
+    <Compile Include="Test\RenameSystemName.cs" />
+    <Compile Include="Test\WinRenameConfig.xaml.cs">
+      <DependentUpon>WinRenameConfig.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Test\WinParameterDic.xaml.cs">
       <DependentUpon>WinParameterDic.xaml</DependentUpon>
     </Compile>
@@ -757,6 +762,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="Test\WinRenameConfig.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Test\WinParameterDic.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>

+ 141 - 0
MBI/SAGA.MBI/Test/RenameSystemName.cs

@@ -0,0 +1,141 @@
+/* ==============================================================================
+ * 功能描述:RenameSystemName  
+ * 创 建 者:Garrett
+ * 创建日期:2019/6/20 9:11:31
+ * ==============================================================================*/
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Autodesk.Revit.DB;
+using Autodesk.Revit.DB.Electrical;
+using Autodesk.Revit.DB.Plumbing;
+using SAGA.DotNetUtils.Extend;
+using SAGA.DotNetUtils.NPOI;
+using SAGA.DotNetUtils.Others;
+using SAGA.MBI.Model;
+using SAGA.MBI.Tools;
+using SAGA.MBI.ToolsData;
+using SAGA.RevitUtils.Extends;
+
+namespace SAGA.MBI.Test
+{
+    /// <summary>
+    /// RenameSystemName
+    /// </summary>
+    class RenameSystemName : IDataCorrect
+    {
+        public string Execute(MFloor floor)
+        {
+            try
+            {
+                string fullPah = floor.FullPath;
+                Document doc = ExternalDataWrapper.Current.UiApp.Application.OpenDocumentFile(fullPah);
+                //OperateFloor(doc);
+                doc.Save();
+            }
+            catch (Exception e)
+            {
+                MessageShowBase.Show(e);
+            }
+            return null;
+        }
+
+        public string ExecuteAll()
+        {
+            throw new NotImplementedException();
+        }
+
+        private static void OperateFloor(string fullPah, List<Ref_RenameSystem> refRenameSystems)
+        {
+            var doc= ExternalDataWrapper.Current.UiApp.Application.OpenDocumentFile(fullPah);
+            using (Transaction trans = new Transaction(doc, "重命名系统名称"))
+            {
+                trans.Start();
+
+                try
+                {
+                    var types = doc.GetElements(typeof(MEPSystemType));
+                    types.AddRange(doc.GetElements(typeof(CableTrayType)));
+                    foreach (ElementType type in types)
+                    {
+                        string typeName = type.Name;
+                        var refPair=refRenameSystems.FirstOrDefault(t => t.OldName == typeName);
+                        if (refPair != null)
+                        {
+                            type.Name = refPair.NewName;
+                        }
+                    }
+
+                    trans.Commit();
+                }
+                catch (Exception e)
+                {
+                    Console.WriteLine(e);
+                    trans.RollBack();
+                }
+            }
+
+            doc.CloseDoc();
+        }
+
+        public void Operate(string referPath,string revitDir)
+        {
+            var refPairs = GetReferencePairs(referPath);
+            if (!refPairs.Any()) return;
+            var list = GetRevitFiles(revitDir);
+            if (!list.Any()) return;
+            foreach (string fullPath in list)
+            {
+                OperateFloor(fullPath, refPairs);
+            }
+        }
+        /// <summary>
+        /// 获取需要修改的Revit文件
+        /// </summary>
+        /// <param name="revitDir"></param>
+        /// <returns></returns>
+        private static List<string> GetRevitFiles(string revitDir)
+        {
+            DirectoryInfo directory=new DirectoryInfo(revitDir);
+            List<string> list=new List<string>();
+            try
+            {
+                list=directory.GetFiles("*.rvt").Where(t=>!t.FullName.Is000File()).Select(t=>t.FullName).ToList();
+            }
+            catch (Exception e)
+            {
+                Console.WriteLine(e);
+                
+            }
+
+            return list;
+        }
+
+        /// <summary>
+        /// 参考-表
+        /// </summary>Sheet1
+        [SheetInfo(SheetName = "Sheet1", RowStartIndex = 3)]
+        public class Ref_RenameSystem
+        {
+            [CellIndex(2)]
+            public string OldName { get; set; }
+
+            [CellIndex(3)]
+            public string NewName { get; set; }
+        }
+
+        /// <summary>
+        /// 获取可识别的管道系统名称
+        /// </summary>
+        /// <returns></returns>
+        private static List<Ref_RenameSystem> GetReferencePairs(string path)
+        {
+            var list = NPOIHelper
+                .ConvertExcelSheetToModel<Ref_RenameSystem>(path);
+            return list;
+        }
+    }
+}

+ 3 - 2
MBI/SAGA.MBI/Test/WinParameterDic.xaml

@@ -1,9 +1,10 @@
-<Window x:Class="SAGA.MBI.Test.WinParameterDic"
+<windows:WinBase x:Class="SAGA.MBI.Test.WinParameterDic"
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:SAGA.MBI.Test"
+             xmlns:windows="clr-namespace:SAGA.RevitUtils.Windows;assembly=SAGA.RevitUtils"
              mc:Ignorable="d" Title="配置参数" WindowStartupLocation="CenterScreen"
                   Height="300" Width="400">
     <Window.Resources>
@@ -89,5 +90,5 @@
             <Button Height="24" Width="100" Content="取消" Margin="10,0" IsCancel="True"></Button>
         </WrapPanel>
     </Grid>
-</Window>
+</windows:WinBase>
 

+ 56 - 0
MBI/SAGA.MBI/Test/WinRenameConfig.xaml

@@ -0,0 +1,56 @@
+<windows:WinBase x:Class="SAGA.MBI.Test.WinRenameConfig"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:SAGA.MBI.Test"
+        xmlns:wpf="clr-namespace:SAGA.DotNetUtils.WPF.UserControl;assembly=SAGA.DotNetUtils"
+        xmlns:windows="clr-namespace:SAGA.RevitUtils.Windows;assembly=SAGA.RevitUtils"
+        mc:Ignorable="d" Title="系统重命名参数设置" WindowStartupLocation="CenterScreen"
+                  Height="200" Width="400">
+    <Window.Resources>
+        <Style  TargetType="TextBox">
+            <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
+            <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+            <Setter Property="Height" Value="24"></Setter>
+        </Style>
+        <Style TargetType="DataGridColumnHeader">
+            <Setter Property="Height" Value="25"></Setter>
+            <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
+            <Setter Property="VerticalContentAlignment" Value="Center"></Setter>
+        </Style>
+        <Style x:Key="dgtextblock">
+            <Setter Property="TextBlock.Height" Value="25"></Setter>
+            <Setter Property="TextBlock.HorizontalAlignment" Value="Center"></Setter>
+        </Style>
+        <Style x:Key="dgtextbox">
+            <Setter Property="TextBox.Height" Value="25"></Setter>
+            <Setter Property="TextBox.HorizontalContentAlignment" Value="Center"></Setter>
+        </Style>
+    </Window.Resources>
+    <Grid Margin="5">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="50"></RowDefinition>
+            <RowDefinition></RowDefinition>
+            <RowDefinition Height="50"></RowDefinition>
+        </Grid.RowDefinitions>
+        <Grid Grid.Row="0">
+            <StackPanel>
+                <Label Content="请选择重命名系统的参考表:"></Label>
+                <wpf:SelectFile_Hyperlink Height="25" Text="{Binding Path=ReferenceFilePath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" IsDisplayFullPath="True"></wpf:SelectFile_Hyperlink>
+            </StackPanel>
+        </Grid>
+        <Grid Grid.Row="1">
+            <StackPanel>
+                <Label Content="请选择需要修改的Revit文件夹:"></Label>
+                <wpf:SelectPath Height="25" Text="{Binding Path=RevitDirs,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" ButtonPosition="End"></wpf:SelectPath>
+            </StackPanel>
+        </Grid>
+
+        <WrapPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center">
+            <Button Height="24" Width="100" Content="执行" Margin="10,0" IsDefault="True" Click="ButtonBase_OnClick"></Button>
+            <Button Height="24" Width="100" Content="取消" Margin="10,0" IsCancel="True"></Button>
+        </WrapPanel>
+    </Grid>
+</windows:WinBase>
+

+ 82 - 0
MBI/SAGA.MBI/Test/WinRenameConfig.xaml.cs

@@ -0,0 +1,82 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Exception = System.Exception;
+
+namespace SAGA.MBI.Test
+{
+    /// <summary>
+    /// WinParameterDic.xaml 的交互逻辑
+    /// </summary>
+    public partial class WinRenameConfig : INotifyPropertyChanged
+    {
+        public WinRenameConfig()
+        {
+            InitializeComponent();
+            this.DataContext = this;
+        }
+
+        #region Binding
+        
+
+        private string m_ReferenceFilePath;
+
+        public string ReferenceFilePath
+        {
+            get { return m_ReferenceFilePath; }
+            set
+            {
+                m_ReferenceFilePath = value;
+                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ReferenceFilePath)));
+            }
+        }
+
+        private string m_RevitDirs;
+
+        public string RevitDirs
+        {
+            get { return m_RevitDirs; }
+            set
+            {
+                m_RevitDirs = value;
+                PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(RevitDirs)));
+            }
+        }
+
+
+        #endregion
+
+
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
+        {
+            try
+            {
+
+            }
+            catch (Exception exception)
+            {
+                Console.WriteLine(exception);
+
+            }
+
+            this.DialogResult = true;
+        }
+
+        
+    }
+}

+ 38 - 0
MBI/SAGA.MBI/ToolCommand.cs

@@ -315,6 +315,44 @@ namespace SAGA.MBI
             return true;
         }
     }
+
+    /// <summary>
+    /// 重命名系统名称
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    [Regeneration(RegenerationOption.Manual)]
+    public class RenameSystemNameCommand : ExternalCommand
+    {
+        public override Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            try
+            {
+                var iDataCorrect = SingleInstance<RenameSystemName>.Instance;
+                if (true)
+                {
+                    WinRenameConfig win = new WinRenameConfig();
+                    if (win.ShowDialog() == true)
+                    {
+                        iDataCorrect.Operate(win.ReferenceFilePath, win.RevitDirs);
+                        MessageShowBase.Infomation("系统名称已修改,请检查");
+                    }
+                }
+
+
+            }
+            catch (Exception e)
+            {
+                MessageShow.Show(e);
+                return Result.Cancelled;
+            }
+            return Result.Succeeded;
+        }
+
+        public override bool IsCommandAvailable(UIApplication applicationData, CategorySet selectedCategories)
+        {
+            return true;
+        }
+    }
     #endregion
 
     #region 数据修正

+ 2 - 2
MBI/SAGA.MBI/ToolsData/ModeCheck/DataCheckRule.cs

@@ -119,9 +119,9 @@ namespace SAGA.MBI.ToolsData.ModeCheck
     [SheetInfo(SheetName = "参考-管网及相关设备", RowStartIndex = 3)]
     public class DCR_SystemReferEquip
     {
-        [CellIndex(4)]
+        [CellIndex(3)]
         public string SystemName { get; set; }
-        [CellIndex(5)]
+        [CellIndex(4)]
         public string ReferEquipName { get; set; }
 
         private List<string> m_Equips;

+ 2 - 2
MBI/SAGA.MBI/WinView/Login/WinSelectProjectPath.xaml

@@ -19,9 +19,9 @@
             Canvas.Left="30"
             Canvas.Top="20"
             Content="请选择本项目对应的工作区文件夹"></Label>
-        <wpf:SelectPath_Start x:Name="btnSelectPath" Canvas.Top="70" Canvas.Left="30" Width="190" Height="24"
+        <wpf:SelectPath x:Name="btnSelectPath" Canvas.Top="70" Canvas.Left="30" Width="190" Height="24"
                               Text="{Binding Path=ProjectPath,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
-                              BtnImage="{Binding Path=OFImage,Converter={StaticResource StringToImageConverter}}"></wpf:SelectPath_Start>
+                              BtnImage="{Binding Path=OFImage,Converter={StaticResource StringToImageConverter}}"></wpf:SelectPath>
         <Label Canvas.Left="221" Canvas.Top="69" 
                Content="\"></Label>
         <Label Canvas.Left="228" Canvas.Top="69" 

+ 40 - 2
MBI/SAGA.Revit.sln

@@ -63,6 +63,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestCommand", "TestCommand\
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolCommand", "ToolCommand\ToolCommand.csproj", "{5F2C216B-F298-4D86-A768-900BFFFEA91F}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceRevitLib", "ServiceRevitLib\ServiceRevitLib.csproj", "{7B748B09-DC20-4406-85A3-101E7833F8CE}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -731,8 +733,8 @@ Global
 		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R17|x64.Build.0 = Release|Any CPU
 		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R17|x86.ActiveCfg = Release|Any CPU
 		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R17|x86.Build.0 = Release|Any CPU
-		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R18|Any CPU.ActiveCfg = Release|Any CPU
-		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R18|Any CPU.Build.0 = Release|Any CPU
+		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R18|Any CPU.ActiveCfg = Release|x64
+		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R18|Any CPU.Build.0 = Release|x64
 		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R18|x64.ActiveCfg = Release|Any CPU
 		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R18|x64.Build.0 = Release|Any CPU
 		{6449F956-11A3-4207-AE0F-9AB8563DFDCE}.R18|x86.ActiveCfg = Release|Any CPU
@@ -928,6 +930,42 @@ Global
 		{5F2C216B-F298-4D86-A768-900BFFFEA91F}.RR17|x64.Build.0 = Release|Any CPU
 		{5F2C216B-F298-4D86-A768-900BFFFEA91F}.RR17|x86.ActiveCfg = Release|Any CPU
 		{5F2C216B-F298-4D86-A768-900BFFFEA91F}.RR17|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|x64.ActiveCfg = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|x64.Build.0 = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Debug|x86.Build.0 = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|Any CPU.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|Any CPU.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R16|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|Any CPU.ActiveCfg = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|Any CPU.Build.0 = Debug|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R17|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|Any CPU.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|Any CPU.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.R18|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|Any CPU.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.Release|x86.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|Any CPU.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|Any CPU.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|x64.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|x64.Build.0 = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|x86.ActiveCfg = Release|Any CPU
+		{7B748B09-DC20-4406-85A3-101E7833F8CE}.RR17|x86.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 4 - 4
MBI/SAGA.RevitUtils/Windows/WinBase.cs

@@ -70,8 +70,8 @@ namespace SAGA.RevitUtils.Windows
             this.CurWindowHandle = winHelper.Handle;
 
             //由于窗体经常跑到屏幕外面,取消保存历史记录 mxg 20181030
-            //var datas = new List<SaveData>();
-            //if (IsLoadHistroyData) this.SetControlData(out datas);
+            var datas = new List<SaveData>();
+            if (IsLoadHistroyData) this.SetControlData(out datas);
             //SetWindowPosition(datas);
 
             if (Resources != null)
@@ -173,8 +173,8 @@ namespace SAGA.RevitUtils.Windows
         {
             StopTimer();
             base.OnClosed(e);
-            //var datas = new List<SaveData>() { GetLocationSaveData() };
-            //this.SaveControlData(datas);
+            var datas = new List<SaveData>() { GetLocationSaveData() };
+            this.SaveControlData(datas);
         }
 
         /// <summary>

+ 1 - 1
MBI/WPG/UserControls/UcHyperlink.xaml.cs

@@ -15,7 +15,7 @@ using WPG.Data;
 namespace WPG.UserControls
 {
     /// <summary>
-    /// SelectPath_Start.xaml 的交互逻辑
+    /// SelectPath.xaml 的交互逻辑
     /// </summary>
     public partial class UcHyperlink
     {

+ 1 - 1
MBI/WPG/UserControls/UcPopups_Nameplate.xaml.cs

@@ -15,7 +15,7 @@ using WPG.Data;
 namespace WPG.UserControls
 {
     /// <summary>
-    /// SelectPath_Start.xaml 的交互逻辑
+    /// SelectPath.xaml 的交互逻辑
     /// </summary>
     public partial class UcPopups_Nameplate
     {