当前位置: 首页>>代码示例>>C#>>正文


C# RmsChannel.DoGetKeys方法代码示例

本文整理汇总了C#中DigitalPlatform.rms.Client.RmsChannel.DoGetKeys方法的典型用法代码示例。如果您正苦于以下问题:C# RmsChannel.DoGetKeys方法的具体用法?C# RmsChannel.DoGetKeys怎么用?C# RmsChannel.DoGetKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DigitalPlatform.rms.Client.RmsChannel的用法示例。


在下文中一共展示了RmsChannel.DoGetKeys方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetKeys

        /// <summary>
        /// 模拟创建检索点
        /// </summary>
        /// <param name="strServerUrl">服务器URL。为什么要单给出这个URL,而不采用this.ServerUrl? 因为要模拟检索点的记录,其服务器URL常常和主服务器的URL不同。</param>
        /// <param name="strPath"></param>
        /// <param name="strXml"></param>
        /// <param name="aLine"></param>
        /// <param name="strError"></param>
        /// <returns>-1	一般出错;0	正常</returns>
		public int GetKeys(
			string strServerUrl,
			string strPath,
			string strXml,
            out List<AccessKeyInfo> aLine,
			out string strError)
		{
			strError = "";
			aLine = null;

            if (String.IsNullOrEmpty(strServerUrl) == true)
                strServerUrl = this.ServerUrl;

			
			RmsChannel channelSave = channel;

			channel = Channels.GetChannel(strServerUrl);
			if (channel == null)
			{
				strError = "get channel error";
				return -1;
			}

			try 
			{
				long lRet = channel.DoGetKeys(
                    strPath,
					strXml,
					"zh",	// strLang
					// "",	// strStyle
					null,	// this.stop,
					out aLine,
					out strError);
				if (lRet == -1)
				{
					return -1;
				}
				return 0;
			}
			finally 
			{
				channel = channelSave;
			}
		}
开发者ID:paopaofeng,项目名称:dp2,代码行数:53,代码来源:SearchPanel.cs

示例2: ViewAccessPoint

		// 观察检索点
		// parameters:
		//		strRecordPath	记录路径。如果==null,表示直接用textBox_recPath中当前的内容作为路径
		public void ViewAccessPoint(string strRecordPath)
		{
			if (strRecordPath == null || strRecordPath == "")
				strRecordPath = textBox_recPath.Text;

			if (strRecordPath == "")
			{
				MessageBox.Show(this, "必须指定好路径后, 才能模拟创建检索点");
				return;
			}

			ResPath respath = new ResPath(strRecordPath);

			string strError;

			string strXml = "";

			// 使用Channel
			RmsChannel channelSave = channel;

			channel = Channels.GetChannel(respath.Url);
			Debug.Assert(channel != null, "Channels.GetChannel 异常");

			try 
			{
                bool bHasUploadedFile = false;

				int nRet = GetXmlRecord(out strXml, 
                    out bHasUploadedFile,
                    out strError);
				if (nRet == -1)
				{
					MessageBox.Show(this, strError);
					return;
				}
			}
			finally 
			{
				channel = channelSave;
			}

            ViewAccessPointForm accessPointWindow = MainForm.TopViewAccessPointForm;

            if (accessPointWindow == null)
            {
                accessPointWindow = new ViewAccessPointForm();
                // accessPointWindow.StartPosition = FormStartPosition.CenterScreen;
                accessPointWindow.Show();
                accessPointWindow.MdiParent = MainForm; // MDI子窗口
            }
            else
                accessPointWindow.Activate();

                /*
			else 
			{
				accessPointWindow.Focus();
				if (accessPointWindow.WindowState == FormWindowState.Minimized) 
				{
					accessPointWindow.WindowState = FormWindowState.Normal;
				}
			}
                 */

            /*
			if (accessPointWindow.Visible == false) 
			{
				try // Close()过的窗口
				{
					accessPointWindow.Show();
				}
				catch (System.ObjectDisposedException)
				{
					accessPointWindow = new ViewAccessPointForm();
					accessPointWindow.StartPosition = FormStartPosition.CenterScreen;
					accessPointWindow.Show();
				}
			}
             */


			// 使用Channel
			channelSave = channel;

			channel = Channels.GetChannel(respath.Url);
			Debug.Assert(channel != null, "Channels.GetChannel 异常");

			try 
			{
                stop.OnStop += new StopEventHandler(this.DoStop);
				stop.Initial("正在获取检索点 " + respath.FullPath);
				stop.BeginLoop();


				EnableControlsInLoading(true);

				long lRet = channel.DoGetKeys(
//.........这里部分代码省略.........
开发者ID:paopaofeng,项目名称:dp2,代码行数:101,代码来源:DetailForm.cs

示例3: GetKeys

        // 模拟创建检索点
        // return:
        //      -1  error
        //      0   succeed
        public int GetKeys(
            // RmsChannelCollection Channels,
            RmsChannel channel,
            string strPath,
            string strXml,
            out List<AccessKeyInfo> aLine,
            out string strError)
        {
            strError = "";
            aLine = null;

            /*
            RmsChannel channel = Channels.GetChannel(this.WsUrl);
            if (channel == null)
            {
                strError = "get channel error";
                return -1;
            }
             * */
            Debug.Assert(channel != null, "");

            long lRet = channel.DoGetKeys(
                strPath,
                strXml,
                "zh",	// strLang
                // "",	// strStyle
                null,	// this.stop,
                out aLine,
                out strError);
            if (lRet == -1)
            {
                return -1;
            }

            return 0;
        }
开发者ID:renyh1013,项目名称:dp2,代码行数:40,代码来源:AppDup.cs


注:本文中的DigitalPlatform.rms.Client.RmsChannel.DoGetKeys方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。