private void BuildFormOfOrder()
        {
            Grid.Children.Clear();
            var kitGrid = WindowMaker.GetGrid(new SolidColorBrush(Color.FromArgb(200, 240, 248, 252)), new Thickness(250, 75, 250, 75));

            var elements = kitGrid.Children;

            elements.Add(WindowMaker.GetTextBlock("Model of machine :", new Thickness(10, 45, 10, 135)));
            var machineModelBox = WindowMaker.GetTextBox(new Thickness(10, 65, 10, 175));

            elements.Add(machineModelBox);

            elements.Add(WindowMaker.GetTextBlock("Number of machine :", new Thickness(10, 105, 10, 135)));
            var machineNumberBox = WindowMaker.GetTextBox(new Thickness(10, 125, 10, 115));

            elements.Add(machineNumberBox);

            var button = new Button()
            {
                Margin = new Thickness(10, 180, 10, 40), Content = "Зарегистрировать"
            };

            button.Click += (sender, e) => CheckAndAddToDataBase(machineModelBox.Text, machineNumberBox.Text);
            elements.Add(button);
            Grid.Children.Add(kitGrid);
        }
        private Grid GetGridAdmin()
        {
            var result  = WindowMaker.GetGrid("Mechanic.jpg", new Thickness(0));
            var kitGrid = WindowMaker.GetGrid(new SolidColorBrush(Color.FromArgb(200, 240, 248, 252)), new Thickness(250, 75, 250, 75));

            kitGrid.Children.Add(WindowMaker.GetTextBlock("Login :"******"Password :"******"Register", new Thickness(10, 140, 10, 50),
                                                       (sender, e) => { AddAdmin(login.Text, password.Text.GetHashCode()); login.Text = ""; password.Text = ""; }));
            result.Children.Add(kitGrid);
            return(result);
        }
        private void BuildInterface(Grid grid)
        {
            var elements = grid.Children;

            elements.Add(WindowMaker.GetTextBlock("Login :"******"Password :"******"Login", new Thickness(10, 140, 10, 80),
                                               (sender, e) => CheckAndLogin(loginBox.Text, passwordBox.Password)));
            elements.Add(WindowMaker.GetButton("Register", new Thickness(10, 200, 10, 20),
                                               (sender, e) => RegisterGuest()));
        }
        private void BuildInterface()
        {
            var Grid = WindowMaker.GetGrid("Start.jpg", new Thickness(0));

            AddChild(Grid);
            var kitGrid          = WindowMaker.GetGrid(new SolidColorBrush(Color.FromArgb(200, 240, 248, 252)), new Thickness(200, 25, 200, 25));
            var elements         = kitGrid.Children;
            var thicknessOfBLock = new Thickness(10, 10, 10, 300);
            var thicknessOfBox   = new Thickness(10, 40, 10, 300);

            foreach (var name in ContentOfBlocks)
            {
                elements.Add(WindowMaker.GetTextBlock(name, thicknessOfBLock));
                var box = WindowMaker.GetTextBox(thicknessOfBox);
                boxes.Add(box);
                elements.Add(box);
                thicknessOfBLock = ChangeThickness(thicknessOfBLock);
                thicknessOfBox   = ChangeThickness(thicknessOfBox);
            }
            elements.Add(WindowMaker.GetButton("Register", new Thickness(10, 320, 10, 10),
                                               (sender, e) => CheckAndAdd()));
            Grid.Children.Add(kitGrid);
        }