예제 #1
0
        private static Grid CreateContainer(IFormulaToken token)
        {
            // find template in FormulaTokenTemplates.xaml
            FormulaTokenTemplate template;

            if (!FormulaTokenTemplates.TryGetValue(token.GetType(), out template))
            {
                Debug.WriteLine("Please add template for \"" + token.GetType().Name +
                                "\" to FormulaTokenTemplates.xaml. ");
                return(null);
            }

            return(template.CreateContainer(token));
        }
예제 #2
0
 bool ITestEquatable <IFormulaToken> .TestEquals(IFormulaToken other)
 {
     return(other != null && other.GetType() == GetType() && TestEquals((FormulaToken)other));
 }
        private static Grid CreateContainer(IFormulaToken token)
        {
            // find template in FormulaTokenTemplates.xaml
            FormulaTokenTemplate template;
            if (!FormulaTokenTemplates.TryGetValue(token.GetType(), out template))
            {
                Debug.WriteLine("Please add template for \"" + token.GetType().Name +
                                "\" to FormulaTokenTemplates.xaml. ");
                return null;
            }

            return template.CreateContainer(token);
        }