Ejemplo n.º 1
0
 public BidSummaryCompany(Company company)
 {
     CompanyName           = company.CompanyName;
     Offers                = company.Offers.OrderBy(o => o.Revision).Select(o => new BidSummaryOffer(o)).ToList();
     CurrentRev            = company.Offers.Max(o => o.Revision);
     MainTableHeight       = Offers.Max(o => o.MainTableHeight);
     AdditionalTableHeight = Offers.Max(o => o.AdditionalTableHeight);
 }
Ejemplo n.º 2
0
        static void Main()
        {
            Currency.ResetCurencies();

            Addtransfers();

            Rect info   = new Rect(8, 2, 2 * (Offers.Count + 1) + Offers.Count * Offers.Max(x => (x.Length + 2) < 16 ? 16 : x.Length) + 1, 3);
            Rect menu   = new Rect(info.left, info.top + info.height + 1, info.width, 8);
            Rect window = new Rect(menu.left, menu.top + menu.height + 1, menu.width, 35);
            Rect option = new Rect(menu.left + 3, menu.top + (menu.height - 4) / 2, (menu.width - 2 * (Offers.Count + 1) - 2) / Offers.Count, 4);

            Errors.rect = new Rect(menu.left, window.top + window.height + 1, menu.width, 2);

            Console.SetBufferSize(menu.width + 16, 500);
            Console.SetWindowSize(menu.width + 16, info.top + info.height + menu.height + window.height + Errors.rect.height + 6);

            for (int choose = 0; true;)
            {
                me.Reset();

                Window.Draw(window, ConsoleColor.DarkGray);

                me.Draw(info);

                Window.Draw(menu);

                App.MainMenu(option, ref choose);

                Window.Draw(window);

                switch (choose)
                {
                case 0:
                    App.TransferMenu(window, false, MoneyCategories);
                    break;

                case 1:
                    App.TransferMenu(window, true, Categories);
                    break;

                case 2:
                    me.EditCard(window);
                    break;

                case 3:
                    App.SetData(new Rect(window.left, window.top, window.width / 2, window.height));
                    break;

                case 4:
                    App.Graph(window);
                    break;

                case 5:
                    App.ScrollMenu(window);
                    break;

                case 6:
                    me.EditCurrencyes(window);
                    break;

                case 7:
                    Window.Draw(window, ConsoleColor.DarkGray);
                    Errors.Draw("Goodbye See You Later.", ConsoleColor.Green);
                    while (true)
                    {
                        Console.ReadKey(true);
                    }
                }
                Console.Clear();
                Errors.Draw();
            }
        }