-
-
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 #6 from ricaun-io/develop
Version 1.0.0
- Loading branch information
Showing
18 changed files
with
93 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"$schema": "./build.schema.json", | ||
"Solution": "../Revit.Busy.sln" | ||
"Solution": "../ricaun.Revit.UI.Busy.sln" | ||
} |
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.2.2</Version> | ||
<Version>1.0.0</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,92 @@ | ||
# Revit.Busy | ||
# ricaun.Revit.UI.Busy | ||
|
||
[![Revit 2017](https://img.shields.io/badge/Revit-2017+-blue.svg)](../..) | ||
[![Visual Studio 2022](https://img.shields.io/badge/Visual%20Studio-2022-blue)](../..) | ||
[![Revit 2017](https://img.shields.io/badge/Revit-2017+-blue.svg)](https://github.com/ricaun-io/ricaun.Revit.UI.Busy) | ||
[![Visual Studio 2022](https://img.shields.io/badge/Visual%20Studio-2022-blue)](https://github.com/ricaun-io/ricaun.Revit.UI.Busy) | ||
[![Nuke](https://img.shields.io/badge/Nuke-Build-blue)](https://nuke.build/) | ||
[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) | ||
[![Build](../../actions/workflows/Build.yml/badge.svg)](../../actions) | ||
[![Build](https://github.com/ricaun-io/ricaun.Revit.UI.Busy/actions/workflows/Build.yml/badge.svg)](https://github.com/ricaun-io/ricaun.Revit.UI.Busy/actions) | ||
[![nuget](https://img.shields.io/nuget/v/ricaun.Revit.UI.Busy?logo=nuget&label=nuget&color=blue)](https://www.nuget.org/packages/ricaun.Revit.UI.Busy) | ||
|
||
`Revit.Busy` package provides a static control to manage the busy state of Revit using the `Idling` event. | ||
[![ricaun.Revit.UI.Busy](https://raw.githubusercontent.com/ricaun-io/ricaun.Revit.UI.Busy/develop/assets/ricaun.Revit.UI.Busy.png)](https://github.com/ricaun-io/ricaun.Revit.UI.Busy) | ||
|
||
`ricaun.Revit.UI.Busy` package provides a static control to monitor the busy state of Revit UI using the `Idling` event. | ||
|
||
This project was generated by the [ricaun.AppLoader](https://ricaun.com/AppLoader/) Revit plugin. | ||
|
||
## Exemple | ||
## RevitBusyControl | ||
|
||
`RevitBusyControl` is a static control to monitor the busy state of Revit UI using the `Idling` event, this class need to be initialized. | ||
|
||
### Initialize | ||
Static initialization of the `Revit.Busy` control. | ||
Static initialization of the `ricaun.Revit.UI.Busy` control. | ||
```c# | ||
UIControlledApplication application; | ||
RevitBusyControl.Initialize(application); | ||
``` | ||
|
||
### Binding | ||
### RevitBusyService | ||
The `RevitBusyService` class is available in the static `Control` property. | ||
```c# | ||
RevitBusyService revitBusyService = RevitBusyControl.Control; | ||
``` | ||
|
||
### IsRevitBusy | ||
To check if Revit is busy, use the `IsRevitBusy` property. | ||
```c# | ||
bool isRevitBuzy = RevitBusyControl.Control.IsRevitBusy; | ||
``` | ||
|
||
### Binding in wpf | ||
|
||
Binding to the `IsRevitBusy` property. | ||
To use binding with the static `RevitBusyControl` is needed to reference the assembly `ricaun.Revit.UI.Busy` or using the `http://schemas.revit.busy.com/2024/xaml/presentation` xmlns. | ||
```xml | ||
xmlns:busy="http://schemas.revit.busy.com/2024/xaml/presentation" | ||
``` | ||
|
||
The `IsRevitBusy` property can be used in the binding using the static `Control` with the `RevitBusyService`. | ||
|
||
```xml | ||
{Binding IsRevitBusy, Source={x:Static busy:RevitBusyControl.Control}} | ||
``` | ||
|
||
### RevitBusyService | ||
|
||
The `RevitBusyService` class provides a service to manage the busy state of Revit using the `Idling` event. | ||
```c# | ||
UIControlledApplication application; | ||
RevitBusyService revitBusyService = new RevitBusyService(application); | ||
``` | ||
|
||
The `RevitBusyService` need to be disposed to clear the `Idling` event. | ||
```c# | ||
revitBusyService.Dispose(); | ||
``` | ||
|
||
The `IsRevitBusy` property can be used to check if Revit is busy. | ||
```c# | ||
bool isRevitBuzy = revitBusyService.IsRevitBusy; | ||
``` | ||
|
||
The `INotifyPropertyChanged` is available in the `RevitBusyService` class. | ||
```c# | ||
revitBusyService.PropertyChanged += (sender, e) => | ||
{ | ||
if (e.PropertyName == nameof(revitBusyService.IsRevitBusy)) | ||
{ | ||
// Do something | ||
} | ||
}; | ||
``` | ||
|
||
The `SetInterval` method can be used to set the interval between checks; by default, the value is 1000 milliseconds. | ||
```c# | ||
revitBusyService.SetInterval(1000); | ||
``` | ||
|
||
## License | ||
|
||
This project is [licensed](LICENSE) under the [MIT License](https://en.wikipedia.org/wiki/MIT_License). | ||
|
||
--- | ||
|
||
Do you like this project? Please [star this project on GitHub](../../stargazers)! | ||
Do you like this project? Please [star this project on GitHub](https://github.com/ricaun-io/ricaun.Revit.UI.Busy/stargazers)! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions
4
Revit.Busy.Example/Revit/App.cs → ricaun.Revit.UI.Busy.Example/Revit/App.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
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
4 changes: 2 additions & 2 deletions
4
Revit.Busy.Example/Revit/Views/BusyView.xaml → ...UI.Busy.Example/Revit/Views/BusyView.xaml
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
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
2 changes: 1 addition & 1 deletion
2
Revit.Busy/Properties/AssemblyInfo.cs → ....Revit.UI.Busy/Properties/AssemblyInfo.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
using System; | ||
using System.Windows.Markup; | ||
[assembly: XmlnsPrefix("http://schemas.revit.busy.com/2024/xaml/presentation", "revit.busy")] | ||
[assembly: XmlnsDefinition("http://schemas.revit.busy.com/2024/xaml/presentation", "Revit.Busy")] | ||
[assembly: XmlnsDefinition("http://schemas.revit.busy.com/2024/xaml/presentation", "ricaun.Revit.UI.Busy")] |
File renamed without changes
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
2 changes: 1 addition & 1 deletion
2
Revit.Busy/RevitBusyControl.cs → ricaun.Revit.UI.Busy/RevitBusyControl.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
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