Exemplo n.º 1
0
 /// <summary>
 /// PromptUser callback
 /// </summary>
 /// <param name="message"></param>
 /// <param name="prompt"></param>
 /// <returns></returns>
 public CimResponseType PromptUser(string message, CimPromptType prompt)
 {
     DebugHelper.WriteLogEx("message:{0} prompt:{1}", 0, message, prompt);
     try
     {
         CimPromptUser action = new CimPromptUser(message, prompt);
         this.FireNewActionEvent(action);
         return action.GetResponse();
     }
     catch (Exception ex)
     {
         DebugHelper.WriteLogEx("{0}", 0, ex);
         return CimResponseType.NoToAll;
     }
 }
Exemplo n.º 2
0
		public CimResponseType PromptUser(string message, CimPromptType prompt)
		{
			CimResponseType response;
			object[] objArray = new object[2];
			objArray[0] = message;
			objArray[1] = prompt;
			DebugHelper.WriteLogEx("message:{0} prompt:{1}", 0, objArray);
			try
			{
				CimPromptUser cimPromptUser = new CimPromptUser(message, prompt);
				this.FireNewActionEvent(cimPromptUser);
				response = cimPromptUser.GetResponse();
			}
			catch (Exception exception1)
			{
				Exception exception = exception1;
				object[] objArray1 = new object[1];
				objArray1[0] = exception;
				DebugHelper.WriteLogEx("{0}", 0, objArray1);
				response = CimResponseType.NoToAll;
			}
			return response;
		}