Пример #1
0
        static DesignData()
        {
            Bank = new Bank()
            {
                Name = "HABS"
                       //Logo = new BitmapImage(new Uri(@"/Images/DesignTime/Bank.png",UriKind.RelativeOrAbsolute))
            };
            var bi = new BitmapImage();

            bi.BeginInit();
            bi.UriSource = new Uri(@"C:\Secure\Projects\DevProjects\Finances\src\Finances.WinClient\Images\DesignTime\Bank.png", UriKind.Absolute);
            bi.EndInit();
            Bank.Logo = bi;

            BankAccount = new BankAccount()
            {
                AccountName = "Current",
                Bank        = Bank,
                SortCode    = "12-34-56"
            };

            BalanceDate = new BalanceDate()
            {
                DateOfBalance           = new DateTime(2016, 8, 24),
                BalanceDateBankAccounts = new List <BalanceDateBankAccount>()
                {
                    new BalanceDateBankAccount()
                    {
                        BankAccount   = BankAccount,
                        BalanceAmount = 123
                    }
                }
            };
        }
Пример #2
0
        static DesignData()
        {
            DataContextInheritConverter = new DataContextInheritConverter();

            Bank = new Bank()
            {
                Name = "HABS"
                //Logo = new BitmapImage(new Uri(@"/Images/DesignTime/Bank.png",UriKind.RelativeOrAbsolute))
            };
            var bi = new BitmapImage();
            bi.BeginInit();
            bi.UriSource = new Uri(@"C:\Secure\Projects\DevProjects\Finances\src\Finances.WinClient\Images\DesignTime\Bank.png", UriKind.Absolute);
            bi.EndInit();
            Bank.Logo = bi;

            BankAccount = new BankAccount()
            {
                AccountName = "Current Account",
                Bank = Bank,
                SortCode = "12-34-56"
            };

            BankAccount2 = new BankAccount()
            {
                AccountName = "Savings",
                Bank = Bank,
                SortCode = "00-00-00"
            };

            BalanceDate = new BalanceDate()
            {
                DateOfBalance = new DateTime(2016, 8, 24),
                BalanceDateBankAccounts = new List<BalanceDateBankAccount>()
                {
                    new BalanceDateBankAccount()
                    {
                        BankAccount = BankAccount,
                        BalanceAmount = 123
                    },
                    new BalanceDateBankAccount()
                    {
                        BankAccount = BankAccount2,
                        BalanceAmount = 456
                    }
                }
            };
        }