Example #1
0
        private void menuItem_accountManagement_Click(object sender, System.EventArgs e)
        {
            if (treeView_res.SelectedNode == null)
            {
                MessageBox.Show("请选择一个节点");
                return;
            }

            ResPath respath = new ResPath(treeView_res.SelectedNode);

            GetUserNameDlg namedlg = new GetUserNameDlg();

            MainForm.SetControlFont(namedlg, this.DefaultFont);

            string strError = "";

            this.Cursor = Cursors.WaitCursor;
            int nRet = namedlg.Initial(this.Servers,
                                       this.Channels,
                                       this.stopManager,
                                       respath.Url,
                                       out strError);

            this.Cursor = Cursors.Arrow;
            if (nRet == -1)
            {
                MessageBox.Show(strError);
                return;
            }

            namedlg.StartPosition = FormStartPosition.CenterScreen;
            namedlg.ShowDialog(this);
            if (namedlg.DialogResult != DialogResult.OK)
            {
                return;
            }

            UserRightsDlg dlg = new UserRightsDlg();

            MainForm.SetControlFont(dlg, this.DefaultFont);
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.UserName      = namedlg.SelectedUserName;
            dlg.UserRecPath   = namedlg.SelectedUserRecPath;
            dlg.ServerUrl     = respath.Url;
            dlg.MainForm      = this;

            this.AppInfo.LinkFormState(dlg, "userrightsdlg_state");
            dlg.ShowDialog(this);
            this.AppInfo.UnlinkFormState(dlg);
        }
Example #2
0
        // 新建帐户
        void menuItem_newAccount_Click(object sender, System.EventArgs e)
        {
            if (treeView_res.SelectedNode == null)
            {
                MessageBox.Show("请选择一个节点");
                return;
            }

            ResPath respath = new ResPath(treeView_res.SelectedNode);

            UserRightsDlg dlg = new UserRightsDlg();

            MainForm.SetControlFont(dlg, this.DefaultFont);

            dlg.MainForm  = this;
            dlg.ServerUrl = respath.Url;
            dlg.ShowDialog(this);
        }
Example #3
0
		private void menuItem_accountManagement_Click(object sender, System.EventArgs e)
		{

			if (treeView_res.SelectedNode == null)
			{
				MessageBox.Show("请选择一个节点");
				return;
			}

			ResPath respath = new ResPath(treeView_res.SelectedNode);

			GetUserNameDlg namedlg = new GetUserNameDlg();
            MainForm.SetControlFont(namedlg, this.DefaultFont);

			string strError = "";
            this.Cursor = Cursors.WaitCursor;
            int nRet = namedlg.Initial(this.Servers,
				this.Channels,
				this.stopManager,
				respath.Url,
				out strError);
            this.Cursor = Cursors.Arrow;
            if (nRet == -1)
			{
				MessageBox.Show(strError);
				return;
			}

			namedlg.StartPosition = FormStartPosition.CenterScreen;
			namedlg.ShowDialog(this);
			if (namedlg.DialogResult != DialogResult.OK)
				return;

			UserRightsDlg dlg = new UserRightsDlg();
            MainForm.SetControlFont(dlg, this.DefaultFont);
            dlg.StartPosition = FormStartPosition.CenterScreen;
			dlg.UserName = namedlg.SelectedUserName;
            dlg.UserRecPath = namedlg.SelectedUserRecPath;
			dlg.ServerUrl = respath.Url;
			dlg.MainForm = this;

			this.AppInfo.LinkFormState(dlg, "userrightsdlg_state");
			dlg.ShowDialog(this);
			this.AppInfo.UnlinkFormState(dlg);
		}
Example #4
0
        // 新建帐户
        void menuItem_newAccount_Click(object sender, System.EventArgs e)
        {

            if (treeView_res.SelectedNode == null)
            {
                MessageBox.Show("请选择一个节点");
                return;
            }

            ResPath respath = new ResPath(treeView_res.SelectedNode);

            UserRightsDlg dlg = new UserRightsDlg();
            MainForm.SetControlFont(dlg, this.DefaultFont);

            dlg.MainForm = this;
            dlg.ServerUrl = respath.Url;
            dlg.ShowDialog(this);
        }