Exemple #1
0
        /// <summary>
        /// Получить скрипт для редактирования
        /// </summary>
        public void GetPageScript(string param)
        {
            bool           isEdit = param == "e";
            ModalView      window = new ModalView();
            RolesViewModel model  = new RolesViewModel {
                Roles = _dal.GetGlobalRoles()
            };

            window.DataContext = model;
            if (window.ShowDialog() == true)
            {
                ScriptConstructorHelper helper = new ScriptConstructorHelper {
                    Visability = 3
                };
                helper.Constructor(_constructorViewModel.Properties, isEdit, CurrentMenuPageView.Id, model.SelectRoles.Select(i => i.Id));
                Clipboard.SetText(helper.ToString());
                _aggregator.PublishOnUIThread("[Инфо]:Скопированно в буфер");
            }
        }
 /// <summary>
 /// Получить скрипт для редактирования
 /// </summary>
 public void GetPageScript(string param)
 {
     bool isEdit = param == "e";
     ModalView window = new ModalView();
     RolesViewModel model = new RolesViewModel { Roles = _dal.GetGlobalRoles() };
     window.DataContext = model;
     if (window.ShowDialog() == true)
     {
         ScriptConstructorHelper helper = new ScriptConstructorHelper { Visability = 3 };
         helper.Constructor(_constructorViewModel.Properties, isEdit, CurrentMenuPageView.Id, model.SelectRoles.Select(i => i.Id));
         Clipboard.SetText(helper.ToString());
         _aggregator.PublishOnUIThread("[Инфо]:Скопированно в буфер");
     }
 }