Beispiel #1
0
        private void TextBlockMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            double       scale  = 1.0;
            EditorVisual editor = (EditorVisual)Util.TryFindParent <EditorVisual>(this);

            editor.ZoomLevel = scale;
        }
Beispiel #2
0
        private void DecZoom(object sender, RoutedEventArgs e)
        {
            EditorVisual editor = (EditorVisual)Util.TryFindParent <EditorVisual>(this);
            double       scale  = editor.ZoomLevel;

            editor.ZoomLevel = scale > min ? scale - 0.15 : scale;
        }
 public UsageStatisticPopup(EditorVisual editor)
 {
     InitializeComponent();
     _editor = editor;
     _editor.SelectedConnectorChanged += new EventHandler(_editorSelectedConnectorChanged);
     Suggestions = new ObservableCollection <SuggestionContainer>();
     this.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(UsageStatisticPopup_MouseLeftButtonDown);
 }
Beispiel #4
0
 /// <summary>
 /// Create a new Instance of the Editor
 /// </summary>
 public WorkspaceManagerClass()
 {
     this.SelectedPluginsList = new ObservableCollection <ComponentVisual>();
     Settings       = new WorkspaceManagerSettings(this);
     WorkspaceModel = new WorkspaceModel();
     WorkspaceModel.OnGuiLogNotificationOccured += this.GuiLogNotificationOccured;
     WorkspaceModel.MyEditor  = this;
     WorkspaceSpaceEditorView = new EditorVisual(WorkspaceModel);
     WorkspaceSpaceEditorView.ItemsSelected += new EventHandler <SelectedItemsEventArgs>(WorkspaceSpaceEditorView_ItemsSelected);
 }
Beispiel #5
0
        void TextEditPanelDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (e.NewValue is EditorVisual)
            {
                editor = (EditorVisual)e.NewValue;
                editor.SelectedTextChanged += (x, s) =>
                {
                    if (editor.SelectedText == null)
                    {
                        return;
                    }

                    CrPicker.SelectedColor = editor.SelectedText.Color.Color;
                };
            }
        }