Beispiel #1
0
        private void radMenuItem13_Click(object sender, EventArgs e)
        {
            var np = new NewItemDialog();

            if (np.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                var f = new Core.ProjectSystem.File();
                f.Name = np.Filename;
                f.Src  = np.Filename;
                f.ID   = np.Type;

                Workspace.SelectedProject.Files.Add(f);

                explorerTreeView.Nodes.Clear();
                explorerTreeView.Nodes.Add(SolutionExplorer.Build(Workspace.Solution, solutionContextMenu, projectContextMenu, fileContextMenu));

                Workspace.Solution.Save(Workspace.SolutionPath);
                var fi = new FileInfo(Workspace.SolutionPath).Directory.FullName + "\\" + f.Name;

                System.IO.File.WriteAllBytes(fi, np.Template.Raw);

                np.Plugin.Events.Fire("OnCreateItem", f, np.Template.Raw);

                var doc = new DocumentWindow(f.Name);
                doc.Controls.Add(ViewSelector.Select(np.Template, System.IO.File.ReadAllBytes(fi), f, np.Template.AutoCompletionProvider as IntellisenseProvider).GetView());

                AddDocument(doc);
            }
        }
Beispiel #2
0
        private void OpenHealingSummary()
        {
            if (HealingWindow?.IsOpen == true)
            {
                HealingWindow.Close();
            }
            else
            {
                var healingSummary = new HealingSummary();
                healingSummary.EventsSelectionChange += HealingSummary_SelectionChanged;
                HealingWindow = new DocumentWindow(dockSite, "healingSummary", "Healing Summary", null, healingSummary);
                IconToWindow[healingSummaryIcon.Name] = HealingWindow;

                Helpers.OpenWindow(HealingWindow);
                if (DamageWindow?.IsOpen == true || TankingWindow?.IsOpen == true)
                {
                    HealingWindow.MoveToPreviousContainer();
                }

                Helpers.RepositionCharts(HealingWindow, DamageChartWindow, TankingChartWindow, HealingChartWindow);

                if (HealingStatsManager.Instance.GetGroupCount() > 0)
                {
                    // keep chart request until resize issue is fixed. resetting the series fixes it at a minimum
                    var healingOptions = new GenerateStatsOptions()
                    {
                        RequestSummaryData = true
                    };
                    Task.Run(() => HealingStatsManager.Instance.RebuildTotalStats(healingOptions));
                }
            }
        }
        public static CustomTaskPane RegisterTaskPane(Type taskPaneType, string taskPaneTitle,
                                                      EventHandler visibleChangeEventHandler = null, EventHandler dockPositionChangeEventHandler = null)
        {
            try
            {
                CustomTaskPane taskPane = Globals.ThisAddIn.GetActivePane(taskPaneType);
                if (taskPane != null)
                {
                    return(taskPane);
                }

                object control = CreateInstance(taskPaneType);

                UserControl taskPaneControl = (UserControl)control;
                if (taskPaneControl == null)
                {
                    throw new InvalidCastException("Failed to convert " + taskPaneType + " to UserControl.");
                }

                DocumentWindow activeWindow = Globals.ThisAddIn.Application.ActiveWindow;

                return(Globals.ThisAddIn.RegisterTaskPane(taskPaneControl, taskPaneTitle, activeWindow,
                                                          control.GetIWpfControl(),
                                                          visibleChangeEventHandler, dockPositionChangeEventHandler));
            }
            catch (Exception e)
            {
                Log.Logger.LogException(e, "RegisterTaskPane_Extension");
                Views.ErrorDialogBox.ShowDialog("PowerPointLabs", e.Message, e);
                return(null);
            }
        }
Beispiel #4
0
        private void radMenuItem13_Click(object sender, EventArgs e)
        {
            var np = new NewItemDialog();

            if (np.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                var f = new File();
                f.Name = np.Filename;
                f.Src  = np.Filename;
                f.ID   = np.Type;

                Workspace.SelectedProject.Files.Add(f);

                radTreeView1.Nodes.Clear();
                radTreeView1.Nodes.Add(SolutionExplorer.Build(Workspace.Solution));

                Workspace.Solution.Save(Workspace.SolutionPath);
                var p = np.Template;

                var editor = EditorBuilder.Build(p.Extension, null, null, null);

                var doc = new DocumentWindow(f.Name);
                doc.Controls.Add(editor);

                radDock1.AddDocument(doc);
            }
        }
        private void SaveDocument(DocumentWindow window)
        {
            NAntDocument document = _documents[window];

            if (document.FileType == FileType.New)
            {
                SaveDocumentAs(window);
            }
            else if (IsDirty(window))
            {
                try
                {
                    document.Save(window.Contents, true);

                    if (window == ActiveWindow)
                    {
                        List <IBuildTarget> targets = _mainForm.SelectedTargets;
                        UpdateTitle();
                        UpdateDisplay();
                        _mainForm.SelectedTargets = targets;
                    }
                }
                catch (Exception ex)
                {
                    Errors.CouldNotSave(document.Name, ex.Message);
                }
            }
        }
Beispiel #6
0
            public void DocumentWindowDock(RadDock Dock)
            {
                DocumentWindow documentTop = new DocumentWindow();

                documentTop.Text = "New Document";
                Dock.AddDocument(documentTop);
            }
        protected override ShapeRange ExecutePasteAction(string ribbonId, PowerPointPresentation presentation, PowerPointSlide slide,
                                                         ShapeRange selectedShapes, ShapeRange selectedChildShapes)
        {
            PPMouse.Coordinates coordinates  = PPMouse.RightClickCoordinates;
            DocumentWindow      activeWindow = this.GetCurrentWindow();

            float positionX = 0;
            float positionY = 0;

            if (activeWindow.ActivePane.ViewType == PpViewType.ppViewSlide)
            {
                int xref = activeWindow.PointsToScreenPixelsX(100) - activeWindow.PointsToScreenPixelsX(0);
                int yref = activeWindow.PointsToScreenPixelsY(100) - activeWindow.PointsToScreenPixelsY(0);
                positionX = ((coordinates.X - activeWindow.PointsToScreenPixelsX(0)) / xref) * 100;
                positionY = ((coordinates.Y - activeWindow.PointsToScreenPixelsY(0)) / yref) * 100;
            }

            ShapeRange pastingShapes = ClipboardUtil.PasteShapesFromClipboard(presentation, slide);

            if (pastingShapes == null)
            {
                Logger.Log("PasteLab: Could not paste clipboard contents.");
                MessageBox.Show(PasteLabText.ErrorPaste, PasteLabText.ErrorDialogTitle);
                return(null);
            }

            return(PasteAtCursorPosition.Execute(presentation, slide, pastingShapes, positionX, positionY));
        }
