Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Login Screen
PostPosted: Thu Apr 12, 2012 11:42 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
Hi Phong,

There is no help documentation for that class.

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Wed May 09, 2012 7:06 am 

Joined: Tue Jan 17, 2012 8:57 am
Posts: 19

Offline
Is it possible to make the on-screen keyboard appear with the text window so users can see what they are typing when the textbox is covered?

_________________
Bob Livingston
Sr Controls Engineer
FlexEnergy Energy Systems
30 New Hampshire Ave
Portsmouth, NH 03801
USA


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Wed May 09, 2012 8:42 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
Hi Bob,

No, there is not a way to do that. The on screen keyboard tries to position itself so it does not cover up the text box that the keyboard is entering data into.

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Sun May 13, 2012 2:49 am 

Joined: Wed Feb 22, 2012 12:01 am
Posts: 31

Offline
Dear Mark,

I encounter very strange error today. I tried custom login screen and everything work fine until today, I tried to add and button and delete it right away. This button has nothing to do with the Login Script or any Tags.

But after I validate the project, and many errors appear
Attachment:
LoginError.PNG
LoginError.PNG [ 32.76 KiB | Viewed 6383 times ]


It made me so confused cause in Login Screen Script, the last line is 77. Is there anything related to the bug you mentioned above in this thread?

Here is my code for Custom Login Screen
Code:
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 System.Collections.Generic;
   using Neo.ApplicationFramework.Common.Utilities;
   using Neo.ApplicationFramework.Common.Service;
   
    public partial class LoginScreen
    {
      public ISecurityServiceCF _securityService;
      public IList<ISecurityUser> Users = Globals.Security.Users;
      
      // Get all username
      void LoginScreen_Opened(System.Object sender, System.EventArgs e)
      {
         foreach(ISecurityUser _user in Users)
         {
            UsersList.Items.Add(_user.Description);
         }
         
         passwordInput.Font = new Font("Tahoma", 26, System.Drawing.FontStyle.Regular);
         passwordInput.PasswordChar = '*';
         passwordInput.GotFocus += myEventHandler;
      }
      
      // Show keyboard when password input got focus
      public void myEventHandler(Object sender, EventArgs e)
      {
         passwordInput.SelectAll();
         IKeyboardHelper kh = KeyboardHelperFactory.KeyboardHelper;
         Rectangle rt = new Rectangle(0, 0, 0, 0);
         kh.ShowFullKeyboard(rt);
      }
      
      // check whether password is correct
      // show MessageBox when login sucessfully
      void LoginBtn_Click(System.Object sender, System.EventArgs e)
      {
         _securityService = ServiceContainerCF.GetServiceSafe<ISecurityServiceCF>();
         
         if ( _securityService.LoginUser(Users[UsersList.SelectedIndex].Username, passwordInput.Text) )
         {
            _securityService.ShowMessageBoxWithTimeout("User " + UsersList.Text + " is logged in", "Login Success");
            Globals.HomeScreen.Show();
         }
         else
         {
            _securityService.ShowMessageBoxWithTimeout("Wrong password - try again", "Login Failed");
         }
      }
      
      // Carefully: Delete event handler everytime exit Login Screen
      void LoginScreen_Closed(System.Object sender, System.EventArgs e)
      {
         passwordInput.Click -= myEventHandler;
      }

    }
}


Thanks and best regards,

Phong Duong


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Thu Jun 07, 2012 9:10 am 

Joined: Thu Jun 07, 2012 8:38 am
Posts: 6

Offline
I'm just looking into creating a custom login screen, as the combo boxes are pretty small on the QTERMA7 panel. Now, I'm terrible at scripting as I don't do it very often, but adapting snippets shouldn't be too hard!

Anyway, I get the same pallette of errors that the previous poster did, even after following the instructions on the first page of this thread. Can anyone help me out?

Thanks!
Kendall
Attachment:
error1.PNG
error1.PNG [ 81.25 KiB | Viewed 6337 times ]


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Thu Jun 07, 2012 10:05 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
You need to follow the following
procedure before opening the application:

1. Create a panel application, import the System.Windows.Forms.TextBox
object
(Embedded image moved to file: pic21726.gif)

2. Close the application
3. Open the CustomRecipeDialog application and build/run.

Attachment:
pic21726.gif
pic21726.gif [ 53.4 KiB | Viewed 6336 times ]

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Thu Jun 07, 2012 11:32 am 

Joined: Thu Jun 07, 2012 8:38 am
Posts: 6

Offline
I tried that in the source project, didn't work. Tried it your way, in a new project...worked fine. Thanks!

Also added an if check to exclude specific users (in our case, we want to exclude a "Temporary" user).

Code:
   void PopulateList()
      {
         ISecurityManager securityManager = Globals.Security as ISecurityManager;
         foreach (ISecurityUser user in securityManager.Users)
         {
            if (user.Username == "User1")
            {
            }
            else
            {
               cbUsers.Items.Add(user.Username);
            }
         }
         if(cbUsers.Items.Count > 0)
         {
            cbUsers.SelectedIndex = 0;
         }
      }


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Wed Oct 03, 2012 3:57 am 

Joined: Fri Dec 02, 2011 8:22 am
Posts: 20

Offline
Hi everybody,

I have tried to use the custom login project for my T4A panel but there is a problem. In fact, this project is designed for a TA70 panel and when I change it to T4A, iX developer deletes the text form used for password (this form is not available for T4A). I have changed it by an AnalogNumeric form but is there a way to change alphabetic characters by '*' character in keyboard preview?

Thanks a lot.


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Wed Oct 03, 2012 8:51 am 

Joined: Tue Mar 13, 2012 9:53 am
Posts: 824

Offline
This forum thread talks about how to make an AnalogNumeric box display password characters, rather than alpha numeric characters.

I believe that should solve you issue.

_________________
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer


 Profile  
 
 Post subject: Re: Login Screen
PostPosted: Wed Feb 24, 2016 3:15 am 

Joined: Sun Feb 07, 2016 1:39 pm
Posts: 6

Offline
Hello,
I used the script that you give for my logscreen but I Have a problem on this part:

void PopulateList()
{
ISecurityManager securityManager = Globals.Security as ISecurityManager;
foreach (ISecurityUser user in securityManager.Users)
{
cbUsers.Items.Add(user.Username);
}
if(cbUsers.Items.Count > 0)
{
cbUsers.SelectedIndex = 0;
}
}


And he give me for error messages (in french):
-There is no definitions for "Items" and no extension method "Items"(a directive using or an assembly reference is missing?)
-There is no definitions for "Items" and no extension method "Items"(a directive using or an assembly reference is missing?)
-There is no definitions for "SelectedIndex" and no extension method "SelectedIndex" (a directive using or an assembly reference is missing?)


This message is just for my program because when i try the "customlogindialogue) given there are no problems. The rest of my programm is the same. Have I forgot somethings?

Your help will be welcome.
Best regards

Franswa


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron