Ejemplo n.º 1
0
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        string path = Server.MapPath(SunamoRoutePage.GetRightUp(this.Page.Request) + "img/Lyrics/cds");

        string[] images = Directory.GetFiles(path);
        Random   rnd    = new Random();

        cdpic.Src = "img/Lyrics/cds/" + Path.GetFileName(images[rnd.Next(0, images.Length - 1)]);
    }
Ejemplo n.º 2
0
    public void Success(string message)
    {
        var page = this;

        errors.Visible = true;
        StringBuilder sb = new StringBuilder();

        sb.Append(SunamoRoutePage.GetRightUpRoot(Request));
        sb.Append("img/ok.gif");
        string img = HtmlTemplates.Img(sb.ToString());

        errors.InnerHtml = img + message;
        errors.Attributes.Remove("class");
        errors.Attributes.Add("class", "success");
        if (callEventSuccess)
        {
            if (SuccessEvent != null)
            {
                SuccessEvent();
            }
        }
    }
Ejemplo n.º 3
0
    public TypeOfMessage Warning(string message)
    {
        var page = this;

        errors.Visible = true;
        StringBuilder sb = new StringBuilder();

        sb.Append(SunamoRoutePage.GetRightUpRoot(Request));
        sb.Append("img/warning.gif");
        string img = HtmlTemplates.Img(sb.ToString());

        errors.InnerHtml = img + message;
        errors.Attributes.Remove("class");
        errors.Attributes.Add("class", "varovani");
        if (callEventWarning)
        {
            if (WarningEvent != null)
            {
                WarningEvent();
            }
        }
        return(TypeOfMessage.Warning);
    }
Ejemplo n.º 4
0
 public string GetRightUpRootRoute()
 {
     return(SunamoRoutePage.GetRightUpRoot(this.Request));
 }