﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Could someone expound on the Messaging component...</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 03:10:18 GMT</lastBuildDate><ttl>20</ttl><item><title>Could someone expound on the Messaging component...</title><link>http://forum.strataframe.net/FindPost942.aspx</link><description>I'm just getting into Strataframe... I've been working through a lot of the tutorials and I'm looking at the Messaging tutorial.  Could someone explain the benefits of the messaging component a little more? It looks cool! :cool:</description><pubDate>Tue, 26 Sep 2006 16:12:27 GMT</pubDate><dc:creator>StarkMike</dc:creator></item><item><title>RE: Could someone expound on the Messaging component...</title><link>http://forum.strataframe.net/FindPost3091.aspx</link><description>1) The messaging tables can be added to any database that is deployed with your application.&amp;nbsp; As for including the data with the localization tables, there is a new wizard in 1.5 that will create the deployment data packages (and add the localization tables) for both the localization and security.&lt;/P&gt;&lt;P&gt;2) You will not need to "point" your project to your DDT profile becase the DDT profile will contain the deployment data packages to gather the messages when a new package is created for the DDT.&lt;/P&gt;&lt;P&gt;3) When you set the solution preferences to point to a specific project, the localization type editors will search within the project for a key matching the key and/or value you specify.&amp;nbsp; Once the "LocalizationKey" property is set on a control, the control will retrieve the appropriate value at runtime for localization by searching with the localization store for the text value matching the key that is set as the LocalizationKey property.</description><pubDate>Tue, 26 Sep 2006 16:12:27 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Could someone expound on the Messaging component...</title><link>http://forum.strataframe.net/FindPost3073.aspx</link><description>A walkthrough on using SQL would be helpful also, I've been messing around with it all afternoon without much success.  Seems much better than using the XML.&lt;br&gt;
&lt;br&gt;
In particular, areas I could use how-to advice:&lt;br&gt;
1.  Database Deployment -&lt;br&gt;
  Where should messaging tables be built?  (Yes, I found an option to include them in my development DB, it added MessageItems and MessageLanguages.  Is this the correct approach?)&lt;br&gt;
  How do I go about deploying them?  Seperate Deployment data tasks for each? &lt;br&gt;
   If So - Suggestion for future:  Allow a single check box to deploy the language info w/ the language tables, as part of the task to add the message tables&lt;br&gt;
&lt;br&gt;
2.  Message Entry/Creation&lt;br&gt;
  So Ok, now I have a DB with the tables in it - How do I fill them in?&lt;br&gt;
   Open the Message Editor, how do I get it to use my "new" tables / database?  If I create a "New" project, it only seems to accept an  file path (Would expect option(s) for an existing DB to use).  If I switch the Database Location to my app DB, it fails in trying to use the "Common Repository"&lt;br&gt;
&lt;br&gt;
3.  What needs to be done to get the forms to work?&lt;br&gt;
  Sure, I can fill in the &lt;br&gt;
MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.SqlServer;&lt;br&gt;
MicroFour.StrataFrame.UI.Localization.MessageDataSourceKey = "MyDataSourceKey";&lt;br&gt;
   But this seems to be way too late, now I can't set the localization keys within the UI.  And doing them all by hand would quickly take this out of the usable category.  I did look for a "Localization Database", didn't really find a "localization settings object" or anything really like that.  The StrataFrame Project Prefs does allow specification of a Project, but doesn't seem to pick up the XML info, only reads values within the project.  I had tried using the "Common Repository", but they don't show up within the search in trying to assign them to a control - Is this by design?  The values ARE present in the XML, but the drilldown from localizationkey doesn't seem to be using the XML info, rather just the "local" project info...&lt;br&gt;
&lt;br&gt;
Messaging &amp; Localization area in the Help (Within UI Layer) doesn't seem to have much information as to what needs to be set up (From a developer level, at least) to get the project to use a data store within a database.&lt;br&gt;
&lt;br&gt;
So just really confused, I guess, hoping for some kind of guidance.&lt;br&gt;
&lt;br&gt;</description><pubDate>Tue, 26 Sep 2006 12:55:18 GMT</pubDate><dc:creator>Jim Schepflin</dc:creator></item><item><title>RE: Could someone expound on the Messaging component...</title><link>http://forum.strataframe.net/FindPost946.aspx</link><description>There are a number of benefits to the messaging.&amp;nbsp; There are two distinct reasons...localization (multi-lingual) and externally stored messages.&amp;nbsp; We add a third part, a custom messaging interface that replaces the ugly old fashioned MessageBox.&amp;nbsp; Our message box accepts rich text format or HTML and can be sized and supports items such as embedded images and&amp;nbsp;hyperlinks.&lt;/P&gt;&lt;P&gt;If you'll notice, there are two types of values in the messaging editor: Messages and Text Values.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/f84f0a58-7ca7-4665-9d08-ca33.jpg"&gt;&lt;/P&gt;&lt;P&gt;You can call our message box directly in code and hard code the message, or pull from a key (or record) that is created within a Localization and Messaging project.&amp;nbsp; The Messages type shown in the image above is the type used for our message box.&amp;nbsp; The Text Values encapsulate everything else, such as labels, title bars, broken rule messages, etc.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Example Message&lt;BR&gt;&lt;/STRONG&gt;You can get more details on the localization and messaging in the documentation under &lt;EM&gt;Contents -&amp;gt; UI Layer -&amp;gt; Messaging and Localization&lt;/EM&gt;.&amp;nbsp; But to emphasize my point I will create a quick message and show you how to call it.&amp;nbsp; In the Message Editor, you generally want to create a project for each application, but this can be setup however you would like.&amp;nbsp; In this case I created a messaging project called "MyProject" and I made sure to edit the "English" and set it as the "Default Region Code for Selected Language."&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/6bafc317-8eee-4e33-bad1-a690.jpg"&gt;&lt;/P&gt;&lt;P&gt;The output path is where the XML files that are generated will be created.&amp;nbsp; For this example, I just sent them to a temp folder, but you would generally want this to be a legitmate folder.&amp;nbsp; Once I create the profile, I click Save and modify the project. You can always add another language by clicking the properties icon to bring up the project properties.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/3b465526-b561-4be3-8a6d-a65e.jpg"&gt;&lt;/P&gt;&lt;P&gt;I am going to create a message with a key name of &lt;STRONG&gt;&lt;EM&gt;MyTestKey&lt;/EM&gt;&lt;/STRONG&gt;.&amp;nbsp; See the image below for the property settings.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/93842bc7-3467-4525-9266-5e21.jpg"&gt;&lt;/P&gt;&lt;P&gt;Save the message and let's export and call the message from code.&amp;nbsp; The messages will be exported to the path that we specified above in the Output path.&amp;nbsp; We specified c:\temp, so this is where the files will go for my example, adjust all paths below accordingly.&amp;nbsp; Also, if you are pulling the messages from SQL Server, there is no need to generate the XML files.&lt;/P&gt;&lt;P&gt;Generate the XML files by clicking the "Generate Files" toolstrip button and Select "All languages" when prompted.&lt;/P&gt;&lt;P&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/3b8dfaf7-f479-43b3-a17c-7496.jpg"&gt;&lt;/P&gt;&lt;P&gt;We have now created the messages, now let's call the message in code.&amp;nbsp; Open any StrataFrame project.&amp;nbsp; We will assume VB.Net for this sample, so once the project is open, select and open the AppMain.vb file (program.cs for C#).&amp;nbsp; Navigate to the InitApplication method.&amp;nbsp; There should already be two lines of code related to the messaging:&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;&lt;FONT size=2&gt;MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML&lt;BR&gt;MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage(&lt;/FONT&gt;&lt;FONT size=2&gt;"YourApplicationKey"&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;&lt;FONT size=2&gt;&lt;FONT color=#1f5080&gt;But we need to add one more line of code that specifies our path to the messaging files.&amp;nbsp; Obviously this can be dynamically set at runtime, but for our sample purposes we will just hard code the path.&amp;nbsp; So it should look something like this when finished:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT size=2&gt;&lt;FONT color=#1111ff&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #ffff11"&gt;MicroFour.StrataFrame.UI.Localization.MessageXmlPath = &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT style="BACKGROUND-COLOR: #ffff11" color=#800000 size=2&gt;"C:\temp\"&lt;/FONT&gt;&lt;BR&gt;MicroFour.StrataFrame.UI.Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML&lt;BR&gt;MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage(&lt;FONT size=2&gt;"YourApplicationKey"&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#1111ff&gt;&lt;FONT size=2&gt;&lt;FONT color=#1f5080&gt;Now all we have to do is call the message box.&amp;nbsp; So on a &lt;U&gt;StrataFrame&lt;/U&gt; form, add a button and place the following code:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;FONT color=#1111ff&gt;&lt;FONT size=2&gt;&lt;FONT color=#1f5080&gt;&lt;FONT color=#0000ff size=2&gt;&lt;P&gt;Me&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;.ShowMessageByKey(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"MyTestKey"&lt;/FONT&gt;&lt;FONT color=#000000 size=2&gt;, &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"Here is the dynamic data that we have passed to the message &amp;#119;indow."&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT color=#000000&gt;)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Run your project and click the button and you will see the message box.&amp;nbsp; Obviously adding another message is much easier since we avoid many of the steps and use the same project.&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;&lt;IMG src="http://forum.strataframe.net/Uploads/Images/6c43a152-b758-4c2d-aa9e-85b4.jpg"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;Keep in mind that if you are going to have very many messages, it is highly recommended to use SQL Server instead of an XML file to store your messages.&amp;nbsp; You can use the Database Deployment Toolkit to automatically create and deploy your Messaging structures.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size=2&gt;I hope this helps ;)&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;</description><pubDate>Wed, 26 Apr 2006 08:50:40 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Could someone expound on the Messaging component...</title><link>http://forum.strataframe.net/FindPost944.aspx</link><description>Hi Mike,&lt;br&gt;
&lt;br&gt;
Well, the benefit of the messaging component is two-fold:&lt;br&gt;
&lt;br&gt;
1)  If you're localizing you're messages, you can use the localization editor to create the message in several different languages and let the runtime figure out which language to show when it shows the messages.&lt;br&gt;
&lt;br&gt;
2)  Whether you're using localization or not (and if I remember correctly, you probably won't be localizing), using the messaging interface allows you to remove embedded text from your application.  This gives you the following benefits:&lt;br&gt;
&lt;br&gt;
   a)  You don't have to be a developer to change a message because of a type-o&lt;br&gt;
   b)  You can reuse messages by reusing the key, rather than copying the text multiple places within your application&lt;br&gt;
   c)  You can associate an event ID with each message, then when one of your users calls you and says, "Hey, I just got message #157," you know exactly which message they're talking about.&lt;br&gt;
   d)  You have a central location for managing messages, allowing you to change a message in one place rather than trying to do a "Find and Replace All" in your code&lt;br&gt;
&lt;br&gt;
There are other benefits as well, such as the MessageForm being much prettier than the standard .NET MessageBox and the ability to use RTF formatting in your messages.&lt;br&gt;
&lt;br&gt;
Hope that helps :)</description><pubDate>Wed, 26 Apr 2006 08:37:17 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item></channel></rss>