Beispiel #8
0
 public void AddDocument(string title, DockPosition pos, Control c)
 {
     c.Dock = DockStyle.Fill;
     var windowTop = new DocumentWindow { Text = title, Name = title };
     windowTop.Controls.Add(c);
     this.rda.AddDocument(windowTop, pos);
 }
Beispiel #9
0
            public void MulitpleWindowDock(RadDock Dock)
            {
                ToolWindow windowLeft = new ToolWindow();

                windowLeft.Text = "Window Left";
                Dock.DockWindow(windowLeft, DockPosition.Left);
                ToolWindow windowBottom = new ToolWindow();

                windowBottom.Text = "Window Bottom";
                Dock.DockWindow(windowBottom, DockPosition.Bottom);
                ToolWindow windowBottomRight = new ToolWindow();

                windowBottomRight.Text = "Window Bottom Right";
                Dock.DockWindow(windowBottomRight, windowBottom, DockPosition.Right);
                DocumentWindow document1 = new DocumentWindow();

                document1.Text = "Document 1";
                Dock.AddDocument(document1);
                DocumentWindow document2 = new DocumentWindow();

                document2.Text = "Document 2";
                Dock.AddDocument(document2);
                DocumentWindow document3 = new DocumentWindow();

                document3.Text = "Document 3";
                Dock.AddDocument(document3);
            }
Beispiel #10
0
        internal void NewBlankDocument()
        {
            NAntDocument   doc    = new NAntDocument(_outputWindow, _options);
            DocumentWindow window = new DocumentWindow(doc.FullName);

            SetupWindow(window, doc);
        }
        protected override ShapeRange ExecutePasteAction(string ribbonId, PowerPointPresentation presentation, PowerPointSlide slide,
                                                         ShapeRange selectedShapes, ShapeRange selectedChildShapes)
        {
            PPMouse.Coordinates coordinates  = PPMouse.RightClickCoordinates;
            DocumentWindow      activeWindow = this.GetCurrentWindow();

            float positionX = 0;
            float positionY = 0;

            if (activeWindow.ActivePane.ViewType == PpViewType.ppViewSlide)
            {
                int xref = activeWindow.PointsToScreenPixelsX(100) - activeWindow.PointsToScreenPixelsX(0);
                int yref = activeWindow.PointsToScreenPixelsY(100) - activeWindow.PointsToScreenPixelsY(0);
                positionX = ((coordinates.X - activeWindow.PointsToScreenPixelsX(0)) / xref) * 100;
                positionY = ((coordinates.Y - activeWindow.PointsToScreenPixelsY(0)) / yref) * 100;
            }

            ShapeRange pastingShapes = PasteShapesFromClipboard(slide);

            if (pastingShapes == null)
            {
                return(null);
            }

            return(PasteAtCursorPosition.Execute(presentation, slide, pastingShapes, positionX, positionY));
        }
        /////////////////////////////////////////////////////////////////////////////////////////////////////
        // NON-PUBLIC PROCEDURES
        /////////////////////////////////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Creates the designer.
        /// </summary>
        private void CreateDesigner()
        {
            // Create an instance of WorkflowDesigner class.
            designer = new WorkflowDesigner();

            // Load a Sequence as a default
            var root = new Sequence()
            {
                Activities =
                {
                    new Assign(),
                    new WriteLine()
                }
            };

            designer.Load(root);

            // Create an expression editor service
            expressionEditorService = new ExpressionEditorService(designer);
            designer.Context.Services.Publish <IExpressionEditorService>(expressionEditorService);

            // Add to a document window
            var documentWindow = new DocumentWindow(dockSite, "Designer1", "Designer1", null, designer.View);

            documentWindow.CanClose = false;
            documentWindow.Activate();
        }
Beispiel #13
0
        private bool OpenLineChart(DocumentWindow window, DocumentWindow other1, DocumentWindow other2, FrameworkElement icon, string title,
                                   List <string> choices, bool includePets, out DocumentWindow newWindow)
        {
            bool updated = false;

            newWindow = window;

            if (newWindow?.IsOpen == true)
            {
                newWindow.Close();
                newWindow = null;
            }
            else
            {
                updated = true;
                var chart = new LineChart(choices, includePets);
                newWindow = new DocumentWindow(dockSite, title, title, null, chart);
                IconToWindow[icon.Name] = newWindow;

                Helpers.OpenWindow(newWindow);
                newWindow.CanFloat = true;
                newWindow.CanClose = true;

                if (other1?.IsOpen == true || other2?.IsOpen == true)
                {
                    newWindow.MoveToNextContainer();
                }
                else
                {
                    newWindow.MoveToNewHorizontalContainer();
                }
            }

            return(updated);
        }
