//private bool failCautionReported; //used to check if when someone fails or cautions somthing, they have said why


        public AdjudicatorWindow()
        {
            InitializeComponent();

            //add all qc keywords to an array
            qc_keywords.Add(CheckBox_SyncIssues);
            qc_keywords.Add(CheckBox_NoAudio);
            qc_keywords.Add(CheckBox_WrongLanguage);
            qc_keywords.Add(CheckBox_LevelIssues);
            qc_keywords.Add(CheckBox_AspectRatioIssues);
            qc_keywords.Add(CheckBox_SlateIssues);
            qc_keywords.Add(CheckBox_CompressionArtifacts);
            qc_keywords.Add(CheckBox_CorruptFile);
            qc_keywords.Add(CheckBox_NoVideo);

            this.disableButtons();
            // Populate the user combo box
            this.userInitialsDictionary = new Dictionary<string, string>();
            this.userDirectoryDictionary = new Dictionary<string, DirectoryInfo>();

            //clear projects variable
            projectsReadyToQC.Clear();

            populateUsers();
            populateProjects();

            // Populate the project combo box

            // Create an adjudicator
            this.adjudicator = new Adjudicator();

            Closing += this.MainWindowDialog_Closing;
        }
 public ProjectInfoWindow(string projectname, 
                          string webPassDir, 
                          string mezPasDir, 
                          string failDir, 
                          string SDnum, 
                          string watchFolder, 
                          string keywords, 
                          Adjudicator adjudicator)
 {
     currentProject = projectname;
     this.adjudicator = adjudicator;
     this.adjudicator.changeProject(utility.getProjectFileFromString(currentProject).FullName);
     
     InitializeComponent();
     
     this.TextBox_MezzaninePassFolder.Text = mezPasDir;
     this.TextBox_SDNumber.Text = SDnum;
     this.TextBox_WebPassFolder.Text = webPassDir;
     this.TextBox_FailedDirectory.Text = failDir;
     this.TextBox_WatchFolder.Text = watchFolder;
     this.TextBox_ProjectName.Text = projectname;
     this.TextBox_Keywords.Text = keywords;
 }
Esempio n. 3
0
        /// <summary>
        /// moves files to a failed folder and emails a recipient and logs the fail
        /// </summary>
        /// <param name="file">the file to be processed</param>
        /// <param name="report">the report to email</param>
        private static void failFile(FileInfo file, string report, testingSpecs target)
        {
            StatusReporter reporter = new StatusReporter();
            reporter.addFail(file.Name, report);

            string projectFileName;
            if (target.projectFile == null)
            {
                 projectFileName = "No Project";
            }
            else
            {
                 projectFileName = System.IO.Path.GetFileNameWithoutExtension(target.projectFile.Name);
            }
            reporter.addResult(4, file.Name, projectFileName, report);

            Adjudicator adjudicator = new Adjudicator();
            adjudicator.googleBot.logItConference(file.Name, report);
                try
                {
                    taskmaster.moveAfterAutoQCFail(file);
                }
                catch (Exception e)
                {
                    logger.writeErrorLog(e, file.FullName);
                    //MessageBox.Show("Could not move the file because: \n" + e.Message + "\n---------------------------------------\n" + e.ToString());
                }
            

            // use the reporter for the mini sheet


            //save to txt file
            logger.saveToTXT("AutoQCLog", logsDirectory,file.Name +
                      "\r\n------------------------------------------------------------\r\n" +
                      "failed on \n\r" +
                      DateTime.Now.ToString() +
                      " because: " +
                      report +
                      "\r\n" +
                      "\r\n" +
                      "\r\n");

            logger.saveToTabDilimited("AutoQCTabLog", logsDirectory, file.Name + "\t" + " :" + report + "\t" + DateTime.Now.ToString() + "\t" + "AutoQC" + "\r\n");

            string emailMessage = "Dear User,\r\n\n" + "The following file: \r\n\n" + file.Name + "\r\n\n" + report + "\r\n\n" + "Thanks, \r\n\n" + "QC Android Lady";

            string recipient = utility.getValueFromXML(target.projectFile, "ToEmailOnFail");

            if (recipient == null || recipient == "NA")
            {
                recipient = "*****@*****.**";
            }

            if (file.Name.Contains("Training"))
            {
                return;
            }
            email(file.Name + " failed auto-qc: " + report, emailMessage, recipient);
  
            //if(file.Name.Contains("2012-10-"))
            //{
            //    //track it on the Google doc
            //    new Googler(file.Name, report);
            //}
        }