Hi,
For login, I have the user name "operator" and the password "111".
How is-it possible to login by using Script ?
Thank you
Philippe
User connection through Script
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: User connection through Script
Example below will log a user in when they press Button1.
Code: Select all
namespace Neo.ApplicationFramework.Generated
{
using System.Windows.Forms;
using System;
using System.Drawing;
using Neo.ApplicationFramework.Tools;
using Neo.ApplicationFramework.Common.Graphics.Logic;
using Neo.ApplicationFramework.Controls;
using Neo.ApplicationFramework.Interfaces;
using Neo.ApplicationFramework.Common.Service;
public partial class Screen1
{
void Button1_Click(System.Object sender, System.EventArgs e)
{
//Login User
ISecurityServiceCF securityServiceCF = ServiceContainerCF.GetService<ISecurityServiceCF>();
securityServiceCF.LoginUser("operator", "111");
}
void Button2_Click(System.Object sender, System.EventArgs e)
{
//Logout User
ISecurityServiceCF securityServiceCF = ServiceContainerCF.GetService<ISecurityServiceCF>();
securityServiceCF.LogoutUser();
}
}
}
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer