public void PrintReport(Quarter q)
    {
        Q = q;

        time.text = Q.ToString();

        UpdateReport();

        Season season = (Season)q.season;

        if (season == Season.Winter)
        {
            background.color = new Color(winterColor.X / 255, winterColor.Y / 255, winterColor.Z / 255);
        }
        else if (season == Season.Spring)
        {
            background.color = new Color(springColor.X / 255, springColor.Y / 255, springColor.Z / 255);
        }
        else if (season == Season.Summer)
        {
            background.color = new Color(summerColor.X / 255, summerColor.Y / 255, summerColor.Z / 255);
        }
        else if (season == Season.Autumn)
        {
            background.color = new Color(autumnColor.X / 255, autumnColor.Y / 255, autumnColor.Z / 255);
        }
    }
Example #2
0
        public override String ToString()
        {
            switch (TimeType)
            {
            case FmFinPlanTimeType.FMFPT_SALDO:
                return(Year.ToString() + "." + Month.ToString() + ".Saldo");

            case FmFinPlanTimeType.FMFPT_TOTAL:
                return("Total");

            case FmFinPlanTimeType.FMFPT_YEAR:
                return(Year.ToString());

            case FmFinPlanTimeType.FMFPT_QUARTER:
                return(Year.ToString() + "." + Quarter.ToString());

            case FmFinPlanTimeType.FMFPT_MONTH:
                return(Year.ToString() + "." + Month.ToString());

            default:
                return("Unknow");
            }
        }
Example #3
0
        public bool DownloadMasterIndex(ushort year, Quarter q, out string content)
        {
            string url = string.Format(EdgarInitialLoader.FULL_INDEX_BASE_URL, year.ToString(), q.ToString(), "master");

            using (HttpResponseMessage response = httpClient.GetAsync(url).Result)
            {
                content = response.Content.ReadAsStringAsync().Result;
                return(true);
            }
        }
Example #4
0
    string IFormattable.ToString(string format, IFormatProvider provider = null)
    {
        if (provider == null)
        {
            // This try will always fail with our current language file naming scheme, as it doesn't match up with the standard.
            // This is in place so that should it be changed, we will automatically be using the chosen language rather than the system standard.
            try
            {
                provider = CultureInfo.GetCultureInfo(LocalizationTable.currentLanguage);
            }
            catch (ArgumentException)
            {
                provider = CultureInfo.CurrentCulture;
            }
        }

        DateTimeFormatInfo dateTimeFormatInfo = (DateTimeFormatInfo)provider.GetFormat(typeof(DateTimeFormatInfo));

        switch (format)
        {
        case "HH":
            return(Hour.ToString("00"));

        case "H":
            return(Hour.ToString());

        case "hh":
            int longhour = Hour;
            if (longhour >= 12)
            {
                longhour -= 12;
            }

            if (longhour == 0)
            {
                longhour = 12;
            }

            return(longhour.ToString("00"));

        case "h":
            int shorthour = Hour;
            if (shorthour >= 12)
            {
                shorthour -= 12;
            }

            if (shorthour == 0)
            {
                shorthour = 12;
            }

            return(shorthour.ToString());

        case "mm":
            return(Minute.ToString("00"));

        case "m":
            return(Minute.ToString());

        case "ss":
            return(Second.ToString("00"));

        case "s":
            return(Second.ToString());

        case "tt":
            return(Hour >= 12 ? dateTimeFormatInfo.PMDesignator : dateTimeFormatInfo.AMDesignator);

        case "q":
            return(Quarter.ToString());

        case "d":
            return(Day.ToString());

        case "dd":
            return(Day.ToString("00"));

        case "y":
            return(Year.ToString());

        case "G":
            return(this.ToString());

        default:
            return(string.Empty);
        }
    }