Login window on a dll C# project -


i'm developing dll project make transactions database server, problem must idependent dll, , needs ask login screen if not found previous information. login screen needs written in c#, windows application.

any ideas apreciatted.

thanks in advance

this isn't sort of thing typically put dll. login screen dependent on implementing ui. better of creating data access class implements interface has login credentials required implemented properties. allows consuming application (web, winforms, wpf, whatever) create login screen or pass direct credentials data class:

public interface imydatainterface {     string loginuser { get; set; }     string loginpw { get; set; } }  public class mydatalayer : imydatainterface {     public mydatalayer(string login, string pw)     {         loginuser = login;         loginpw = pw;     } } 

using interface faithfully guarantees exposed datalayer has same implementation basics consuming applications.

edit reflect more secure method: (idea @chris)

using system.net;  public interface imydatainterface {     networkcredential credentials { get; set; } }  public class mydatalayer : imydatainterface {     public mydatalayer(networkcredential logininfo)     {         credentials = logininfo;     } } 

the constructor can overloaded include multiple methods of providing credentials, securestring class should used contain password in calls.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -