Exemplo n.º 1
0
        public void Add(HelpPage page)
        {
            page.Hash = TextHash.MD5(page.Path).Value;

            HelpPageDao dao = new HelpPageDao();
            using (Transaction tx = new Transaction())
            {
                dao.Save<HelpPage>(page);
                tx.Commit();
            }
        }
Exemplo n.º 2
0
        protected void BtnSave_Click(object sender, EventArgs e)
        {
            int id = 0;
            Int32.TryParse(this.ExistingHelpId.Value, out id);
            HelpPage page = HelpManager.Instance.Get(id);
            if (page == null)
                page = new HelpPage();

            page.Path = this.TxtPath.Text;
            page.Text = this.TxtContent.Text;

            HelpManager.Instance.Add(page);

            this.ExistingHelpId.Value = page.Id.ToString();

            this.LoadExisting();
        }
Exemplo n.º 3
0
 public bool IsHelpVisible(HelpPage current)
 {
     HashSet<String> result = GetViewedHelpPages();
     return (result.Contains(current.Hash)) ? false : true;
 }