コード例 #1
0
        public Present Evaluate(Present[] paramList)
        {
            StringParameter stringParameter = (StringParameter)paramList[0];
            IntParameter    intParameter    = (IntParameter)paramList[1];

            D.Assert(paramList.Length == 2);
            Present result;

            try
            {
                result = new WPFOpenDocument(stringParameter.value, intParameter.value);
            }
            catch (DllNotFoundException ex)
            {
                MessageBox.Show("It appears that .Net 3.0 is not installed on this machine. Please install .Net 3.0 and restart the application.", "Missing Dependency");
                result = new PresentFailureCode(ex);
            }
            catch (FileNotFoundException ex2)
            {
                if (ex2.Source == "PresentationCore")
                {
                    MessageBox.Show("It appears that .Net 3.0 is not installed on this machine. Please install .Net 3.0 and restart the application.", "Missing Dependency");
                }
                result = new PresentFailureCode(ex2);
            }
            catch (Exception ex3)
            {
                result = new PresentFailureCode(ex3);
            }
            return(result);
        }
コード例 #2
0
		public Present Evaluate(Present[] paramList)
		{
			StringParameter stringParameter = (StringParameter)paramList[0];
			IntParameter intParameter = (IntParameter)paramList[1];
			D.Assert(paramList.Length == 2);
			Present result;
			try
			{
				result = new WPFOpenDocument(stringParameter.value, intParameter.value);
			}
			catch (DllNotFoundException ex)
			{
				MessageBox.Show("It appears that .Net 3.0 is not installed on this machine. Please install .Net 3.0 and restart the application.", "Missing Dependency");
				result = new PresentFailureCode(ex);
			}
			catch (FileNotFoundException ex2)
			{
				if (ex2.Source == "PresentationCore")
				{
					MessageBox.Show("It appears that .Net 3.0 is not installed on this machine. Please install .Net 3.0 and restart the application.", "Missing Dependency");
				}
				result = new PresentFailureCode(ex2);
			}
			catch (Exception ex3)
			{
				result = new PresentFailureCode(ex3);
			}
			return result;
		}