Beispiel #14
0
        private void OpenTankingSummary()
        {
            if (TankingWindow?.IsOpen == true)
            {
                TankingWindow.Close();
            }
            else
            {
#pragma warning disable CA2000 // Dispose objects before losing scope
                var tankingSummary = new TankingSummary();
#pragma warning restore CA2000 // Dispose objects before losing scope

                tankingSummary.EventsSelectionChange += TankingSummary_SelectionChanged;
                TankingWindow = new DocumentWindow(dockSite, "tankingSummary", "Tanking Summary", null, tankingSummary);
                IconToWindow[tankingSummaryIcon.Name] = TankingWindow;

                Helpers.OpenWindow(TankingWindow);
                if (DamageWindow?.IsOpen == true || HealingWindow?.IsOpen == true)
                {
                    TankingWindow.MoveToPreviousContainer();
                }

                RepositionCharts(TankingWindow);

                if (TankingStatsManager.Instance.GetGroupCount() > 0)
                {
                    // keep chart request until resize issue is fixed. resetting the series fixes it at a minimum
                    var tankingOptions = new GenerateStatsOptions()
                    {
                        RequestSummaryData = true
                    };
                    Task.Run(() => TankingStatsManager.Instance.RebuildTotalStats(tankingOptions));
                }
            }
        }
        /// <summary>
        /// Pastes clipboard content into new temp slide using the DocumentWindow's View.Paste()
        /// Though this paste will work for most clipboard objects (even web pictures), it will change the undo history.
        /// </summary>
        private static Shape TryPastingOntoView(PowerPointPresentation pres, PowerPointSlide tempSlide, PowerPointSlide origSlide)
        {
            try
            {
                // Utilises deprecated Globals class as ClipboardUtil does not utilise ActionFramework
                DocumentWindow workingWindow = Globals.ThisAddIn.Application.ActiveWindow;
                pres.GotoSlide(tempSlide.Index);
                int origShapesCount = tempSlide.Shapes.Count;

                // Note: This will change the undo history
                workingWindow.View.Paste();
                pres.GotoSlide(origSlide.Index);
                int finalShapesCount = tempSlide.Shapes.Count;
                if (finalShapesCount > origShapesCount)
                {
                    return(tempSlide.Shapes.Range()[finalShapesCount]);
                }
                else
                {
                    return(null);
                }
            }
            catch (COMException e)
            {
                // May be thrown if cannot be pasted
                Logger.LogException(e, "TryPastingOntoView");
                return(null);
            }
        }
Beispiel #16
0
        private void SaveDocumentAs(DocumentWindow window)
        {
            string filename = BuildFileBrowser.BrowseForSave();

            if (filename != null)
            {
                NAntDocument document = _documents[window];

                try
                {
                    document.SaveAs(filename, window.Contents);
                    document.BuildFinished += _mainForm.SetStateStopped;

                    Settings.Default.SaveScriptInitialDir = document.Directory;
                    Settings.Default.Save();

                    RecentItems.Add(filename);
                    _mainForm.CreateRecentItemsMenu();
                    UpdateTitle();
                    UpdateDisplay();
                }
                catch (Exception ex)
                {
                    Errors.CouldNotSave(document.Name, ex.Message);
                }
            }
        }
        // ******************************************************************
        void ObjCollCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            // Find the DataTemplate
            if (e.Action == NotifyCollectionChangedAction.Add)
            {
                foreach (object obj in e.NewItems)
                {
                    // Here th obj Type is the key to the resource, it works but
                    var key          = new System.Windows.DataTemplateKey(obj.GetType());
                    var dataTemplate = (DataTemplate)DockSite.FindResource(key);

                    var userControl = dataTemplate.LoadContent() as UserControl;
                    if (userControl != null)
                    {
                        userControl.DataContext = obj;

                        var documentWindow = new DocumentWindow(DockSite, null, "Title from viemodel", null, userControl);
                        documentWindow.Description = "viewModel.Description";

                        // Activate the document
                        documentWindow.Activate();
                    }
                }
            }
        }
Beispiel #18
0
        internal void LoadDocument(string filename)
        {
            DocumentWindow window = FindDocumentWindow(filename);

            if (window != null)
            {
                window.Select();
                ReloadWindow(window);
            }
            else if (!File.Exists(filename))
            {
                Errors.FileNotFound(filename);
            }
            else
            {
                NAntDocument doc = new NAntDocument(filename, _outputWindow, _options);
                doc.BuildFinished += _mainForm.SetStateStopped;

                Settings.Default.OpenScriptDir = doc.Directory;
                Settings.Default.Save();

                window = new DocumentWindow(doc.FullName);
                SetupWindow(window, doc);

                RecentItems.Add(doc.FullName);

                // Parse the file in the background
                _loader.RunWorkerAsync();
            }
        }
Beispiel #19
0
 // Main Menu
 private void MenuItemWindowClick(object sender, RoutedEventArgs e)
 {
     if (e.Source == damageChartMenuItem)
     {
         OpenDamageChart();
     }
     else if (e.Source == healingChartMenuItem)
     {
         OpenHealingChart();
     }
     else if (e.Source == tankingChartMenuItem)
     {
         OpenTankingChart();
     }
     else if (e.Source == damageSummaryMenuItem)
     {
         OpenDamageSummary();
     }
     else if (e.Source == healingSummaryMenuItem)
     {
         OpenHealingSummary();
     }
     else if (e.Source == tankingSummaryMenuItem)
     {
         OpenTankingSummary();
     }
     else if (e.Source == chatMenuItem)
     {
         ChatWindow = Helpers.OpenWindow(dockSite, ChatWindow, typeof(ChatViewer), "chatWindow", "Chat Archive");
         IconToWindow[chatIcon.Name] = ChatWindow;
     }
     else if (e.Source == eventMenuItem)
     {
         EventWindow = Helpers.OpenWindow(dockSite, EventWindow, typeof(EventViewer), "eventWindow", "Special Events");
         IconToWindow[eventIcon.Name] = EventWindow;
     }
     else if (e.Source == playerLootMenuItem)
     {
         LootWindow = Helpers.OpenWindow(dockSite, LootWindow, typeof(LootViewer), "lootWindow", "Looted Items");
         IconToWindow[playerLootIcon.Name] = LootWindow;
     }
     else if (e.Source == eqLogMenuItem)
     {
         EQLogWindow = Helpers.OpenWindow(dockSite, EQLogWindow, typeof(EQLogViewer), "eqLogWindow", "Full Log Search");
         IconToWindow[eqLogIcon.Name] = EQLogWindow;
     }
     else if (e.Source == npcStatsMenuItem)
     {
         NpcStatsWindow = Helpers.OpenWindow(dockSite, NpcStatsWindow, typeof(NpcStatsViewer), "npcStatsWindow", "NPC Spell Stats");
         IconToWindow[npcStatsIcon.Name] = NpcStatsWindow;
     }
     else
     {
         if ((sender as MenuItem)?.Icon is ImageAwesome icon && IconToWindow.ContainsKey(icon.Name))
         {
             Helpers.OpenWindow(IconToWindow[icon.Name]);
         }
     }
 }
