diff --git a/RookieStation/CommonTools/ExecuteCmd/CmdChangeBackgroundColor.cs b/RookieStation/CommonTools/ExecuteCmd/CmdChangeBackgroundColor.cs new file mode 100644 index 0000000..74f8a53 --- /dev/null +++ b/RookieStation/CommonTools/ExecuteCmd/CmdChangeBackgroundColor.cs @@ -0,0 +1,32 @@ +using Autodesk.Revit.DB; +using Autodesk.Revit.UI; +using Autodesk.Revit.UI.Selection; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace RookieStation.CommonTools.ExecuteCmd +{ + [Autodesk.Revit.Attributes.Transaction(Autodesk.Revit.Attributes.TransactionMode.Manual)] + [Autodesk.Revit.Attributes.Regeneration(Autodesk.Revit.Attributes.RegenerationOption.Manual)] + internal class CmdChangeBackgroundColor : IExternalCommand + { + public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) + { + UIApplication uiapp = commandData.Application; + UIDocument uidoc = commandData.Application.ActiveUIDocument; + Color col = uiapp.Application.BackgroundColor; + if (col.Red == 255 && col.Green == 255 && col.Blue == 255) + { + uiapp.Application.BackgroundColor = new Color(32, 40, 49); + } + else + { + uiapp.Application.BackgroundColor = new Color(255, 255, 255); + } + return Result.Succeeded; + } + } +} \ No newline at end of file diff --git a/RookieStation/CommonTools/Views/WpfFamilyDockablePane.xaml b/RookieStation/CommonTools/Views/WpfFamilyDockablePane.xaml index 749d6b9..9d68721 100644 --- a/RookieStation/CommonTools/Views/WpfFamilyDockablePane.xaml +++ b/RookieStation/CommonTools/Views/WpfFamilyDockablePane.xaml @@ -56,7 +56,7 @@ VerticalAlignment="Stretch" hc:InfoElement.Placeholder="请输入搜索的族文件名" FontFamily="{StaticResource IconFont}" - TextChanged="tbSearch_TextChanged" /> + TextChanged="TbSearch_TextChanged" />