예제 #1
0
        public DetailPopup(Cost c, Size s)
        {
            this.InitializeComponent();

            //ProgRing.IsActive = true;

            thisCost = c;

            TxtDate.Text = CostConversions.FormatDate(c.Date, true);
            TxtCost.Text = DefaultVars.currency[(int)c.Currency] + CostConversions.FormatCost(c.Value);
            SetTbColour();
            TxtDesc.Text     = c.Description;
            pupBorder.Width  = s.Width - 64;
            pupBorder.Height = s.Height - 64;

            if (c.ReceiptName != null && !c.ReceiptName.Equals("NONE"))
            {
                LoadPhoto(c.ReceiptName);
            }
            else
            {
                ProgRing.IsActive = false;
            }

            //ProgRing.IsActive = false;
        }
예제 #2
0
        private void UpdateCosts()
        {
            Currencies currency = SettingsHelper.GetCurrency();

            AllCosts.ItemsSource = DBFunctions.GetAllCosts();
            double tCost = CostConversions.TotalCost(currency);

            ColourTV(tCost, CstTotal);
            if (tCost < 0)
            {
                tCost = -tCost;
            }
            CstTotal.Text = DefaultVars.currency[(int)SettingsHelper.GetCurrency()] + tCost.ToString(DefaultVars.costFormat);
        }