Beispiel #20
0
        private void btnListShapeInfo_Click(object sender, EventArgs e)
        {
            Presentation   presentation = Globals.ThisAddIn.Application.ActivePresentation;
            DocumentWindow window       = Globals.ThisAddIn.Application.ActiveWindow;
            Shape          shape        = window.Selection.ShapeRange[1];

            DisplayShapeInfo(shape);
        }
 private void button2_Click(object sender, EventArgs e)
 {
     DocumentWindow MainTab = new DocumentWindow();
     //HistoryForm Hst = new HistoryForm();
     //Hst.Dock = DockStyle.Fill;
     //MainTab.Controls.Add(Hst);
     radDock1.AddDocument(MainTab, DockPosition.Fill);
 }
 private void button1_Click_1(object sender, EventArgs e)
 {
     DocumentWindow tab = new DocumentWindow();
     Browser br = new Browser();
     br.Dock = DockStyle.Fill;
     tab.Controls.Add(br);
     radDock1.AddDocument(tab, DockPosition.Fill);
 }
Beispiel #23
0
        /// <summary>
        /// Открыть документ
        /// </summary>
        /// <param name="banRepeat">запрет изменения данных документа</param>
        public static void OpenDocumentWindow(ref bool banRepeat)
        {
            Presenter.SelectedObject = null;
            banRepeat = true;
            DocumentWindow window = new DocumentWindow();

            window.ShowDialog();
        }
Beispiel #24
0
        private void btnUpdateName_Click(object sender, EventArgs e)
        {
            DocumentWindow window = Globals.ThisAddIn.Application.ActiveWindow;
            Slide          slide  = window.Selection.SlideRange[1];
            Shape          shape  = window.Selection.ShapeRange[1];

            shape.Name = txtName.Text;
        }
Beispiel #25
0
        private void BtnCreateDocument_Click(object sender, RoutedEventArgs e)
        {
            var documentWindow = new DocumentWindow();

            documentWindow.ShowDialog();
            _allProducts = ProductTable.SelectAllProducts();
            FillRadGridView(null, null);
        }
 public static DocumentWindow GetDocumentWindowInstance()
 {
     if (documentWindow == null || !documentWindow.IsEnabled)
     {
         documentWindow = new DocumentWindow();
     }
     return(documentWindow);
 }
Beispiel #27
0
 private void ShowMDIChild(DocumentWindow frm_template, string text, ToolStripMenuItem mni)
 {
     frm_template.MdiParent = this;
     frm_template.MnItem = mni;
     frm_template.TabText = text;
     frm_template.Show(dockPanel, DockState.Document);
     mni.Enabled = false;
 }
Beispiel #28
0
		public DocumentWindow CreateDocumentWindow(DockSite dockSite, string name, string title, ImageSource image,
			object content)
		{
			ParameterNullCheck(dockSite);
			// Create the window (using this constructor registers the document window with the DockSite)
			var doc = new DocumentWindow(dockSite, name, title, image, content);

			return doc;
		}
Beispiel #29
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            var startwindow = new DocumentWindow();

            startwindow.Text = "StartPage";
            startwindow.Controls.Add(new StartPageCtrl()
            {
                Dock = DockStyle.Fill
            });

            dock.AddDocument(startwindow);

            /*   var pf = new ProjectFile();
             *
             * pf.Body.Properties.Add("Version", "1.0.0.0");
             * pf.ProjectHeader = new Header() { Name = "TestProject", Type = ProjectType.WindowsFormsApplication };
             *
             * ProjectFile.Save("test.ecproj", ref pf);*/

            if (File.Exists("dock.xml"))
            {
                //  this.radDock1.LoadFromXml("dock.xml");
            }


            engine = new Engine {
                Flag = Engine.ExecutanFlags.RamOptimized
            };
            engine.Evaluate(this.fastColoredTextBox1.Text);
            console.Clear();

            if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())
            {
                var updController = new updateController
                {
                    updateUrl = "http://eclang.tk/updates/",
                    projectId = "8ffc8e6d-93d9-4bc2-a48e-238f27efae9e",
                    publicKey =
                        "<RSAKeyValue><Modulus>z6FnsZcLX3Cl864s1x/8fR8/Mg1kIJIiFBouMUdRpMxe13t5J/B4S3obzr94oQgjiXR/09vjKUQdoAsUm1AwxjI+7TkR3TEnu2HHEw2O8e4gkbfnwHqODtSWuHzsIxFnhhYcmVWfY/eRniilfnUBb6bcVomFUxwQFfAqXl8vC58iVjIW+4Ir05qTTH3KIf24J+ADoLYuX0rQD6wCdfmWCII7QuqkN7NBfmoq1G2Ol5p366ILnANMdz+3n+u6lkkjl+RVEAoG/pDaRIbSnb52k0p517Cb1N4D3zfr3cftYLKQImDAc9xtC9V8F2nVdjTz05pooZuONrg8J7lmwkYER1+xDnzAg4hL0g2jefjsbrlUuvs0/nIff8DKGsqkAzg/Qg5ylYdQ/lrge6tdISrIql1PZY6qo6VlllCDn8yLhpdZfUuBMEdVrW0xLo7qWZ8Y9dHsO2It52BtvAtEpKwwPOLyL9PTU+A9DnbdSgVckdDye8dVgcZeApsrIf1qWRJyqcdXjP9Y4pKefYcBizCIjL4gGUQilR5I7WsqXfAwPkqEcWCPtaBrX8jb9JmGqY0aUH7FDYdoK0kmkaM2PGiSMaugTnfcs0HUFStj4Liaz7I0b3zM+sN7sx/dW/0KYDXCNZWVxFndcG9aZk/0umaA7q+ISITadaY+axa3DsVwelU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>",
                    releaseFilter =
                    {
                        checkForFinal = true,
                        checkForBeta  = true,
                        checkForAlpha = true
                    },
                    restartApplication       = true,
                    autoCloseHostApplication = true,
                    retrieveHostVersion      = true,
                    Language = Languages.Auto
                };

                if (updController.checkForUpdates())
                {
                    updController.updateInteractive(this);
                }
            }
        }
Beispiel #30
0
        private void btnUpdateColor_Click(object sender, EventArgs e)
        {
            DocumentWindow window = Globals.ThisAddIn.Application.ActiveWindow;
            Slide          slide  = window.Selection.SlideRange[1];
            //Shape shape = window.Selection.ShapeRange[txtShapeName.Text];
            Shape shape = slide.Shapes[txtShapeName.Text];

            shape.Fill.ForeColor.RGB = int.Parse(txtColorValue.Text);
        }
