Ejemplo n.º 1
0
        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            try
            {
                project pr = new project();
                pr = general.actualProject;
                pr.templateSelectedFullUri = general.templateSelectedFullUri;

                String tableSelected = cmbTablesx.Text;
                foreach (table item in general.actualProject.tables)
                {
                    string numberoffields = item.fields.Count.ToString();
                    if (item.Name.Equals(tableSelected))
                        pr.actualTable = item;
                }
                //confi.actualTable = actualTable;

                pr.templateSelected = general.templateSelected;
                pr.templateSelectedFullUri = general.templateSelectedFullUri;

                pr.targetDirectory = general.targetDirectory;

                // save the project template from the listbox
                if (lbProjectTemplate.Items.Count != 0 )
                {
                    string pt = lbProjectTemplate.SelectedItem.ToString();
                    foreach (projectconfigfiles item in ctes.listaProjectConfigFiles)
                    {
                        if (item.Name == pt)
                        {
                            pr.projectTemplatesDirectory = item.Directory;
                        }
                    }

                    pr.projectTemplatesDirectorySmall = pt;

                }
                //pr.projectTemplatesDirectory = general.projectTemplateSelectedFullUri;
                //pr.projectTemplatesDirectorySmall = general.projectTemplateSelected;

                pr.saveProject(Path.Combine(util.conf_dir, "conf.xml"));
                pr.saveProject(Path.Combine(util.projects_dir, general.actualProject.name) + ".xml");

            }
            catch (Exception)
            {

                //throw;
            }
        }
Ejemplo n.º 2
0
        private void saveData()
        {
            try
            {
                project pr = new project();
                pr = general.actualProject;
                //pr.templateSelectedFullUri = general.templateSelectedFullUri;

                pr.targetDirectory = general.actualProject.targetDirectory;

                // save the project template from the listbox
                if (lbProjectTemplate.Items.Count != 0)
                {
                    string pt = lbProjectTemplate.SelectedItem.ToString();
                    foreach (projectconfigfiles item in ctes.listaProjectConfigFiles)
                    {
                        if (item.Name == pt)
                        {
                            pr.projectTemplatesDirectory = item.Directory;
                        }
                    }

                    pr.projectTemplatesDirectorySmall = pt;
                }

                pr.saveProject(Path.Combine(util.conf_dir, "conf.xml"));
                pr.saveProject(Path.Combine(util.projects_dir, general.actualProject.name) + ".xml");

            }
            catch (Exception)
            {

                //throw;
            }
        }
Ejemplo n.º 3
0
        //private void cmbGoToCode_SelectedIndexChanged(object sender, EventArgs e)
        //{
        //    string st = "";
        //    int numLinea = 0;
        //    st = cmbGoToCode.SelectedItem.ToString().Trim();
        //    // get the control of editor
        //    ElementHost pp = new ElementHost();
        //    TextEditor te = new TextEditor();
        //    pp = (ElementHost)panel1.Controls.Find("editor", true)[0];
        //    te = (TextEditor)pp.Child;
        //    foreach (ICSharpCode.AvalonEdit.Document.DocumentLine item in te.Document.Lines)
        //    {
        //        if (item.Text.IndexOf(st) != -1)
        //        {
        //            numLinea = item.LineNumber;
        //        }
        //    }
        //    te.ScrollTo(numLinea, 0);
        //} // cmbGoToCode_SelectedIndexChanged
        private void txtNameSpace_TextChanged(object sender, EventArgs e)
        {
            project pr = new project();
            pr = general.actualProject;

            pr.nameSpace = txtNameSpace.Text;
            pr.saveProject(Path.Combine(util.conf_dir, "conf.xml"));
            pr.saveProject(Path.Combine(util.projects_dir, general.actualProject.name) + ".xml");
        }