Beispiel #1
0
        public CompilerMessageView()
        {
            instance = this;

            AddCategory(TaskService.BuildMessageViewCategory);

            textEditor.IsReadOnly = true;

            textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");

            properties = (Properties)PropertyService.Get(OutputWindowOptionsPanel.OutputWindowsProperty, new Properties());

            var font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", Core.WinForms.WinFormsResourceService.DefaultMonospacedFont.ToString()).ToString());

            textEditor.FontFamily       = new FontFamily(font.FontFamily.Name);
            textEditor.FontSize         = Math.Round(font.Size * 96.0 / 72.0);
            properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);

            MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView);
            textEditor.TextArea.TextView.ElementGenerators.OfType <LinkElementGenerator>().ForEach(x => x.RequireControlModifierForClick = false);

            toolStrip = ToolBarService.CreateToolBar(panel, this, "/SharpDevelop/Pads/CompilerMessageView/Toolbar");
            toolStrip.SetValue(DockPanel.DockProperty, Dock.Top);

            panel.Children.Add(toolStrip);
            panel.Children.Add(textEditor);

            SetWordWrap();
            DisplayActiveCategory();
            ProjectService.SolutionLoaded += SolutionLoaded;

            textEditor.TextArea.DefaultInputHandler.NestedInputHandlers.Add(new SearchInputHandler(textEditor.TextArea));
        }
Beispiel #2
0
        protected override ToolBar CreateToolBar()
        {
            ToolBar toolbar = ToolBarService.CreateToolBar(myPanel, this, "/SharpDevelop/Pads/BreakpointPad/Toolbar");

            toolbar.SetValue(Grid.RowProperty, 0);
            return(toolbar);
        }
        public ProjectBrowserPanel()
        {
            projectBrowserControl = new ProjectBrowserControl();
            projectBrowserControl.VerticalAlignment   = VerticalAlignment.Stretch;
            projectBrowserControl.HorizontalAlignment = HorizontalAlignment.Stretch;

            DockPanel.SetDock(projectBrowserControl, Dock.Bottom);
            //Controls.Add(projectBrowserControl);
            dockPanel = new DockPanel();
            dockPanel.LastChildFill = true;


            if (SD.AddInTree.GetTreeNode("/SharpDevelop/Pads/ProjectBrowser/ToolBar/Standard", false) != null)
            {
                toolStrip     = ToolBarService.CreateToolBar(this, this, "/SharpDevelop/Pads/ProjectBrowser/ToolBar/Standard");
                standardItems = new object[toolStrip.Items.Count];
                toolStrip.Items.CopyTo(standardItems, 0);
                toolStrip.Margin = new Thickness(0, 5, 0, 5);

                DockPanel.SetDock(toolStrip, Dock.Top);
                dockPanel.Children.Add(toolStrip);
                Style tbStyle = Application.Current.TryFindResource("MaterialDesignToolBar") as Style;
                if (tbStyle != null)
                {
                    toolStrip.Style = tbStyle;
                }
            }

            dockPanel.Children.Add(projectBrowserControl);
            this.Content = dockPanel;


            projectBrowserControl.TreeView.SelectedItemChanging += projectBrowserControl_TreeView_SelectedItemChanging;
        }
        public BreakPointsPad()
        {
            var res = new CommonResources();

            res.InitializeComponent();

            Grid    grid    = (Grid)this.Control;
            ToolBar toolbar = ToolBarService.CreateToolBar(grid, this, "/SharpDevelop/Pads/BreakpointPad/Toolbar");

            grid.Children.Add(toolbar);

            this.control.listView.View = (GridView)res["breakpointsGridView"];
            this.control.listView.SetValue(GridViewColumnAutoSize.AutoWidthProperty, "35;50%;50%");
        }
Beispiel #5
0
        void InitializePadContent()
        {
            IReadOnlyList <string> tokens = SD.ParserService.TaskListTokens;

            foreach (string token in tokens)
            {
                if (!this.displayedTokens.ContainsKey(token))
                {
                    this.displayedTokens.Add(token, true);
                }
            }

            toolBar = ToolBarService.CreateToolBar(contentPanel, this, "/SharpDevelop/Pads/TaskList/Toolbar");
            var items = (IList)toolBar.ItemsSource;

            foreach (string token in tokens)
            {
                items.Add(new Separator());
                items.Add(new TaskListTokensToolbarCheckBox(token));
            }

            toolBar.Items.OfType <ComboBox>().ForEach(b => b.MinWidth = 75);

            contentPanel.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            contentPanel.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(1, GridUnitType.Star)
            });

            contentPanel.Children.Add(toolBar);
            contentPanel.Children.Add(taskView);
            Grid.SetRow(taskView, 1);

            taskView.ItemsSource       = tasks;
            taskView.MouseDoubleClick += TaskViewMouseDoubleClick;
            taskView.Style             = (Style) new TaskViewResources()["TaskListView"];
            taskView.ContextMenu       = MenuService.CreateContextMenu(taskView, DefaultContextMenuAddInTreeEntry);

            taskView.CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy, ExecuteCopy, CanExecuteCopy));
            taskView.CommandBindings.Add(new CommandBinding(ApplicationCommands.SelectAll, ExecuteSelectAll, CanExecuteSelectAll));
        }
        public ErrorListPad()
        {
            instance   = this;
            properties = PropertyService.NestedProperties("ErrorListPad");

            TaskService.Cleared         += TaskServiceCleared;
            TaskService.Added           += TaskServiceAdded;
            TaskService.Removed         += TaskServiceRemoved;
            TaskService.InUpdateChanged += delegate {
                if (!TaskService.InUpdate)
                {
                    InternalShowResults();
                }
            };

            SD.BuildService.BuildFinished    += ProjectServiceEndBuild;
            SD.ProjectService.SolutionOpened += OnSolutionOpen;
            SD.ProjectService.SolutionClosed += OnSolutionClosed;
            errors = new ObservableCollection <SDTask>(TaskService.Tasks.Where(t => t.TaskType != TaskType.Comment));

            toolBar = ToolBarService.CreateToolBar(contentPanel, this, "/SharpDevelop/Pads/ErrorList/Toolbar");

            contentPanel.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            contentPanel.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(1, GridUnitType.Star)
            });
            contentPanel.Children.Add(toolBar);
            contentPanel.Children.Add(errorView);
            Grid.SetRow(errorView, 1);
            errorView.ItemsSource       = errors;
            errorView.MouseDoubleClick += ErrorViewMouseDoubleClick;
            errorView.Style             = (Style) new TaskViewResources()["TaskListView"];
            errorView.ContextMenu       = MenuService.CreateContextMenu(this, DefaultContextMenuAddInTreeEntry);

            errorView.CommandBindings.Add(new CommandBinding(ApplicationCommands.Copy, ExecuteCopy, CanExecuteCopy));
            errorView.CommandBindings.Add(new CommandBinding(ApplicationCommands.SelectAll, ExecuteSelectAll, CanExecuteSelectAll));

            InternalShowResults();
        }
