Beispiel #1
0
        private FileInfo RunQmake(FileInfo mainInfo, string ext, bool recursive, VersionInformation vi)
        {
            string name = mainInfo.Name.Remove(mainInfo.Name.IndexOf('.'));

            FileInfo VCInfo = new FileInfo(mainInfo.DirectoryName + "\\" + name + ext);

            if (!VCInfo.Exists || DialogResult.Yes == MessageBox.Show(SR.GetString("ExportProject_ProjectExistsRegenerateOrReuse", VCInfo.Name),
                                                                      SR.GetString("ProjectExists"), MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
                Messages.PaneMessage(dteObject, "--- (Import): Generating new project of " + mainInfo.Name + " file");

                InfoDialog dialog = new InfoDialog(mainInfo.Name);
                QMake      qmake  = new QMake(dteObject, mainInfo.FullName, recursive, vi);

                qmake.CloseEvent           += new QMake.ProcessEventHandler(dialog.CloseEventHandler);
                qmake.PaneMessageDataEvent += new QMake.ProcessEventHandlerArg(this.PaneMessageDataReceived);

                System.Threading.Thread qmakeThread = new System.Threading.Thread(new ThreadStart(qmake.RunQMake));
                qmakeThread.Start();
                dialog.ShowDialog();
                qmakeThread.Join();

                if (qmake.ErrorValue == 0)
                {
                    return(VCInfo);
                }
            }

            return(null);
        }
        private FileInfo RunQmake(FileInfo mainInfo, string ext, bool recursive, VersionInformation vi)
        {
            string name = mainInfo.Name.Remove(mainInfo.Name.IndexOf('.'));

            FileInfo VCInfo = new FileInfo(mainInfo.DirectoryName + "\\" + name + ext);

            if (!VCInfo.Exists || DialogResult.Yes == MessageBox.Show(SR.GetString("ExportProject_ProjectExistsRegenerateOrReuse", VCInfo.Name),
                SR.GetString("ProjectExists"), MessageBoxButtons.YesNo, MessageBoxIcon.Question))
            {
                Messages.PaneMessage(dteObject, "--- (Import): Generating new project of " + mainInfo.Name + " file");

                InfoDialog dialog = new InfoDialog(mainInfo.Name);
                QMake qmake = new QMake(dteObject, mainInfo.FullName, recursive, vi);

                qmake.CloseEvent += new QMake.ProcessEventHandler(dialog.CloseEventHandler);
                qmake.PaneMessageDataEvent += new QMake.ProcessEventHandlerArg(this.PaneMessageDataReceived);

                System.Threading.Thread qmakeThread = new System.Threading.Thread(new ThreadStart(qmake.RunQMake));
                qmakeThread.Start();
                dialog.ShowDialog();
                qmakeThread.Join();

                if (qmake.ErrorValue == 0)
                    return VCInfo;
            }

            return null;
        }