Jump to: navigation, search

Changes


HowTo:Inject UI into UBIK Studio

637 bytes added, Wednesday at 07:44
[[File:InjectedButton.png|thumb|left|290px|Injected button]]<br><br><br><br><br><br><br><br><br><br><br>
=== Implementation ===
1. Paste your Create or reuse a .Net library (DLL) project - it doesn't have to be a {{UBIK}} Module.<br>2. Add the designated window as a class deriving from System.Windows.Window in to the plugin solutionproject.<br>23. Create a new class that implements .<br>4. Implement the inferface IUBIKWindowFactoryfor the new class.<br>5. For automatic injection, add the "Export" Attribute with the "IUBIKWindowFactory" type parameter to the designated class.<br>
<syntaxhighlight lang="csharp">
[Export(typeof(IUBIKWindowFactory))]
public class TestWindowFactory : IUBIKWindowFactory
{
public Bitmap Icon => ImageProperties.Resources.IntelligentAtelierImage;
public string Label => "Test"Properties.Resources.IntelligentAtelierLabel;
public Window GetWindow(UBIKEnvironment env)
}
</syntaxhighlight>
36. Assign values to the "The class now has a Icon" and "Lable" Label property.<br>7. Set the values for both properties they will . The icon and label can be used for loaded directly from the .NET project's resources. The buttonand the menu entry will then display these values.<br>4. In the GetWindow Method method, return the window that you moved to the solutionfrom step 2.<br>57. After making Provide the changes, make sure to update the plugin updated DLL containing your UserControl in the injection UBIKĀ® Studio's [[Injection_Management#Injection_Folder.28s.29|Injection]] folder.<br>68. When starting {{UBIK}} After connecting to a database with UBIKĀ® Studio , the new control can be accessed by the new button will show up in the tool baraswell as under menu entry "View".<br><br>
<!-- DO NOT REMOVE THIS -->{{Template:HowTo/End}}<!-- DO NOT REMOVE THIS -->
283
edits