Beispiel #7
0
        public WatchPad()
        {
            var res = new CommonResources();

            res.InitializeComponent();

            panel = new Grid();

            toolBar = ToolBarService.CreateToolBar(toolBar, this, "/SharpDevelop/Pads/WatchPad/ToolBar");
            panel.Children.Add(toolBar);

            tree          = new SharpTreeView();
            tree.Root     = new WatchRootNode();
            tree.ShowRoot = false;
            tree.View     = (GridView)res["variableGridView"];
            tree.SetValue(GridViewColumnAutoSize.AutoWidthProperty, "50%;25%;25%");
            tree.MouseDoubleClick += delegate(object sender, MouseButtonEventArgs e) {
                if (this.tree.SelectedItem == null)
                {
                    AddWatch(focus: true);
                }
            };
            panel.Children.Add(tree);

            panel.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            panel.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(1, GridUnitType.Star)
            });

            Grid.SetRow(tree, 1);

//			ProjectService.SolutionLoaded  += delegate { LoadNodes(); };
//			SD.ProjectService.CurrentSolution.PreferencesSaving += delegate { SaveNodes(); };
//			LoadNodes();

            WindowsDebugger.RefreshingPads += RefreshPad;
            RefreshPad();
        }
Beispiel #8
0
        public CompilerMessageView()
        {
            instance = this;

            AddCategory(TaskService.BuildMessageViewCategory);

            textEditor.IsReadOnly  = true;
            textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");

            properties = ICSharpCode.Core.PropertyService.NestedProperties(OutputWindowOptionsPanel.OutputWindowsProperty);

            SetTextEditorFont();

            properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);

            MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView);
            textEditor.TextArea.TextView.ElementGenerators.OfType <LinkElementGenerator>().ForEach(x => x.RequireControlModifierForClick = false);

            toolStrip = ToolBarService.CreateToolBar(panel, this, "/SharpDevelop/Pads/CompilerMessageView/Toolbar");
            toolStrip.Items.OfType <ComboBox>().ForEach(b => b.MinWidth = 75);

            panel.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            panel.RowDefinitions.Add(new RowDefinition {
                Height = new GridLength(1, GridUnitType.Star)
            });

            panel.Children.Add(toolStrip);
            panel.Children.Add(textEditor);
            Grid.SetRow(textEditor, 1);

            SetWordWrap();
            DisplayActiveCategory();
            SD.ProjectService.CurrentSolutionChanged += OnSolutionLoaded;

            SearchPanel.Install(textEditor);
        }
Beispiel #9
0
        public BookmarkPad()
        {
            ToolBar toolbar = ToolBarService.CreateToolBar((UIElement)this.Control, this, "/SharpDevelop/Pads/BookmarkPad/Toolbar");

            this.control.Children.Add(toolbar);
        }
Beispiel #10
0
 protected virtual ToolBar BuildToolBar()
 {
     return(ToolBarService.CreateToolBar(panel, this, toolBarTreePath));
 }
Beispiel #11
0
 protected override ToolBar BuildToolBar()
 {
     return(ToolBarService.CreateToolBar(console, this, debuggerConsoleToolBarTreePath));
 }
 protected override ToolBar BuildToolBar()
 {
     return(ToolBarService.CreateToolBar(panel, this, "/SharpDevelop/Pads/ParallelStacksPad/ToolBar"));
 }
 /// <summary>
 /// Virtual method so we can override this method and return
 /// a dummy ToolBar when testing.
 /// </summary>
 protected virtual ToolBar CreateToolBar(string name)
 {
     Debug.Assert(panel != null);
     return(ToolBarService.CreateToolBar(panel, panel, name));
 }
 /// <summary>
 /// Virtual method so we can override this method and return
 /// a dummy ToolBar when testing.
 /// </summary>
 protected virtual ToolBar CreateToolBar(string name)
 {
     Debug.Assert(treeView != null);
     return(ToolBarService.CreateToolBar(treeView, treeView, name));
 }