StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      


12»»

Embedding Security into the applicationExpand / Collapse
Author
Message
Posted 10/11/2006 11:44:16 AM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 2:02:58 PM
Posts: 644, Visits: 10,954
Hya.

I would like to embed the Security Application into my application.

I'm looking for some guidance in doing that.

Should I copy the SecurityMaintenance.EXE into my solution directory and just call it from the menu? I don't even know at this point how to call an external app.

Do I have to import the localized keys into the app localization project?

Thanks for your patience.

Post #3497
Posted 10/11/2006 11:56:54 AM
StrataFrame Novice

StrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame NoviceStrataFrame Novice

Group: StrataFrame Users
Last Login: 08/23/2007 2:01:12 AM
Posts: 77, Visits: 804
Hello Ivan!

using (MicroFour.StrataFrame.Security.SecurityDialog fsec = new SecurityDialog(false))
  {
    fsec.ShowDialog(
this);
  
}

The false in the custructor hides the permissions node. Simply use new SecurityDialog() to show the permissions node.

Hope this helps!

Post #3498
Posted 10/11/2006 11:58:41 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 10:38:53 PM
Posts: 2,683, Visits: 1,883
Hehe, I just wrote a help topic on how to call the security dialog in your app... but it's not in the release, yet.  No, you don't want to use the SecurityMaintenance.exe because it is for design-time only and requires the licensing.  However, you can call the SecurityDialog directly through one of 2 constructor overloads:

Sample – Showing the SecurityDialog [Visual Basic]

Imports MicroFour.StrataFrame.Security
...
Private Sub ShowSecurityDialog()
    '-- Create the form and show it
    Using loDialog As New SecurityDialog()
        loDialog.ShowDialog()
    End Using
End Sub

Sample – Showing the SecurityDialog without Permissions or Restriction Sets [Visual Basic]

Imports MicroFour.StrataFrame.Security
...
Private Sub ShowSecurityDialog()
    '-- Create the form and show it
    Using loDialog As New SecurityDialog()
        loDialog.ShowDialog(False, False)
    End Using
End Sub


www.bungie.net
Post #3499
Posted 10/11/2006 12:00:19 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 10:38:53 PM
Posts: 2,683, Visits: 1,883
Yes, Kevin's advice will work, but your version is probably in limbo... the constructor that accepts False is in the currently downloadable version, but the next udpate will have an overload that accepts False, False to hide both the permissions and the restriction sets (per Kevin's request ).


www.bungie.net
Post #3500
Posted 10/11/2006 12:06:40 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 2:02:58 PM
Posts: 644, Visits: 10,954
Ben Chase (10/11/2006)
Yes, Kevin's advice will work, but your version is probably in limbo... the constructor that accepts False is in the currently downloadable version, but the next udpate will have an overload that accepts False, False to hide both the permissions and the restriction sets (per Kevin's request ).

What about hiding the users?

By the way, thanks a lot to you both.

Post #3501
Posted 10/11/2006 12:20:21 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 2:02:58 PM
Posts: 644, Visits: 10,954
WOW ... my application now has a complete Security module. In PORTUGUESE!

One last thing (what a lie) ... Do I need to import the localized keys into the application localization project? In the login form, when the user enters a wrong password, for instance, the messages are not localized, and I know for sure they've been translated.

Post #3504
Posted 10/11/2006 12:57:02 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Yesterday @ 10:38:53 PM
Posts: 2,683, Visits: 1,883
No, all of the localized values are embedded within the assembly, so you don't have to include them.  However, are you setting the MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 1046? or is it still left at 1033?


www.bungie.net
Post #3507
Posted 10/11/2006 1:34:42 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User

Group: StrataFrame Users
Last Login: 2 days ago @ 2:02:58 PM
Posts: 644, Visits: 10,954
Ben Chase (10/11/2006)
No, all of the localized values are embedded within the assembly, so you don't have to include them.  However, are you setting the MicroFour.StrataFrame.UI.Localization.MessageLocaleID = 1046? or is it still left at 1033?

It is 1046, and what is strange, when set to 1033, the english message comes, when set to 1046, a "test" message appears! I need to find where this "test" is.

Post #3508
Posted 10/11/2006 1:54:20 PM


Advanced StrataFrame User

Advanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame UserAdvanced StrataFrame User