Beispiel #31
0
        private void btnUpdateForeColor_Click(object sender, EventArgs e)
        {
            Presentation   presentation = Globals.ThisAddIn.Application.ActivePresentation;
            DocumentWindow window       = Globals.ThisAddIn.Application.ActiveWindow;
            Slide          slide        = window.Selection.SlideRange[1];
            Shape          shape        = window.Selection.ShapeRange[1];

            shape.Fill.ForeColor.RGB = ColorTranslator.ToOle(pnlForeColor.ForeColor);
        }
Beispiel #32
0
        public void SelectWindow(string filename)
        {
            DocumentWindow window = FindDocumentWindow(filename);

            if (window != null)
            {
                window.Activate();
            }
        }
Beispiel #33
0
        public DocumentWindow CreateDocumentWindow(DockSite dockSite, string name, string title, ImageSource image,
                                                   object content)
        {
            ParameterNullCheck(dockSite);
            // Create the window (using this constructor registers the document window with the DockSite)
            var doc = new DocumentWindow(dockSite, name, title, image, content);

            return(doc);
        }
Beispiel #34
0
        private void btnUpdateTextFrame1_Click(object sender, EventArgs e)
        {
            Presentation   presentation = Globals.ThisAddIn.Application.ActivePresentation;
            DocumentWindow window       = Globals.ThisAddIn.Application.ActiveWindow;
            Slide          slide        = window.Selection.SlideRange[1];
            Shape          shape        = window.Selection.ShapeRange[1];

            shape.TextFrame.TextRange.Text = txtTextFrame1.Text;
        }
Beispiel #35
0
        private void CreateNewProject(object sender, NewProjectEventArgs e)
        {
            NAntDocument   doc    = new NAntDocument(_outputWindow, _options);
            DocumentWindow window = new DocumentWindow(doc.FullName);

            SetupWindow(window, doc);
            window.Contents = Utils.GetNewDocumentContents(e.Info);
            ParseBuildFile(doc);
        }
        public MainForm()
        {
            InitializeComponent();

            WebCoreConfig webConfig = new WebCoreConfig()
            {
                SaveCacheAndCookies = true,
                HomeURL = "http://www.google.com",
                LogLevel = LogLevel.Verbose
            };
            WebCore.Initialize(webConfig);

            DocumentWindow MainTab = new DocumentWindow();
            MainTab.Text = "Home";
            Browser MainBr = new Browser();
            MainBr.Dock = DockStyle.Fill;
            MainTab.Controls.Add(MainBr);
            radDock1.AddDocument(MainTab, DockPosition.Fill);
        }
Beispiel #37
0
 private void btnBuildings_Click(object sender, EventArgs e)
 {
     if (BuildingDockWindow == null)
     {
         BuildingDockWindow = new DocumentWindow();
         BuildingDockWindow.CloseAction = DockWindowCloseAction.Close;
         fmBuildingList = new frmBuildingList();
         fmBuildingList.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmBuildingList.TopLevel = false;
         fmBuildingList.Dock = DockStyle.Fill;
         BuildingDockWindow.Text = fmBuildingList.Text;
         BuildingDockWindow.Controls.Add(fmBuildingList);
         this.radDock1.AddDocument(BuildingDockWindow);
         fmBuildingList.Show();
     }
     else
     {
         BuildingDockWindow.Show();
     }
     this.radDock1.ActiveWindow = BuildingDockWindow;
 }
Beispiel #38
0
 //User Settings clicked
 private void btnUser_Click(object sender, EventArgs e)
 {
    
     if (UserDockWindow == null)
     {
         UserDockWindow = new DocumentWindow();
         UserDockWindow.CloseAction = DockWindowCloseAction.Close;
         fmUserMain = new frmUserList();
         fmUserMain.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmUserMain.TopLevel = false;
         fmUserMain.Dock = DockStyle.Fill;
         UserDockWindow.Text =  fmUserMain.Text;
         UserDockWindow.Controls.Add(fmUserMain);
         this.radDock1.AddDocument(UserDockWindow);
         fmUserMain.Show();
     }
     else
     {
         UserDockWindow.Show();
     }
     this.radDock1.ActiveWindow = UserDockWindow;
 }
Beispiel #39
0
        private void radDock1_DockWindowClosing(object sender, DockWindowCancelEventArgs e)
        {
            string szActive = radDock1.ActiveWindow.Text;

            switch (szActive)
            {

                case "User List":
                    UserDockWindow = null;
                    break;
                case "Student List":
                    StudentDockWindow = null;
                    break;
                case "Teacher List":
                    TeacherDockWindow = null;
                    break;
                case "Building List":
                    BuildingDockWindow = null;
                    break;
                case "Learning Areas List":
                    LearningAreaDockWindow = null;
                    break;
                case "Time Slots":
                    TimeslotDockWindow = null;
                    break;
                case "Manage Curriculum":
                    CurriculumDockWindow = null;
                    break;
                case "List of Traits":
                    TraitDockWindow = null;
                    break;
                case "Scholarship List":
                    ScholarshipDockWindow = null;
                    break;
                case "List of Student Fees":
                    StudentFeeDockWindow = null;
                    break;
                case "List of HomeRoom Information":
                    GradeSectionDockWindow = null;
                    break;
                case "Student List Selection":
                    PermanentRecordDockWindow = null;
                    break;

                default:
                    break;
            }
        }
 void PowerPointApplicationWindowActivate(Presentation pres, DocumentWindow window)
 {
     NewView(this, new NewViewEventArgs(window, pres, PowerPointRibbonType.PowerPointPresentation.GetEnumDescription()));
 }
Beispiel #41
0
 private void btnTraitsGrading_Click(object sender, EventArgs e)
 {
     if (AdvisoryListDockWindow == null)
     {
         AdvisoryListDockWindow = new DocumentWindow();
         AdvisoryListDockWindow.CloseAction = DockWindowCloseAction.Close;
         fmAdvisersLoad = new frmAdvisersLoad();
         fmAdvisersLoad.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmAdvisersLoad.TopLevel = false;
         fmAdvisersLoad.Dock = DockStyle.Fill;
         AdvisoryListDockWindow.Text = fmAdvisersLoad.Text;
         AdvisoryListDockWindow.Controls.Add(fmAdvisersLoad);
         this.radDock1.AddDocument(AdvisoryListDockWindow);
         fmAdvisersLoad.Show();
     }
     else
     {
         AdvisoryListDockWindow.Show();
     }
     this.radDock1.ActiveWindow = AdvisoryListDockWindow;
 }
