Ejemplo n.º 1
0
        private void newKpQueriesFileMenuItem_Click(object sender, EventArgs e)
        {
            var kpqEditor  = new KpQueriesEditor();
            var newTabPage = new TabPage("New kP-Queries File");

            newTabPage.Controls.Add(kpqEditor);

            tcMain.TabPages.Add(newTabPage);
            tcMain.SelectedTab = newTabPage;
        }
Ejemplo n.º 2
0
        private void openKpQueriesFileMenuItem_Click(object sender, EventArgs e)
        {
            var opd = new OpenFileDialog();

            opd.Filter = "kP Queries file (*.kpq)|*.kpq";

            if (opd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                var fileName = opd.FileName;

                var kplEditor = new KpQueriesEditor();
                kplEditor.Editor.Load(fileName);
                kplEditor.FileName = fileName;

                var newTabPage = new TabPage(Path.GetFileName(fileName));
                newTabPage.ToolTipText = fileName;
                newTabPage.Controls.Add(kplEditor);

                tcMain.TabPages.Add(newTabPage);
                tcMain.SelectedTab = newTabPage;
            }
        }