Esempio n. 1
0
        private void mniDeleteProtect_Click(object sender, EventArgs e)
        {
            HCCustomData vTopData = FEmrView.ActiveSectionTopLevelData();

            if (vTopData.SelectExists())
            {
                string vS = vTopData.GetSelectText();
                vS = vS.Replace("\n", "").Replace("\t", "").Replace("\r", "");
                DeItem vDeItem = FEmrView.NewDeItem(vS);
                vDeItem.EditProtect = true;
                FEmrView.InsertDeItem(vDeItem);
            }
            else
            {
                DeItem vDeItem = vTopData.GetActiveItem() as DeItem;
                if (vDeItem.EditProtect)
                {
                    vDeItem.EditProtect = false;
                    FEmrView.ReAdaptActiveItem();
                }
            }
        }