Ejemplo 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);
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 internal XmppProfile(DBProfile profile)
     : base(profile)
 {
 }
Ejemplo n.º 4
0
 void DBProfileHandler_Removed(DBProfile obj)
 {
     profilesToolStripMenuItem.DropDownItems.RemoveByKey(obj.Handle);
 }
Ejemplo n.º 5
0
 public Profile(object connectionManager)
     : base(connectionManager)
 {
     dbProfile = new DBProfile(this.CurrentConnectionManager);
 }
Ejemplo 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);
        }
Ejemplo n.º 7
0
 public DBProfileEditor(DBProfile profile)
 {
     m_profile = profile;
     InitializeComponent();
     Initialize();
 }
Ejemplo n.º 8
0
 public DBProfileEditor()
 {
     m_profile = new DBProfile();
     InitializeComponent();
     Initialize();
 }