Ejemplo n.º 1
0
        /// <summary>
        /// 窗口加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Main_Load(object sender, EventArgs e)
        {
            selectedNode = new myTreeNode();
            string str = _provider.GetFileText(_provider.filePath("configPath"));

            if (!string.IsNullOrEmpty(str))
            {
                string pwd = _provider.MD5("0|-1");
                if (str == pwd)
                {
                    LoadTreeView();
                }
                else
                {
                    SetPwd sp = new SetPwd(this);
                    sp.ShowDialog(this);
                }
            }
            else
            {
                Application.Exit();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 设置密码
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsbSetPwd_Click(object sender, EventArgs e)
        {
            SetPwd sp = new SetPwd(this, true);

            sp.ShowDialog(this);
        }