Beispiel #42
0
 private void radButtonElement13_Click(object sender, EventArgs e)
 {
     if (PermanentRecordDockWindow == null)
     {
         PermanentRecordDockWindow = new DocumentWindow();
         PermanentRecordDockWindow.CloseAction = DockWindowCloseAction.Close;
         fmStudentSelection = new frmStudentSelection();
         fmStudentSelection.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmStudentSelection.TopLevel = false;
         fmStudentSelection.Dock = DockStyle.Fill;
         PermanentRecordDockWindow.Text = fmStudentSelection.Text;
         PermanentRecordDockWindow.Controls.Add(fmStudentSelection);
         this.radDock1.AddDocument(PermanentRecordDockWindow);
         fmStudentSelection.Show();
     }
     else
     {
         PermanentRecordDockWindow.Show();
     }
     this.radDock1.ActiveWindow = PermanentRecordDockWindow;
 }
Beispiel #43
0
        private void radMenuItem13_Click(object sender, EventArgs e)
        {
            var np = new NewItemDialog();
            if (np.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                var f = new Core.ProjectSystem.File();
                f.Name = np.Filename;
                f.Src = np.Filename;
                f.ID = np.Type;

                Workspace.SelectedProject.Files.Add(f);

                explorerTreeView.Nodes.Clear();
                explorerTreeView.Nodes.Add(SolutionExplorer.Build(Workspace.Solution, radContextMenu1));

                Workspace.Solution.Save(Workspace.SolutionPath);
                var fi = new FileInfo(Workspace.SolutionPath).Directory.FullName + "\\" + f.Name;

                System.IO.File.WriteAllBytes(fi, np.Template.Raw);

                np.Plugin.Events.Fire("OnCreateItem", f, np.Template.Raw);

                var doc = new DocumentWindow(f.Name);
                doc.Controls.Add(ViewSelector.Select(np.Template, System.IO.File.ReadAllBytes(fi)).GetView());

                dock.AddDocument(doc);
            }
        }
Beispiel #44
0
 private void btnTimeSlot_Click(object sender, EventArgs e)
 {
     if (TimeslotDockWindow == null)
     {
         TimeslotDockWindow = new DocumentWindow();
         TimeslotDockWindow.CloseAction = DockWindowCloseAction.Close;
         fmTimeSlotList = new frmTimeSlotList();
         fmTimeSlotList.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmTimeSlotList.TopLevel = false;
         fmTimeSlotList.Dock = DockStyle.Fill;
         TimeslotDockWindow.Text = fmTimeSlotList.Text;
         TimeslotDockWindow.Controls.Add(fmTimeSlotList);
         this.radDock1.AddDocument(TimeslotDockWindow);
         fmTimeSlotList.Show();
     }
     else
     {
         TimeslotDockWindow.Show();
     }
     this.radDock1.ActiveWindow = TimeslotDockWindow;
 }
Beispiel #45
0
 private void btnLearningArea_Click(object sender, EventArgs e)
 {
     if (LearningAreaDockWindow == null)
     {
         LearningAreaDockWindow = new DocumentWindow();
         LearningAreaDockWindow.CloseAction = DockWindowCloseAction.Close;
         fmLearningAreas = new frmLearningAreas();
         fmLearningAreas.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmLearningAreas.TopLevel = false;
         fmLearningAreas.Dock = DockStyle.Fill;
         LearningAreaDockWindow.Text = fmLearningAreas.Text;
         LearningAreaDockWindow.Controls.Add(fmLearningAreas);
         this.radDock1.AddDocument(LearningAreaDockWindow);
         fmLearningAreas.Show();
     }
     else
     {
         LearningAreaDockWindow.Show();
     }
     this.radDock1.ActiveWindow = LearningAreaDockWindow;
 }
        void PowerPointApplicationWindowActivate(Presentation pres, DocumentWindow window)
        {
            var handler = NewView;
            if (handler == null) return;

            handler(this, new NewViewEventArgs(window, pres, PowerPointRibbonType.PowerPointPresentation.GetEnumDescription()));
        }
Beispiel #47
0
 private void AddDocument(DocumentWindow doc)
 {
     if (!Workspace.OpenedDocuments.ContainsKey(doc.Text))
     {
         Workspace.OpenedDocuments.Add(doc.Text, doc);
         dock.AddDocument(doc);
     }
     else
     {
         dock.ActivateWindow(Workspace.OpenedDocuments[doc.Text]);
     }
 }
Beispiel #48
0
 private void btnCurriculum_Click(object sender, EventArgs e)
 {
     if (CurriculumDockWindow == null)
     {
         CurriculumDockWindow = new DocumentWindow();
         CurriculumDockWindow.CloseAction = DockWindowCloseAction.Close;
         fmManageCurriculum = new frmManageCurriculum();
         fmManageCurriculum.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmManageCurriculum.TopLevel = false;
         fmManageCurriculum.Dock = DockStyle.Fill;
         CurriculumDockWindow.Text = fmManageCurriculum.Text;
         CurriculumDockWindow.Controls.Add(fmManageCurriculum);
         this.radDock1.AddDocument(CurriculumDockWindow);
         fmManageCurriculum.Show();
     }
     else
     {
         CurriculumDockWindow.Show();
     }
     this.radDock1.ActiveWindow = CurriculumDockWindow;
 }
Beispiel #49
0
 void Application_WindowActivate(Presentation Pres, DocumentWindow Wn)
 {
     paneModel_.Presentation = Pres;
 }
