Exemplo n.º 1
0
        protected override void UpdateEditorInternal(Zeus.ContentTypes.IEditableObject item, System.Web.UI.Control editor)
        {
            if (!Context.ContentTypes.GetContentType(item.GetType()).IsPage)
                editor.Parent.Visible = false;

            base.UpdateEditorInternal(item, editor);
        }
Exemplo n.º 2
0
 public void WriteClassHeader(Zeus.IZeusOutput output)
 {
     string hdr = "/*" + Environment.NewLine;
     hdr += "===============================================================" + Environment.NewLine;
     hdr += "            CondorXE Code Generator - ver " + _version + Environment.NewLine;
     hdr += "       Generated using MyGeneration Software - ver 1.3.1.1" + Environment.NewLine;
     hdr += "Created By King Wilder - https://www.github.com/kahanu/CondorXE" + Environment.NewLine;
     hdr += "                   " + DateTime.Now.ToString() + Environment.NewLine;
     hdr += "===============================================================" + Environment.NewLine;
     hdr += "*/";
     output.writeln(hdr);
 }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AkismetService"/> class.
        /// </summary>
        public AkismetService(AkismetElement configuration, IHttpClient httpClient, Zeus.Web.IWebContext webContext)
        {
            _configuration = configuration;
            _httpClient = httpClient;
            _webContext = webContext;

            _verifyUrl = new Url(string.Format(CultureInfo.InvariantCulture, VERIFY_URL_FORMAT, _configuration.ApiBaseUrl));
            _checkUrl = new Url(string.Format(CultureInfo.InvariantCulture, CHECK_URL_FORMAT, _configuration.ApiKey, _configuration.ApiBaseUrl));
            _submitHamUrl = new Url(string.Format(CultureInfo.InvariantCulture, SUBMIT_HAM_URL_FORMAT, _configuration.ApiKey, _configuration.ApiBaseUrl));
            _submitSpamUrl = new Url(string.Format(CultureInfo.InvariantCulture, SUBMIT_SPAM_URL_FORMAT, _configuration.ApiKey, _configuration.ApiBaseUrl));

            _userAgent = BuildUserAgent("Zeus", _version);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Calculate basket total - default behaviour
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public virtual void CalculateBasketTotal(object sender, Zeus.CancelItemEventArgs e)
        {
            if (e.AffectedItem is IShoppingBasket)
            {
                var basket = e.AffectedItem as IShoppingBasket;

                // set delivery price
                if (basket.DeliveryMethod != null)
                    basket.TotalDeliveryPrice = basket.DeliveryMethod.Price;

                // set VAT price
                basket.TotalVatPrice = 0m;

                // set final total
                basket.TotalPrice = basket.SubTotalPrice + basket.TotalDeliveryPrice + basket.TotalVatPrice;
            }
        }
Exemplo n.º 5
0
 public RenderBase(Zeus.IZeusOutput output)
 {
     this._output = output;
     this._script = ScriptSettings.GetInstance();
     this._hdrUtil = new HeaderUtility(_script.Version);
 }
Exemplo n.º 6
0
 protected override void UpdateEditorInternal(Zeus.ContentTypes.IEditableObject item, System.Web.UI.Control editor)
 {
 }
Exemplo n.º 7
0
    public void Create()
    {
        Mother = Zeus.Current.Mother;
        Father = Zeus.Current.Father;

        #region Sexuality
        Sexuality = Sexuality.NULL;
        Gender    = (Random.value > 0.5f) ? Gender.MALE : Gender.FEMALE;
        #endregion

        IsAdopted = (Zeus.Current.Mother.Gender == Zeus.Current.Father.Gender);

        #region Basic Stats
        Happiness  = 100f;
        Appearance = 50f;
        Fitness    = 5f;
        Intellect  = 5f;
        #endregion

        Age = -1;

        #region Nationalitiy
        Nationality = (Random.value > 0.5f) ? Mother.Nationality : Father.Nationality;
        #endregion

        Money = 100 * Nationality.CurrencyMultiplier;

        Money = 1000000000000;

        // Check
        // ProcessDiseases (true);

        Zeus.ResetOutput();

        Zeus.QueueToOutput("————————————————————");

        Zeus.QueueToOutput(string.Format("You are <b>{0} {1}</b>.", FirstName, LastName));
        Zeus.QueueToOutput(string.Format("You are born <b>{0}</b>.", Zeus.ToTitleCase(Gender.ToString().ToLower())));
        Zeus.QueueToOutput(string.Format("You were born in <b>{0}</b>, your nationality is <b>{1}</b>.", Nationality.CountryName, Nationality.Demonym));

        Zeus.QueueToOutput(string.Format("Your Mother is: <b>{0} {1}</b>, " + ((Mother.Gender == Gender.FEMALE) ? "her" : "his") + " nationality is <b>{2}</b>.", Mother.FirstName, Mother.LastName, Mother.Nationality.Demonym));
        Zeus.QueueToOutput(string.Format("Your Father is: <b>{0} {1}</b>, " + ((Father.Gender == Gender.FEMALE) ? "her" : "his") + " nationality is <b>{2}</b>.", Father.FirstName, Father.LastName, Father.Nationality.Demonym));
        if (IsAdopted)
        {
            Zeus.QueueToOutput(string.Format("<b>You are adopted.</b>"));
        }

        Zeus.QueueToOutput("————————————————————");
        Zeus.QueueToOutput();

        MajorEvents.Add(new MajorEvent("Born", 0,
                                       string.Format("You were born. You are a <b>{0}</b>. Your nationality is <b>{1}</b>. Your Mother is <b>{2}</b> and your Father is <b>{3}</b>.",
                                                     FirstName + " " + LastName,
                                                     Nationality.Demonym,
                                                     Mother.FirstName + " " + Mother.LastName,
                                                     Father.FirstName + " " + Father.LastName),
                                       Zeus.Current.Player.IncrementLastIndexMajorEvent())
                        );

        Houses.GenerateSomeHouses(21);

        ProcessAging();
    }
Exemplo n.º 8
0
 public ZeusCommand(Zeus zeus)
 {
     _zeus = zeus;
 }