Example #1
0
    public override void ViewRender()
    {
        base.ViewRender();

        var shareholder = ScreenUtils.GetSelectedInvestor(Q);

        if (shareholder == null)
        {
            return;
        }

        var investorId = shareholder.shareholder.Id;
        var company    = SelectedCompany;

        SharesInfo.text = shareholder.shareholder.Name + " owns " + Companies.GetShareSize(Q, company, shareholder) + "% of company";

        var shareCost = Companies.GetSharesCost(Q, company, shareholder);

        Valuation.text = Format.Money(shareCost);

        Offer.text = Format.Money(shareCost);

        CompanyName.text = $"Buy shares of company {SelectedCompany.company.Name}";

        ProposalStatus.text = true ? Visuals.Positive("They will accept our offer!") : Visuals.Negative("They will decline: Wants more money");

        BuyShares.ShareholderId = investorId;
        CanBuySharesController.Render(investorId);
    }
Example #2
0
    public override void ViewRender()
    {
        base.ViewRender();

        var selectedInvestor = ScreenUtils.GetSelectedInvestor(Q);

        if (selectedInvestor == null)
        {
            return;
        }

        var investorId = selectedInvestor.shareholder.Id;

        if (!Companies.IsInvestsInCompany(SelectedCompany, investorId))
        {
            return;
        }

        Render(investorId);
    }