Beispiel #50
0
        private void radDock1_DockWindowClosing(object sender, DockWindowCancelEventArgs e)
        {
            string szActive = radDock1.ActiveWindow.Text;

            switch (szActive)
            {

                case "User List":
                    UserDockWindow = null;
                    break;
                case "Student List":
                    StudentDockWindow = null;
                    break;
                case "Teacher List":
                    TeacherDockWindow = null;
                    break;
                case "Building List":
                    BuildingDockWindow = null;
                    break;
                case "Learning Areas List":
                    LearningAreaDockWindow = null;
                    break;
                case "Time Slots":
                    TimeslotDockWindow = null;
                    break;
                case "Manage School Year":
                    SYDockWindow = null;
                    break;
                case "Curriculum":
                    CurriculumDockWindow = null;
                    break;
                default:
                    break;
            }
            //if (szActive.Equals("User List"))
            //    UserDockWindow = null;
            //if (szActive.Equals("Student List"))
            //    StudentDockWindow = null;
        }
Beispiel #51
0
        private void explorerTreeView_NodeMouseDoubleClick(object sender, RadTreeViewEventArgs e)
        {
            var p = e.Node.Tag as PropertiesView;
            var f = e.Node.Tag as Core.ProjectSystem.File;

            if (p != null)
            {
                var v = new PropertiesView();

                var doc = new DocumentWindow(e.Node.Text);
                doc.Controls.Add(v.GetView());

                dock.AddDocument(doc);
            }
            if(f != null)
            {
                ItemTemplate np = null;
                Plugin nn = null;

                foreach (var item in Workspace.PluginManager.Plugins)
                {
                    foreach (var it in item.ItemTemplates)
                    {
                        if(it.ID == f.ID)
                        {
                            np = it;
                            nn = item;
                        }
                    }
                }

                byte[] raw = null;

                if (Workspace.SelectedProject != null) {
                    raw = System.IO.File.ReadAllBytes(new FileInfo(Workspace.SolutionPath).Directory.FullName + "\\" + f.Src);
                }
                else
                {
                    raw = System.IO.File.ReadAllBytes(f.Src);
                }

                nn.Events.Fire("OnCreateItem", f, raw);

                var doc = new DocumentWindow(f.Name);
                doc.Controls.Add(ViewSelector.Select(np, raw).GetView());

                dock.AddDocument(doc);
            }
        }
		private void method_0(object sender, NotifyCollectionChangedEventArgs e)
		{
			Console.WriteLine("ChildCollection_CollectionChanging " + e.Action);
			IEnumerator enumerator;
			switch (e.Action)
			{
			case NotifyCollectionChangedAction.Add:
				enumerator = e.NewItems.GetEnumerator();
				try
				{
					while (enumerator.MoveNext())
					{
						object current = enumerator.Current;
						object obj = this.ChildTemplate.LoadContent();
						if (!(obj is Panel))
						{
							throw new Exception("The ChildTemplate MUST create a root node of type \"Panel\" (ex. Panel)");
						}
						DocumentWindow documentWindow = new DocumentWindow(this.dockSite_0);
						documentWindow.DataContext = current;
						documentWindow.Content = obj;
						documentWindow.CanAttach = new bool?(false);
						documentWindow.CanDockBottom = new bool?(false);
						documentWindow.CanDockTop = new bool?(false);
						documentWindow.CanDockLeft = new bool?(false);
						documentWindow.CanDockRight = new bool?(false);
						BindingOperations.SetBinding(documentWindow, DockingWindow.TitleProperty, new Binding("Name"));
						documentWindow.Activate(true);
						this.observableCollection_0.Add(documentWindow);
					}
					return;
				}
				finally
				{
					IDisposable disposable = enumerator as IDisposable;
					if (disposable != null)
					{
						disposable.Dispose();
					}
				}
				break;
			case NotifyCollectionChangedAction.Remove:
				break;
			case NotifyCollectionChangedAction.Replace:
				goto IL_1AD;
			case NotifyCollectionChangedAction.Move:
				return;
			case NotifyCollectionChangedAction.Reset:
				throw new Exception("Rest Not Yet Supported");
			default:
				return;
			}
			enumerator = e.OldItems.GetEnumerator();
			try
			{
				object item;
				while (enumerator.MoveNext())
				{
					item = enumerator.Current;
					DockingWindow dockingWindow = (from dw in this.observableCollection_0
					where dw.DataContext == item
					select dw).FirstOrDefault<DockingWindow>();
					if (dockingWindow != null)
					{
						dockingWindow.Close();
					}
				}
				return;
			}
			finally
			{
				IDisposable disposable = enumerator as IDisposable;
				if (disposable != null)
				{
					disposable.Dispose();
				}
			}
			IL_1AD:
			throw new Exception("Replace not yet supported");
		}
Beispiel #53
0
 private void btnQuarterlyGrading_Click(object sender, EventArgs e)
 {
     if (TeacherLoadingWindow == null)
     {
         TeacherLoadingWindow = new DocumentWindow();
         TeacherLoadingWindow.CloseAction = DockWindowCloseAction.Close;
         fmTeacherLoad = new frmTeacherLoad();
         fmTeacherLoad.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmTeacherLoad.TopLevel = false;
         fmTeacherLoad.Dock = DockStyle.Fill;
         TeacherLoadingWindow.Text = fmTeacherLoad.Text;
         TeacherLoadingWindow.Controls.Add(fmTeacherLoad);
         this.radDock1.AddDocument(TeacherLoadingWindow);
         fmTeacherLoad.Show();
     }
     else
     {
         TeacherLoadingWindow.Show();
     }
     this.radDock1.ActiveWindow = TeacherLoadingWindow;
 }
Beispiel #54
0
        private void radMenuItem13_Click(object sender, EventArgs e)
        {
            var np = new NewItemDialog();
            if (np.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                var f = new File();
                f.Name = np.Filename;
                f.Src = np.Filename;
                f.ID = np.Type;

                Workspace.SelectedProject.Files.Add(f);

                radTreeView1.Nodes.Clear();
                radTreeView1.Nodes.Add(SolutionExplorer.Build(Workspace.Solution));

                Workspace.Solution.Save(Workspace.SolutionPath);
                var p = np.Template;

                var editor = EditorBuilder.Build(p.Extension, null, null, null);

                var doc = new DocumentWindow(f.Name);
                doc.Controls.Add(editor);

                radDock1.AddDocument(doc);
            }
        }
