Пример #1
0
        /// <summary>
        /// Добавить таблицу
        /// </summary>
        public void AddGrid()
        {
            ModalView     window         = new ModalView();
            GridViewModel panelViewModel = new GridViewModel(_rootPanel);

            window.DataContext = panelViewModel;
            if (window.ShowDialog() == true)
            {
                _rootPanel.Children.Add(panelViewModel);
            }
        }
Пример #2
0
        /// <summary>
        /// Установить всем
        /// </summary>
        public void SetAll()
        {
            MassiveSetViewModel model  = new MassiveSetViewModel(Properties);
            ModalView           window = new ModalView {
                DataContext = model
            };

            if (window.ShowDialog() == true)
            {
            }
        }
Пример #3
0
        /// <summary>
        /// Добавить свойство
        /// </summary>
        public void AddProperty()
        {
            ModalView      window = new ModalView();
            ModalViewModel model  = new ModalViewModel(_rootPanel);

            window.DataContext = model;
            if (window.ShowDialog() == true)
            {
                _rootPanel.Children.Add(model);
                NotifyOfPropertyChange(nameof(CanWriteResourses));
            }
        }
Пример #4
0
        public void EditProperty()
        {
            if (CurrentProperty == null)
            {
                return;
            }
            ModalView window = new ModalView();

            window.DataContext = CurrentProperty;
            if (window.ShowDialog() == true)
            {
            }
        }
Пример #5
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("[Инфо]:Скопированно в буфер");
            }
        }
Пример #6
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("[Инфо]:Скопированно в буфер");
     }
 }
Пример #7
0
 /// <summary>
 /// Установить всем
 /// </summary>
 public void SetAll()
 {
     MassiveSetViewModel model = new MassiveSetViewModel(Properties);
     ModalView window = new ModalView { DataContext = model };
     if (window.ShowDialog() == true)
     {
     }
 }
Пример #8
0
 public void EditProperty()
 {
     if (CurrentProperty == null)
         return;
     ModalView window = new ModalView();
     window.DataContext = CurrentProperty;
     if (window.ShowDialog() == true)
     {
     }
 }
Пример #9
0
 /// <summary>
 /// Добавить свойство
 /// </summary>
 public void AddProperty()
 {
     ModalView window = new ModalView();
     ModalViewModel model = new ModalViewModel(_rootPanel);
     window.DataContext = model;
     if (window.ShowDialog() == true)
     {
         _rootPanel.Children.Add(model);
         NotifyOfPropertyChange(nameof(CanWriteResourses));
     }
 }
Пример #10
0
 /// <summary>
 /// Добавить панель
 /// </summary>
 public void AddPanel()
 {
     ModalView window = new ModalView();
     PanelViewModel panelViewModel = new PanelViewModel(_rootPanel);
     window.DataContext = panelViewModel;
     if (window.ShowDialog() == true)
     {
         _rootPanel.Children.Add(panelViewModel);
     }
 }