PasswordManagerLib/PasswordManagerCore.cs
///<summary>
///Return true if Save Directory dont exits. Create a Save Direcory
///</summary>
Return true if Save Directory dont exits. Create a Save Direcory
Return true if Save Directory dont exits . Create a Save Direcory
public static bool CreateDirectoryForSave()
        {
           if(!Directory.Exists(SaveDir))
           {
             Directory.CreateDirectory(SaveDir);
             WriteAccountFile(new XmlSerializer(typeof(List<Account>)), new List<Account>());
             return true;
           }
           else
           {
              if(!File.Exists(AccountFile))
              {
                WriteAccountFile(new XmlSerializer(typeof(List<Account>)), new List<Account>());
              }
             return false;
           }
        }
public static bool CreateDirectoryForSave ( ) { if ( ! Directory . Exists ( SaveDir ) ) { Directory . CreateDirectory ( SaveDir ) ; WriteAccountFile ( new XmlSerializer ( typeof ( List < Account > ) ) , new List < Account > ( ) ) ; return true ; } else { if ( ! File . Exists ( AccountFile ) ) { WriteAccountFile ( new XmlSerializer ( typeof ( List < Account > ) ) , new List < Account > ( ) ) ; } return false ; } }
Return true if Save Directory dont exits.
Return true if Save Directory dont exits .
//Check if Dir exist //Create a dir and Accounts Folder //Return true becouse you are creating dir //If Dir exist //Check if Accounts File dont exist //Create a Accounts folder