When a user clicks my delete button on the toolstrip, the code rips away the record and refreshes the listview. All is well.Then, I thought, what if the user picks the wrong item (not that users do that, of course)? I should pop up a message window asking them if that is really what they want to do...typical delete confirmation stuff. Here is where I thought would be a great place to implement SF messaging. So, I went about reading the docs, setting up a project and creating my first message. It was all very easy and straightforward. The XML would be placed into the root of my comp and I told the application via the Solution Preferences to use the new localization project. I called the key from the code that deletes my item, like this:
MessageFunctionType mt = MessageForm.ShowMessageByKey("DeleteConfirmation", mSalesOrderDetails.itemnum);
if (mt == MessageFunctionType.Yes)
{
...my delete code stuff
}F5.
Crash!
The specified key [DeleteConfirmation] was not found within the messaging database.
The file [Message_Languages.xml] could not be found. The localization languages table could not be loaded.
So, back to the drawing board.
I re-read the docs and ran into the concept of using embedded XML files. So I walked through that simple procedure as outlined in the docs and hit F5, again.
Same error.
I re-re-read the docs and saw that I maybe missed a step...setting the locale ID. I went through this and got confused, so I doubt that this is setup correctly, because I am getting the same error. Here is the stuff from the InitApplication method that is pertinent:
MicroFour.StrataFrame.UI.
Localization.MessageKeyType = MicroFour.StrataFrame.Messaging.MessageKeyDataType.XML;
MicroFour.StrataFrame.UI.Localization.MessageLocaleID = MicroFour.StrataFrame.UI.Localization.GetActiveLanguage();I left the GetActiveLanguage method with no parameters since the default is fine.
What did I forget to do? How do I get the messaging setup correctly to utilize these embedded XML files?
Thanks,
Bill