Skip to content

Commit

Permalink
add sub lib
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Apr 18, 2024
1 parent 9c32f1a commit 32c23fa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Test/TestEvaCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public class TestEvaCommand : IExternalCommand
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
{
MessageBox.Show("TestEvaCommand");
double plus = DependLib.Plus();
Console.WriteLine(plus);
MessageBox.Show(plus.ToString());
// string? value = DependLib.ShowDialogFolder();
// Console.WriteLine(value);
// MessageBox.Show(value.ToString());
return Result.Succeeded;
}
}
16 changes: 15 additions & 1 deletion Test2/DependLib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ public static class DependLib
{
public static double Plus()
{
return 2 + 6;
return 2 + 10;
}

public static string? ShowDialogFolder()
{
//ookii-dialogs-wpf
var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog();
dialog.Description = "Select a folder";
dialog.UseDescriptionForTitle = true;
dialog.ShowNewFolderButton = true;
if (dialog.ShowDialog() == true)
{
return dialog.SelectedPath;
}
return null;
}
}
}
1 change: 1 addition & 0 deletions Test2/Test2.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<PackageReference Include="coverlet.collector" Version="3.1.0" />
<PackageReference Include="Chuongmep.Revit.Api.RevitAPI" Version="$(RevitVersion).*" />
<PackageReference Include="Chuongmep.Revit.Api.RevitAPIUI" Version="$(RevitVersion).*" />
<PackageReference Include="Ookii.Dialogs.Wpf" Version="5.0.1" />
</ItemGroup>
<ItemGroup>
<Reference Include="PresentationFramework" />
Expand Down

0 comments on commit 32c23fa

Please sign in to comment.