Exemplo n.º 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();
        }
Exemplo n.º 2
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;
        }