Пример #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            double Caja, Banco, CuentasporCobrar, PagoaCredito, PagoaProveedores, Renta, Capital;

            btnCalcular.TouchUpInside += delegate
            {
                try
                {
                    Caja             = double.Parse(txtCaja.Text);
                    Banco            = double.Parse(txtBanco.Text);
                    CuentasporCobrar = double.Parse(txtCuentasporCobrar.Text);
                    PagoaCredito     = double.Parse(txtPagoaCredito.Text);
                    PagoaProveedores = double.Parse(txtPagoaProveedores.Text);
                    Renta            = double.Parse(txtRenta.Text);
                    Capital          = (Caja + Banco + CuentasporCobrar) -
                                       (PagoaCredito + PagoaProveedores + Renta);
                    txtCapitalContable.Text = Capital.ToString();
                }
                catch (Exception ex)
                {
                    MessageBox("Error", (ex.Message));
                }
            };
        }
Пример #2
0
 private void frmAddInventory_Load(object sender, EventArgs e)
 {
     clsThemes.ApplyTheme(this, new clsThemes.ThemeSettings(Properties.Settings.Default.Theme));
     txtQuantity.Text = Quantity.ToString();
     txtQuantity.SelectAll();
     txtCapital.Text = Capital.ToString();
     txtRetail.Text  = Retail.ToString();
 }
Пример #3
0
        public override PdxSublist GetHistoryFile()
        {
            var data = new PdxSublist(null, (FileName == CountryTag ? CountryTag : (CountryTag + " - " + FileName)) + ".txt");

            data.AddValue("government", Government);
            foreach (var reform in Reforms)
            {
                data.AddValue("add_government_reform", reform);
            }
            data.AddValue("government_rank", GovernmentRank.ToString());
            data.AddValue("mercantilism", Mercantilism.ToString());
            //TODO: tech groups
            data.AddValue("technology_group", TechGroup);
            data.AddValue("religion", Religion);
            data.AddValue("primary_culture", PrimaryCulture);
            foreach (var culture in AcceptedCultures)
            {
                data.AddValue("add_accepted_culture", culture);
            }
            if (IsElector)
            {
                data.AddValue("elector", "yes");
            }
            if (Capital != 0)
            {
                data.AddValue("capital", Capital.ToString());
            }
            if (holder != null)
            {
                var rulerData = GetCharacterData("monarch", holder);


                //rulerData.AddValue("clear_scripted_personalities", "yes");
                data.AddSublist(rulerData.Key, rulerData);
                if (title.Name == "k_dyn_8040718")
                {
                    Console.WriteLine();
                }
                var heir = holder.Heir;
                if (heir != null)
                {
                    var heirData = GetCharacterData("heir", heir);
                    data.AddSublist(heirData.Key, heirData);
                }
                //TODO: heirs
                //if(holder.PrimaryTitle.Succession == "succ_primogeniture")
                //{

                //}
            }
            //TODO: heirs & spouses

            return(data);
        }
Пример #4
0
        public PdxSublist GetHistoryCountryFile(Vic2World world)
        {
            var data = new PdxSublist(null);

            data.AddValue("capital", Capital.ToString());
            data.AddValue("primary_culture", PrimaryCulture);
            AcceptedCultures.ForEach(c => data.AddValue("culture", c));
            data.AddValue("religion", Religion);
            data.AddValue("government", Government);
            data.AddValue("plurality", Plurality.ToString());
            if (NationalValues != null)
            {
                data.AddValue("nationalvalue", NationalValues.Value);
            }
            data.AddValue("literacy", Literacy.ToString());
            data.AddValue("civilized", IsCivilised ? "yes" : "no");

            data.AddValue("prestige", Prestige.ToString());
            if (Reforms != null)
            {
                Reforms.AddData(data);
            }
            if (Technologies != null)
            {
                Technologies.ForEach(t => data.AddValue(t, "1"));
            }
            data.AddValue("consciousness", Consciousness.ToString());
            // todo
            data.AddValue("nonstate_consciousness", (Consciousness / 3).ToString());
            if (RulingParty != null)
            {
                data.AddValue("ruling_party", RulingParty.Name);
            }
            data.AddDate("last_election", LastElection);
            if (UpperHouse != null)
            {
                data.AddSublist("upper_house", UpperHouse.GetData(data));
            }
            if (TechSchools != null)
            {
                data.AddValue("schools", Enum.GetName(typeof(TechSchool), TechSchools.TechSchool));
            }

            if (FemaleLeaders && (Reforms.vote_franschise == vote_franschise.universal_voting || Reforms.vote_franschise == vote_franschise.universal_weighted_voting))
            {
                var entry = new PdxSublist();
                entry.AddValue("decision", "enact_female_suffrage");

                data.AddSublist(world.StartDate, entry);
            }
            return(data);
        }
Пример #5
0
        public void Salida_Datos_Tabla()
        {
            int i = 1;

            do
            {
                Console.Write("{0}\t", pagos);

                pagos = pagos + 1;

                Console.Write("{0}\t", Dinero.ToString("0.00"));


                Interes = Interes_M * Prestamo;
                Console.Write("\t{0}\t", Interes.ToString("0.00"));


                Capital = Dinero - Interes;
                Console.Write(" \t{0}\t", Capital.ToString("0.00"));


                Prestamo = Prestamo - (Capital);

                if (Prestamo < 1)
                {
                    Console.Write(" \t{0} \t   ", Prestamo = 0);
                }
                else
                {
                    Console.Write(" \t{0}    ", Prestamo.ToString("0.00"));
                }


                Console.WriteLine();

                i++;
            } while (i <= Plazo);
            Console.WriteLine();
        }