Exemplo n.º 1
0
        private void newFile_Click(object sender, EventArgs e)
        {
            NewFileForm nff = new NewFileForm(ref treeView1);

            nff.ShowDialog();

            Console.WriteLine("Count: " + treeView1.Nodes.Count.ToString());
        }
Exemplo n.º 2
0
        protected override void run()
        {
            NewFileForm form = new NewFileForm();

            beforeShow(form);
            form.ShowDialog();

            afterShow(form);
            form.Dispose();
        }
Exemplo n.º 3
0
        public Moai.Platform.Templates.Files.FileCreationData PickNewFile(string preselected)
        {
            NewFileForm nff = new NewFileForm(preselected);

            if (nff.ShowDialog() == DialogResult.OK)
            {
                return(nff.Result);
            }
            else
            {
                return(null);
            }
        }
Exemplo n.º 4
0
        /// <summary>Execute the command.</summary>
        public override void Execute()
        {
            NewFileForm newFileForm = Services.Resolve <NewFileForm>();

            DialogResult result = newFileForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                var editor = Services.Resolve <IEditor>(newFileForm.FileEditorDescriptor.EditorKeyName);
                editor.FileName = null;
                HostWindow.DisplayDockedForm(editor as DockContent);
            }
        }
Exemplo n.º 5
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var newFileDialog = new NewFileForm();

            if (newFileDialog.ShowDialog(this) == DialogResult.OK)
            {
                filePath    = newFileDialog.FileName;
                needsSaving = true;
                dataSet.Clear();
                while (tabControl1.Controls.Count > 0)
                {
                    tabControl1.TabPages[0].Dispose();
                }
                dataSet.ReadXmlSchema("student_scheme.xsd");
                InitDataGridPages();
            }
        }