Esempio n. 1
0
        public static PairsEventInformation createDefaultEventInformation()
        {
            PairsEventInformation eventInformation = new PairsEventInformation();

            eventInformation.rawText           = "";
            eventInformation.isACBLSummary     = false;
            eventInformation.isIMP             = false;
            eventInformation.hasDirectionField = false;
            eventInformation.eventName         = "Unknown";
            eventInformation.eventDate         = TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, Globals.INDIAN_ZONE);
            eventInformation.databaseFileName  = "";
            return(eventInformation);
        }
Esempio n. 2
0
        public static PairsEventInformation getEventInformation_(string text)
        {
            m_eventInformation         = PairsGeneral.createDefaultEventInformation();
            m_eventInformation.rawText = text;
            String patternString = "Summary\\s*for\\s*Pair";

            if (!Utilities.containsPattern_(text, patternString))
            {
                m_eventInformation.isACBLSummary = false;
                return(m_eventInformation);
            }
            else
            {
                m_eventInformation.isACBLSummary = true;
            }
            patternString = "BRD\\s*DLR\\s*VUL\\s*DIR\\s*VS\\s*RESULT\\s*SCORE\\s*DATUM";
            if (Utilities.containsPattern_(text, patternString))
            {
                setSummaryInfo_(isIMP: true, hasDirectionField: true); return(m_eventInformation);
            }
            patternString = "BRD\\s*DLR\\s*VUL\\s*VS\\s*RESULT\\s*SCORE\\s*DATUM";
            if (Utilities.containsPattern_(text, patternString))
            {
                setSummaryInfo_(isIMP: true, hasDirectionField: false); return(m_eventInformation);
            }
            patternString = "BRD\\s*DLR\\s*VUL\\s*DIR\\s*VS\\s*RESULT\\s*SCORE";
            if (Utilities.containsPattern_(text, patternString))
            {
                setSummaryInfo_(isIMP: false, hasDirectionField: true); return(m_eventInformation);
            }
            patternString = "BRD\\s*DLR\\s*VUL\\s*VS\\s*RESULT\\s*SCORE";
            if (Utilities.containsPattern_(text, patternString))
            {
                setSummaryInfo_(isIMP: false, hasDirectionField: false); return(m_eventInformation);
            }
            return(m_eventInformation);
        }
 public void setParameters(PairsEventInformation eventInformation, PairsDatabaseParameters databaseParameters)
 {
     m_eventInformation   = eventInformation;
     m_databaseParameters = databaseParameters;
 }
 public PairsDatabaseToWebpages(PairsEventInformation eventInformation, PairsDatabaseParameters databaseParameters)
 {
     setParameters(eventInformation, databaseParameters);
 }
Esempio n. 5
0
        public static void loadPairsEventInformation(PairsDatabaseParameters databaseParameters, String databaseFileName, out PairsEventInformation eventInformation)
        {
            if (databaseParameters.m_ds.Tables["Event_Information"].Rows.Count < 1)
            {
                throw new Exception("Event Information not found in Database!!!");
            }
            DataRow row = databaseParameters.m_ds.Tables["Event_Information"].Rows[0];

            eventInformation.rawText           = "";
            eventInformation.isACBLSummary     = (bool)row["ACBL_Summary"];
            eventInformation.hasDirectionField = (bool)row["Has_Direction_Field"];
            eventInformation.isIMP             = ((String)row["Scoring_Type"]).Equals("IMP", StringComparison.OrdinalIgnoreCase);
            eventInformation.eventName         = "" + row["Event_Name"];
            eventInformation.eventDate         = DateTime.Parse("" + row["Event_Date"]);
            eventInformation.databaseFileName  = databaseFileName;
            eventInformation.webpagesDirectory = constructWebpagesDirectory(Globals.m_rootDirectory, eventInformation.eventName, eventInformation.eventDate);
        }
 public void setParameters(PairsEventInformation eventInformation)
 {
     m_eventInformation = eventInformation;
 }
 public PairsSummaryToDatabase(PairsEventInformation eventInformation)
 {
     setParameters(eventInformation);
 }