![]() |
#1 |
Участник
|
First of all, thank you all who attended my session today. It was a lot of people in the room, and with the competition from Microsoft talking about a very hot topic in the other, bigger room, I really wouldn’t expect to see all of you there. I hope you found the things you saw useful, and that you’ll take advantage of all the free stuff that I am posting today here on Vjeko.com.
This time I’ll split it up in different files, to make it more manageable. </h3><h3> Tweaking Page UI First things first, so I start with the new “Semi-transparent Borderless Draggable Styleful Standard Dialog” page type, which in fact is not a page type but a control add-in that abuses the openness of .NET Framework to the fullest. If you have not been at the presentation, this is what it looks like: ![]() And yes, it really is a page object. And it’s an extremely simple trick. You only need to call the FindForm method on the control you instantiate, and then you can do whatever you would normally be able to do with a System.Windows.Form object. Make it semitransparent. Hide the borders. Paint it in pink or something. The code is ugly, completely optimized, dumped with a shovel and then mixed and stirred with a bazooka, it was written for the better part of it at 2 o’clock in the morning, but it proves the point. I am thinking of providing a framework which would allow you to do all those things in a more proper way that I wouldn’t be ashamed to put here, as I am to put the stuff that I’ve just put. You can download this demo here: http://vjeko.com/wp-content/uploads/2014/11/VjekoCom.FormTweaker.zip Drag & Drop, and BingMaps Add-ins Then we have the Drag and Drop demo, and the BingMaps demo. I have reused my own code from earlier, so I am simply linking back to the previous demo: http://vjeko.com/blog/directions-emea-2014-content About the Drag and Drop thing, feel free to use it as you like, and about the BingMaps demo, most of the code in there comes from Microsoft’s own blogs and demos, and I am pretty sure you are okay to reuse it as you like. Auto-Register For Control Add-ins The next on the list is the auto-register utility. It taps into Codeunit 1, automatically registers the add-in in the Client Add-ins table, and also automatically downloads the resource from your URL if it’s not present in the Client Add-ins. This makes sure that the control is always in place when you run an object that uses it. Download the bits here: http://vjeko.com/wp-content/uploads/2014/11/AutoRegister.zip Visual Studio Templates The next are the two templates. You can use those templates in Visual Studio to quickly create JavaScript control add-ins, that automatically deploy themselves into the Client Add-ins folder, show their public key token in the Output window, and include all the structure for the resource zip file (manifest, scripts, and stylesheets). You install the templates simply by copying them to your DocumentsVisual Studio 2013TemplatesProjectTemplates folder. There is the simple template that includes just the mere basics, the simple interface with most basic events and methods. And there is of course the advanced template which includes the full framework (I’ll proudly call it VjekoCom.Extensibility framework ![]() Download the simple template here: http://vjeko.com/wp-content/uploads/2014/11/Microsoft-Dynamics-NAV-2015-Simple-Extensibility-Control.zip Download the advanced template here: http://vjeko.com/wp-content/uploads/2014/11/Microsoft-Dynamics-NAV-2015-Advanced-Control-Add-in.zip This advanced template is obviously work in progress, there are so many more things to be added to it, and I hope, I just hope this time it doesn’t remain at “if I have time I’ll build on top” as it happened with so many good and useful stuff I have here, and that I really turn this into a decent framework, worth sharing on CodeProject, or GitHub. or if I really have time, on NuGet. VjekoCom.Extensibility Framework And last but not least there is this advanced template demo, that shows the full scale of possibilities with the VjekoCom.Extensibility framework, it shows how to use the OnReadyToReceiveControlDefinition, OnChangeData, and OnJavaScriptCodeExecuted events, and how to call SendControlDefinitionToJavaScript, UpdateCss, and ExecuteJavaScript methods. In this example, C/AL creates a simple text box control with a caption in red, that changes to green and updates NAV on content change, and then C/AL executes some JavaScript code and gets notified of the completion. And this last part is available here: http://vjeko.com/wp-content/uploads/2014/11/Extensibility_Test_Page.zip That’s All, Folks… Once again, thanks for joining my session. Please let me know if you found it useful, and if any of this content and demos helps you in your everyday work. See you in the cloud, and definitely next year in Antwerp again! Read this post at its original location at http://vjeko.com/blog/goodies-contro...-techdays-2014, or visit the original blog at http://vjeko.com. 5e33c5f6cb90c441bd1f23d5b9eeca34The post Goodies from the Control Add-ins session at NAV TechDays 2014 appeared first on Vjeko.com. Читать дальше
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|