void DBProfileHandler_Added(DBProfile obj) { ToolStripMenuItem newItem = new ToolStripMenuItem(obj.Handle); newItem.Tag = obj; newItem.Click += new EventHandler(profileItem_Click); profilesToolStripMenuItem.DropDownItems.Add(newItem); }
public static DBProfile CreateProfile(string profilename, string profilepassword, string phrase) { var passhash = Crypto.GenerateHash(profilepassword); var phrasehash = Crypto.GenerateHash(phrase); var json = new PhraseHashJson(phrasehash); var encryptedphrasehash = Crypto.EncryptStringAES(JsonConvert.SerializeObject(json), passhash); var newProfile = new DBProfile(profilename, encryptedphrasehash); //create new profile object var text = Crypto.EncryptStringAES(JsonConvert.SerializeObject(newProfile), "b_@_51C-$33d"); File.WriteAllText(profilename + ".mpr", text); return(newProfile); }
internal XmppProfile(DBProfile profile) : base(profile) { }
void DBProfileHandler_Removed(DBProfile obj) { profilesToolStripMenuItem.DropDownItems.RemoveByKey(obj.Handle); }
public Profile(object connectionManager) : base(connectionManager) { dbProfile = new DBProfile(this.CurrentConnectionManager); }
public static void SaveProfile(DBProfile dbProfile) { var text = Crypto.EncryptStringAES(JsonConvert.SerializeObject(dbProfile), "b_@_51C-$33d"); File.WriteAllText(dbProfile.Name + ".mpr", text); }
public DBProfileEditor(DBProfile profile) { m_profile = profile; InitializeComponent(); Initialize(); }
public DBProfileEditor() { m_profile = new DBProfile(); InitializeComponent(); Initialize(); }