Beispiel #55
0
 private void btnScholarship_Click(object sender, EventArgs e)
 {
     if (ScholarshipDockWindow == null)
     {
         ScholarshipDockWindow = new DocumentWindow();
         ScholarshipDockWindow.CloseAction = DockWindowCloseAction.Close;
         fmScholarshipList = new frmScholarshipList();
         fmScholarshipList.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
         fmScholarshipList.TopLevel = false;
         fmScholarshipList.Dock = DockStyle.Fill;
         ScholarshipDockWindow.Text = fmScholarshipList.Text;
         ScholarshipDockWindow.Controls.Add(fmScholarshipList);
         this.radDock1.AddDocument(ScholarshipDockWindow);
         fmScholarshipList.Show();
     }
     else
     {
         ScholarshipDockWindow.Show();
     }
     this.radDock1.ActiveWindow = ScholarshipDockWindow;
 }
Beispiel #56
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            var startwindow = new DocumentWindow();
            startwindow.Text = "StartPage";
            startwindow.Controls.Add(new StartPageCtrl() {Dock = DockStyle.Fill});

            dock.AddDocument(startwindow);

            /*   var pf = new ProjectFile();

            pf.Body.Properties.Add("Version", "1.0.0.0");
            pf.ProjectHeader = new Header() { Name = "TestProject", Type = ProjectType.WindowsFormsApplication };

            ProjectFile.Save("test.ecproj", ref pf);*/

            if (File.Exists("dock.xml"))
            {
              //  this.radDock1.LoadFromXml("dock.xml");
            }

            engine = new Engine { Flag = Engine.ExecutanFlags.RamOptimized };
            engine.Evaluate(this.fastColoredTextBox1.Text);
            console.Clear();

            if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())
            {
                var updController = new updateController
                                    {
                                        updateUrl = "http://eclang.tk/updates/",
                                        projectId = "8ffc8e6d-93d9-4bc2-a48e-238f27efae9e",
                                        publicKey =
                                        "<RSAKeyValue><Modulus>z6FnsZcLX3Cl864s1x/8fR8/Mg1kIJIiFBouMUdRpMxe13t5J/B4S3obzr94oQgjiXR/09vjKUQdoAsUm1AwxjI+7TkR3TEnu2HHEw2O8e4gkbfnwHqODtSWuHzsIxFnhhYcmVWfY/eRniilfnUBb6bcVomFUxwQFfAqXl8vC58iVjIW+4Ir05qTTH3KIf24J+ADoLYuX0rQD6wCdfmWCII7QuqkN7NBfmoq1G2Ol5p366ILnANMdz+3n+u6lkkjl+RVEAoG/pDaRIbSnb52k0p517Cb1N4D3zfr3cftYLKQImDAc9xtC9V8F2nVdjTz05pooZuONrg8J7lmwkYER1+xDnzAg4hL0g2jefjsbrlUuvs0/nIff8DKGsqkAzg/Qg5ylYdQ/lrge6tdISrIql1PZY6qo6VlllCDn8yLhpdZfUuBMEdVrW0xLo7qWZ8Y9dHsO2It52BtvAtEpKwwPOLyL9PTU+A9DnbdSgVckdDye8dVgcZeApsrIf1qWRJyqcdXjP9Y4pKefYcBizCIjL4gGUQilR5I7WsqXfAwPkqEcWCPtaBrX8jb9JmGqY0aUH7FDYdoK0kmkaM2PGiSMaugTnfcs0HUFStj4Liaz7I0b3zM+sN7sx/dW/0KYDXCNZWVxFndcG9aZk/0umaA7q+ISITadaY+axa3DsVwelU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>",
                                        releaseFilter =
                                        {
                                            checkForFinal = true,
                                            checkForBeta = true,
                                            checkForAlpha = true
                                        },
                                        restartApplication = true,
                                        autoCloseHostApplication = true,
                                        retrieveHostVersion = true,
                                        Language = Languages.Auto
                                    };

                if (updController.checkForUpdates()) updController.updateInteractive(this);

            }
        }
Beispiel #57
0
        public Form1()
        {
            InitializeComponent();

            startpageDocument.Controls.Add(new StartPage() { Dock = System.Windows.Forms.DockStyle.Fill });

            NotificationService.Init(radDesktopAlert1);

            ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Dark";

            Workspace.Settings.Load();

            if(!Workspace.Settings.Get<bool>("BetaAccepted"))
            {
                new BetaKeyDialog(this).ShowDialog();
                Hide();
            }

            Workspace.Output = new Core.Contracts.Debug(outputTextBox);
            Workspace.PluginManager.Load(Environment.CurrentDirectory + "\\Plugins");

            // add here loading from startup
            // file, project, solution

            var args = Environment.GetCommandLineArgs();
            if(args.Length > 0)
            {
                string file = null;

            #if DEBUG
                file = args[1];
            #else
                file = args[0];
            #endif

                switch (Path.GetExtension(file))
                {
                    case ".sln":
                        Workspace.Solution = Solution.Load(file);
                        Workspace.SolutionPath = file;

                        startpageDocument.Hide();
                        solutionExplorerWindow.Show();

                        newProjectMenuItem.Enabled = true;
                        newFileMenuItem.Enabled = true;

                        explorerTreeView.Nodes.Clear();
                        explorerTreeView.Nodes.Add(SolutionExplorer.Build(Workspace.Solution, radContextMenu1));

                        break;
                    case "proj":

                        break;
                    default:
                        var f = new Core.ProjectSystem.File();
                        var shortF = Path.GetFileName(file);

                        f.Name = shortF;
                        f.Src = file;
                        f.ID = Utils.GetTemplateID(shortF);

                        explorerTreeView.Nodes.Clear();
                        explorerTreeView.Nodes.Add(SolutionExplorer.Build(f));

                        ItemTemplate np = null;
                        Plugin npp = null;

                        foreach (var item in Workspace.PluginManager.Plugins)
                        {
                            foreach (var it in item.ItemTemplates)
                            {
                                if(it.ID == f.ID)
                                {
                                    np = it;
                                    npp = item;
                                }
                            }
                        }

                        var raw = System.IO.File.ReadAllBytes(file);

                        npp.Events.Fire("OnCreateItem", f, raw);

                        var doc = new DocumentWindow(f.Name);
                        doc.Controls.Add(ViewSelector.Select(np, raw).GetView());

                        dock.AddDocument(doc);

                        startpageDocument.Hide();

                        break;
                }
            }

            RefreshLanguage();

            addItemContextItem.Click += radMenuItem13_Click;
        }