Ejemplo n.º 1
0
        public MainPublisherForm(string solutionFile, ProjectSettings currentTFSProjectContext)
        {
            _currentProjectContext = currentTFSProjectContext;

            InitializeComponent();

            if (!string.IsNullOrEmpty(solutionFile))
            {
                FileInfo fileinfo = new FileInfo(solutionFile);
                DirectoryInfo TestResultsDir = new DirectoryInfo(fileinfo.DirectoryName + @"\TestResults");
                if (TestResultsDir.Exists)
                {
                    txtResultsFolder.Text = TestResultsDir.FullName;
                    UpdateTrxList();
                }
            }

            ConfigParser.LoadConfiguration();
               // this.BringToFront();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Public method that will return the class -> singleton
 /// </summary>
 /// <returns>ControlHandler</returns>
 public static TFS2010ResultWriter Instance(ProjectSettings projectContext, bool createRun)
 {
     // thread safe singleton code
     lock (threadSafeLock)
     {
         if (_instance == null)
         {
             _instance = new TFS2010ResultWriter();
             _instance.CurrentProject = projectContext;
             TFSDialog dialog = new TFSDialog(_instance.GetBuilds());
             dialog.ShowDialog();
             _instance.buildToPublish = dialog.Build;
             if (createRun)
             {
                // _instance.CreateTestRun();
             }
         }
         return _instance;
     }
 }