Wrap a Java Applet as a custom LightSwitch control
Here is a brief video tutorial of how to write a custom LightSwitch
control, that supports data binding and displays a chemical structure.
Here is a brief video tutorial of how to write a custom LightSwitch
control, that supports data binding and displays a chemical structure.
Posted by
Andriy
at
13:41
1 comments
I have been playing around with LightSwitch recently. It works well with ad-hoc database or Microsoft SQL Server. Because we have mostly Oracle as DBMS, that was the first question that I was occupied with, how do I connect it with some other than Microsoft DB?
Well, theoretically there should be two ways to connect to non-MS databases:
using System.Transactions;
// ...
public partial class MyData_ODPNETService
{
private TransactionScope _tscope;
partial void SaveChanges_Executing()
{
_tscope = new TransactionScope(TransactionScopeOption.Required,
new TransactionOptions { IsolationLevel = System.Transactions.IsolationLevel.ReadCommitted });
}
partial void SaveChanges_Executed()
{
_tscope.Complete();
_tscope.Dispose();
}
}
Posted by
Andriy
at
13:50
0
comments
Posted by
Andriy
at
09:44
0
comments
Labels: LightSwitch, Microsoft
In the last couple of days I was occupied with a at the fist glance trivial task. I had to evaluate a possibility of using a .NET control for presentation of chemical formulas in Delphi. "So what's the matter, there is a .NET import wizard in Delphi" was my first thought. That would have been very easy, almost unbelievable, if worked at first attempt. The problem was, that the assembly was not compiled COM visible and thus not usable in Delphi. So here are the steps I had to make to achieve the desired result:
[ComVisible(true)]
[Guid("f5df04c4-2bdf-4e5c-ba0d-c3464eabf9be")]
[ProgId("WindowsFormsControlLibrary1.UserControl1")]
////// Register the class as a control and set it's CodeBase entry /// /// /// The registry key of the control [ComRegisterFunction()] public static void RegisterClass(string key) { // Strip off HKEY_CLASSES_ROOT\ from the passed key as I don't need it StringBuilder sb = new StringBuilder(key); sb.Replace(@"HKEY_CLASSES_ROOT\", ""); // Open the CLSID{guid} key for write access RegistryKey k = Registry.ClassesRoot.OpenSubKey(sb.ToString(), true); // And create the 'Control' key - this allows it to show up in // the ActiveX control container RegistryKey ctrl = k.CreateSubKey("Control"); ctrl.Close(); // Next create the CodeBase entry - needed if not string named and GACced. RegistryKey inprocServer32 = k.OpenSubKey("InprocServer32", true); inprocServer32.SetValue("CodeBase", Assembly.GetExecutingAssembly().CodeBase); inprocServer32.Close(); // Finally close the main key k.Close(); } /// ////// Called to unregister the control /// /// /// Tke registry key [ComUnregisterFunction()] public static void UnregisterClass(string key) { StringBuilder sb = new StringBuilder(key); sb.Replace(@"HKEY_CLASSES_ROOT\", ""); // Open HKCR\CLSID{guid} for write access RegistryKey k = Registry.ClassesRoot.OpenSubKey(sb.ToString(), true); // Delete the 'Control' key, but don't throw an exception if it does not exist k.DeleteSubKey("Control", false); // Next open up InprocServer32 RegistryKey inprocServer32 = k.OpenSubKey("InprocServer32", true); // And delete the CodeBase key, again not throwing if missing k.DeleteSubKey("CodeBase", false); // Finally close the main key k.Close(); }
Posted by
Andriy
at
11:29
0
comments
We are using FinalBuilder as continuous integration platform developing our in-house application framework. Documentation was built with Sandcastle. A Sandcastle Help File Builder project was executed in FinalBuilder as "Run DOC Command / Batch File" action with specific parameters defining build options.
But that was not very nice in regard to that FinalBuilder has specially designed actions to support Sandcastle, BuildAssembler, MRefBuilder, XslTransform:
Posted by
Andriy
at
09:01
0
comments
Labels: FinalBuilder
Posted by
Andriy
at
12:00
0
comments
migrating to Spring Security in a JSF application. There seems to be a way. Going deep into Spring code and debug crazily helps to get understanding what's going on there. I'll post some more info, tricks and important details as soon as I have the complete solution. But I'm very optimistic now !
Posted by
Andriy
at
14:51
0
comments
Posted by
Andriy
at
12:47
0
comments
Posted by
Andriy
at
17:36
0
comments