예제 #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 FoxitOpenDocument(stringParameter.value, intParameter.value);
            }
            catch (Exception ex)
            {
                result = new PresentFailureCode(ex);
            }
            return(result);
        }
예제 #3
0
        internal Present ImageDetail(System.Drawing.Size assumedDisplaySize)
        {
            Monitor.Enter(this);
            Present result;

            try
            {
                double num = Math.Max((double)this.primarySource.PixelWidth / (double)assumedDisplaySize.Width, (double)this.primarySource.PixelHeight / (double)assumedDisplaySize.Height);
                num = Math.Max(num, 1.0);
                int num2 = 1 + (int)Math.Ceiling(Math.Log(num) / Math.Log(2.0));
                D.Assert(num2 >= 0);
                result = new IntParameter(num2);
            }
            finally
            {
                Monitor.Exit(this);
            }
            return(result);
        }