Esempio n. 1
0
        void DBProfileHandler_Added(DBProfile obj)
        {
            ToolStripMenuItem newItem = new ToolStripMenuItem(obj.Handle);

            newItem.Tag    = obj;
            newItem.Click += new EventHandler(profileItem_Click);

            profilesToolStripMenuItem.DropDownItems.Add(newItem);
        }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
 internal XmppProfile(DBProfile profile)
     : base(profile)
 {
 }
Esempio n. 4
0
 void DBProfileHandler_Removed(DBProfile obj)
 {
     profilesToolStripMenuItem.DropDownItems.RemoveByKey(obj.Handle);
 }
Esempio n. 5
0
 public Profile(object connectionManager)
     : base(connectionManager)
 {
     dbProfile = new DBProfile(this.CurrentConnectionManager);
 }
Esempio n. 6
0
        public static void SaveProfile(DBProfile dbProfile)
        {
            var text = Crypto.EncryptStringAES(JsonConvert.SerializeObject(dbProfile), "b_@_51C-$33d");

            File.WriteAllText(dbProfile.Name + ".mpr", text);
        }
Esempio n. 7
0
 public DBProfileEditor(DBProfile profile)
 {
     m_profile = profile;
     InitializeComponent();
     Initialize();
 }
Esempio n. 8
0
 public DBProfileEditor()
 {
     m_profile = new DBProfile();
     InitializeComponent();
     Initialize();
 }