예제 #1
0
        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);
        }
예제 #2
0
        private Grid GetHelpGrid()
        {
            var result = WindowMaker.GetGrid(new Thickness(0));

            result.Children.Add(new TextBlock()
            {
                Text = "1. If you want to agree order, then click on order and press \"Yes\", if you disagree then press \"No\".\n2. If you to complete the order, then click on order and press \"Yes\". \n3. Register new admin"
            });
            return(result);
        }
예제 #3
0
        public MainWindow()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            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(250, 75, 250, 75));

            kitGrid.Background = new SolidColorBrush(Color.FromArgb(200, 240, 248, 252));
            Grid.Children.Add(kitGrid);

            BuildInterface(kitGrid);
        }
예제 #4
0
        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()
        {
            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);
        }