/// <summary>
        /// Go to the page to add an element
        /// </summary>
        /// <returns></returns>
        private async Task GoToAddElement()
        {
            AddElementWindow page = new AddElementWindow(UserServices, AlertServices, MaterialServices, ProductServices, MaterialsProductServices, SaleServices, await MaterialServices.GetAll());

            page.Show();
            CurrentPage.Close();
        }
Exemplo n.º 2
0
 private void EditButtonAction(string obj)
 {
     try
     {
         AddElementWindow editWindow = new AddElementWindow(masterController, ParentElement);
         editWindow.Show();
     }
     catch (Exception e)
     {
         MessageBox.Show(e.Message);
     }
 }
Exemplo n.º 3
0
        private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
        {
            AddElementWindow window = new AddElementWindow();

            window.ShowDialog();

            if (window.DialogResult == true)
            {
                NewDeviceAdded?.Invoke(this, new NewDeviceAddedEventArgs()
                {
                    Name = window.Name, Ip = window.Ip, Type = window.Type
                });
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Создать новый элемент
        /// </summary>
        /// <param name="locateCursor"></param>
        public static void AddElement(Point locateCursor)
        {
            Element el = new AddElementWindow().NewElement(locateCursor);

            PictureElement(el);
        }