public static void Init(FormMain main) { _mainForm = main; TabContainer = _mainForm.tabInstance; LogTextBox = _mainForm.txtLog; MainSpiltContainer = _mainForm.splitContainerMain; if (!Directory.Exists(LogDirectory)) { Directory.CreateDirectory(LogDirectory); } if (File.Exists("UserGroups.cfg")) { _groups = FtpStore.LoadUserGroups("UserGroups.cfg"); } else { _groups = new Dictionary <string, FtpUserGroup>(); _groups.Add("anonymous", FtpUserGroup.Anonymous); } if (File.Exists("Users.cfg")) { _users = FtpStore.LoadUsers("Users.cfg"); } else { _users = new Dictionary <string, FtpUser>(); _users.Add("anonymous", FtpUser.Anonymous); } }
private void Save() { FtpStore.SaveAs(Users, "Users.cfg"); FtpStore.SaveAs(Groups, "UserGroups.cfg"); }