Example #1
0
        public void Init()
        {
            ObservableCollection <WebPageBaseViewModel> properties = new ObservableCollection <WebPageBaseViewModel>();

            _rootPanel = new RootPanel(properties);
            properties.Add(_rootPanel);
            _helper = new ScriptConstructorHelper();
        }
Example #2
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("[Инфо]:Скопированно в буфер");
            }
        }