コード例 #1
0
 public static string MakeFormattedText(ITheoryElement element)
 {
     StringBuilder strBuilder = new StringBuilder();
     strBuilder.AppendLine(LanguageResource.currentDictionary[element.GetTheoryType().ToString()]);
     strBuilder.AppendLine("   " + element.Formulation.Replace("\n", "\n   "));
     if (element is Theorem)
     {
         strBuilder.AppendLine(LanguageResource.currentDictionary["proof"]);
         strBuilder.AppendLine("  " + ((Theorem)element).Proof.Replace("\n", "\n   "));
     }
     strBuilder.AppendLine();
     return strBuilder.ToString();
 }
コード例 #2
0
        public CreateElementPanel(ITheoryElement element, List<ITheoryElement> basis, Core.Session session, TheoryTree tree)
        {
            InitializeComponent();
            this.element = element;
            this.basis = basis;
            this.currentSession = session;
            this.type = element.GetTheoryType();
            this.tree = tree;

            TheoryTypeBox.Text = type.ToString();
            LinksItemBox.ItemsSource = basis;
            FormulationTextBox.Text = element.Formulation;
            TemplateTextBox.Text = element.Template;
            if (element is Theorem)
                ProofTextBox.Text = ((Theorem)element).Proof;
            mod = Mods.Edit;
            LanguageResource.Updated += new Updated(LanguageResource_Updated);
            Update();
            LanguageResource_Updated(null);
        }