-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from ricaun-io/develop
Version 0.6.2
- Loading branch information
Showing
11 changed files
with
149 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<Version>0.6.1</Version> | ||
<Version>0.6.2</Version> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using Autodesk.Revit.UI; | ||
using ricaun.Revit.UI.Example.Proprieties; | ||
using System.Linq; | ||
|
||
namespace ricaun.Revit.UI.Example.Revit | ||
{ | ||
[AppLoader] | ||
public class AppList : IExternalApplication | ||
{ | ||
private static RibbonPanel ribbonPanel; | ||
public Result OnStartup(UIControlledApplication application) | ||
{ | ||
ribbonPanel = application.CreatePanel("List"); | ||
|
||
PushButtonData[] NewButtons(int number) | ||
{ | ||
var itens = Enumerable.Range(1, number).Select(i => | ||
ribbonPanel.NewPushButtonData<Commands.Command>($"{i}") | ||
.SetToolTip($"{i}") | ||
.SetToolTip(Icons.Icon.ToString()) | ||
.SetLargeImage(Icons.Icon) | ||
); | ||
return itens.ToArray(); | ||
} | ||
|
||
var pulldownButton = ribbonPanel.CreatePulldownButton("PulldownButton", NewButtons(3)) | ||
.SetLargeImage(Icons.Icon) | ||
.SetListImageSize(); | ||
|
||
var splitButton = ribbonPanel.CreateSplitButton("PulldownButton", NewButtons(3)) | ||
.SetListImageSize(); | ||
|
||
return Result.Succeeded; | ||
} | ||
|
||
public Result OnShutdown(UIControlledApplication application) | ||
{ | ||
ribbonPanel?.Remove(); | ||
return Result.Succeeded; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
ricaun.Revit.UI.Tests/Items/Items/RevitPulldownButtonTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Autodesk.Revit.UI; | ||
using NUnit.Framework; | ||
|
||
namespace ricaun.Revit.UI.Tests.Items.Items | ||
{ | ||
public class RevitPulldownButtonTests : BaseCreatePanelTests | ||
{ | ||
protected PulldownButton pulldownButton; | ||
protected Autodesk.Windows.RibbonSplitButton RibbonSplitButton => pulldownButton.GetRibbonItem<Autodesk.Windows.RibbonSplitButton>(); | ||
[SetUp] | ||
public void CreatePulldownButton() | ||
{ | ||
pulldownButton = ribbonPanel.CreatePulldownButton(); | ||
} | ||
|
||
[Test] | ||
public void SetListImageSize_ShouldBe_Standard() | ||
{ | ||
Autodesk.Windows.RibbonImageSize imageSize = Autodesk.Windows.RibbonImageSize.Standard; | ||
pulldownButton.SetListImageSize(); | ||
Assert.AreEqual(imageSize, RibbonSplitButton.ListImageSize); | ||
} | ||
|
||
[Test] | ||
public void SetListImageSize_ShouldBe() | ||
{ | ||
Autodesk.Windows.RibbonImageSize imageSize; | ||
|
||
imageSize = Autodesk.Windows.RibbonImageSize.Standard; | ||
pulldownButton.SetListImageSize(imageSize); | ||
Assert.AreEqual(imageSize, RibbonSplitButton.ListImageSize); | ||
|
||
imageSize = Autodesk.Windows.RibbonImageSize.Large; | ||
pulldownButton.SetListImageSize(imageSize); | ||
Assert.AreEqual(imageSize, RibbonSplitButton.ListImageSize); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters