Exemplo n.º 1
0
        public static void CreateNewTranslationFile(EnvDTE.Project project)
        {
            if (project == null)
            {
                return;
            }

            AddTranslationDialog transDlg = new AddTranslationDialog(project);

            if (transDlg.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    QtProject qtPro = QtProject.Create(project);
                    VCFile    file  = qtPro.AddFileInFilter(Filters.TranslationFiles(), transDlg.TranslationFile, true);
                    Translation.RunlUpdate(file, project);
                }
                catch (QtVSException e)
                {
                    Messages.DisplayErrorMessage(e.Message);
                }
                catch (System.Exception ex)
                {
                    Messages.DisplayErrorMessage(ex.Message);
                }
            }
        }
Exemplo n.º 2
0
        public static void CreateNewTranslationFile(EnvDTE.Project project)
        {
            if (project == null)
                return;

            AddTranslationDialog transDlg = new AddTranslationDialog(project);
            if (transDlg.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    QtProject qtPro = QtProject.Create(project);
                    VCFile file = qtPro.AddFileInFilter(Filters.TranslationFiles(), transDlg.TranslationFile, true);
                    Translation.RunlUpdate(file, project);
                }
                catch (QtVSException e)
                {
                    Messages.DisplayErrorMessage(e.Message);
                }
                catch (System.Exception ex)
                {
                    Messages.DisplayErrorMessage(ex.Message);
                }
            }
        }