Beispiel #1
0
        /// <summary>
        /// 解密加密的全部密码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void decryptToolStripMenuItem_Click(object sender, EventArgs e)
        {
            // 查询全部数据
            RDSDataManager dataManager = new RDSDataManager();
            var            doc         = dataManager.GetData();
            var            root        = doc.Root;

            RDSDataNode rootNode = new RDSDataNode();

            rootNode.Text             = "远程桌面";
            rootNode.Tag              = Guid.Empty;
            rootNode.NodeType         = RDSDataNodeType.Group;
            rootNode.ContextMenuStrip = rightButtonMenu;
            rootNode.ImageIndex       = 0;

            InitTreeNodes(root, rootNode);

            DecryptPassword(dataManager, rootNode);

            // 清除加密Key和密钥,下次登录需
            dataManager.SetSecrectKey(string.Empty);
            dataManager.SetInitTime(string.Empty);
            dataManager.SetPassword(string.Empty);

            MessageBox.Show("处理成功,请重新启动。", "处理成功", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Beispiel #2
0
        private void InitTreeView()
        {
            RDSDataManager dataManager = new RDSDataManager();
            var            doc         = dataManager.GetData();
            var            root        = doc.Root;

            RDSDataNode rootNode = new RDSDataNode();

            rootNode.Text             = "远程桌面";
            rootNode.Tag              = Guid.Empty;
            rootNode.NodeType         = RDSDataNodeType.Group;
            rootNode.ContextMenuStrip = rightButtonMenu;
            rootNode.ImageIndex       = 0;

            InitTreeNodes(root, rootNode);

            serverTree.Nodes.Add(rootNode);
            serverTree.ImageList = imageList1;

            rootNode.Expand();

            currentTreeNode = rootNode;
        }