public Corollary(int theoryindex, string formulation, string template) { this.theoryindex = theoryindex; this.formulation = formulation; this.template = template; Updated += new Protsenko.TheoryEditor.Core.Events.Updated(Corollary_Updated); LanguageResource.Updated += new Protsenko.TheoryEditor.Core.Events.Updated(LanguageResource_Updated); }
public Theorem(int theoryindex, string formulation, string template, string proof) { this.theoryindex = theoryindex; this.formulation = formulation; this.template = template; this.proof = proof; Updated += new Protsenko.TheoryEditor.Core.Events.Updated(Theorem_Updated); LanguageResource.Updated += new Protsenko.TheoryEditor.Core.Events.Updated(LanguageResource_Updated); }
public SessionVisual(ElementSpace space, TheoryTree tree, Session session) { mod = Session.Mods.Basic; InitializeComponent(); canvas = space; this.tree = tree; this.session = session; space.ElementsFocused += new Protsenko.TheoryEditor.Core.Events.Focused(space_ElementFocused); Grid.SetColumn(canvas, 0); Grid.SetColumnSpan(canvas,2); maingrid.Children.Add(canvas); Updated += new Protsenko.TheoryEditor.Core.Events.Updated(SessionVisual_Updated); }
private void SomeTextCodeInit(Point p, string title, UIElement element) { this.Background = Brushes.WhiteSmoke; this.BorderThickness = new Thickness(2); this.BorderBrush = Brushes.GhostWhite; this.CornerRadius = new CornerRadius(2); mainpanel = new StackPanel(); bclose = new Button(); bedit = new Button(); toppanel = new DockPanel(); titleblock = new TextBlock(); mainpanel.Orientation = Orientation.Vertical; toppanel.Background = Brushes.AliceBlue; toppanel.Name = "DragnDropPanel"; StackPanel buttonPanel = new StackPanel(); buttonPanel.HorizontalAlignment = HorizontalAlignment.Right; buttonPanel.Orientation = Orientation.Horizontal; bclose.Content = "x"; bclose.Click += new RoutedEventHandler(bclose_Click); bclose.Margin = new Thickness(2); bedit.Click += new RoutedEventHandler(bedit_Click); bedit.Margin = new Thickness(2); buttonPanel.Children.Add(bedit); buttonPanel.Children.Add(bclose); titleblock.Text = title; titleblock.HorizontalAlignment = HorizontalAlignment.Left; toppanel.Children.Add(titleblock); toppanel.Children.Add(buttonPanel); mainpanel.Children.Add(toppanel); mainpanel.Children.Add(element); this.Child = mainpanel; Canvas.SetLeft(this, p.X); Canvas.SetTop(this, p.Y); ITheoryElement theoryElement = GetTheoryElement(); visualinfo = new EVisualInfo(); visualinfo.Updated += new Protsenko.TheoryEditor.Core.Events.Updated(visualinfo_Updated); toppanel.MouseLeftButtonDown += new MouseButtonEventHandler(toppanel_MouseLeftButtonDown); toppanel.MouseLeftButtonUp += new MouseButtonEventHandler(toppanel_MouseLeftButtonUp); DragStart += new DragStart(TheoryVisualDecorator_DragStart); DragEnd += new DragEnd(TheoryVisualDecorator_DragEnd); WantsToBeEdited += new Protsenko.TheoryEditor.Core.Events.Updated(TheoryVisualDecorator_WantsToBeEdited); LanguageResource.Updated +=new Protsenko.TheoryEditor.Core.Events.Updated(LanguageResource_Updated); LanguageResource_Updated(null); }