Beispiel #1
0
        public ProjectPanel()
        {
            InitializeComponent();

            this.VisibleChanged += ProjectPanel_VisibleChanged;

            UpdateButtonsTooltips();

            //tabControl1.Bac
            tabControl1.AddTab("Code Map", mapPanel  = new CodeMapPanel());
            tabControl1.AddTab("Favorites", favPanel = new FavoritesPanel());

            favPanel.OnOpenScriptRequest = file =>
            {
                if (file.EndsWith(".cs", StringComparison.OrdinalIgnoreCase))
                {
                    LoadScript(file);
                }
                else
                {
                    Npp.Editor.OpenFile(file, true);
                }
            };

            RefreshControls();
            ReloadScriptHistory();
            LoadReleaseNotes();

            treeView1.AttachMouseControlledZooming();

            toolStripPersistance = new ToolStripPersistance(toolStrip1, settingsFile);
            toolStripPersistance.Load();
        }
Beispiel #2
0
 public CodeMapPanel()
 {
     InitializeComponent();
     Instance                    = this;
     watcher                     = new FileSystemWatcher();
     watcher.NotifyFilter        = NotifyFilters.LastWrite;
     watcher.Changed            += watcher_Changed;
     watcher.EnableRaisingEvents = false;
     ErrorMessage                = null;
     membersList.AttachMouseControlledZooming(MembersList_OnZoom);
     UpdateItemHeight();
 }
Beispiel #3
0
        static public void OnCurrentFileChanged()
        {
            if (CodeMapPanel != null)
            {
                CodeMapPanel.RefreshContent();
            }

            if (Npp.Editor.IsCurrentDocScriptFile() && Config.Instance.UseRoslynProvider && Config.Instance.StartRoslynServerAtNppStartup)
            {
                CSScriptHelper.InitRoslyn();
            }
        }
Beispiel #4
0
 static public void Repaint()
 {
     if (ProjectPanel != null)
     {
         ProjectPanel.Refresh();
     }
     if (CodeMapPanel != null)
     {
         CodeMapPanel.Refresh();
     }
     if (outputPanel != null)
     {
         outputPanel.Refresh();
     }
 }
Beispiel #5
0
        public ProjectPanel()
        {
            InitializeComponent();

            this.VisibleChanged += ProjectPanel_VisibleChanged;

            UpdateButtonsTooltips();

            Debugger.OnDebuggerStateChanged += RefreshControls;

            //tabControl1.Bac
            tabControl1.AddTab("Code Map", mapPanel  = new CodeMapPanel());
            tabControl1.AddTab("Favorites", favPanel = new FavoritesPanel());

            favPanel.OnOpenScriptRequest = file =>
            {
                if (file.EndsWith(".cs", StringComparison.OrdinalIgnoreCase))
                {
                    LoadScript(file);
                }
                else
                {
                    Npp.OpenFile(file);
                }
            };

            RefreshControls();
            ReloadScriptHistory();
            LoadReleaseNotes();

            treeView1.AttachMouseControlledZooming();

            toolStripPersistance = new ToolStripPersistance(toolStrip1, settingsFile);
            toolStripPersistance.Load();

            //buttons = toolStrip1.Items.Cast<ToolStripItem>().ToArray();
            //ButtonsDefaultLayout = buttons.Select(x => x.Name.StartsWith("toolStripSeparator") ? "---" : x.Name).ToArray();

            //OrrangeToolstripButtons();

            //watcher = new FileSystemWatcher(Plugin.ConfigDir, "toolbar_buttons.txt");
            //watcher.NotifyFilter = NotifyFilters.LastWrite;
            //watcher.Changed += watcher_Changed;
            //watcher.EnableRaisingEvents = true;
        }