示例#1
0
        public static RemotePageSummary BrowseForPage(IWin32Window owner, string spaceKey)
        {
            BrowsePagesDialog dlg = new BrowsePagesDialog();

            using ( dlg )
            {
                dlg.SpaceKey = spaceKey;
                DialogResult dr = dlg.ShowDialog(owner);
                if (dr == DialogResult.Cancel)
                {
                    return(null);
                }
                return(dlg.SelectedPageSummary);
            }
        }
示例#2
0
文件: PostDialog.cs 项目: mo5h/omeo
        private void _btnBrowse_Click(object sender, System.EventArgs e)
        {
            string            spaceKey    = (_cmbSpaces.SelectedItem as SpaceSummary).Key;
            RemotePageSummary pageSummary = BrowsePagesDialog.BrowseForPage(this, spaceKey);

            if (pageSummary != null)
            {
                _parentId       = pageSummary.id;
                _edtParent.Text = pageSummary.title;
            }
            else
            {
                _parentId       = 0L;
                _edtParent.Text = "";
            }
        }