public CellValueConditionControl()
        {
            Grid LayoutRoot = new Grid();

            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition() { Width = GridLength.Auto });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());

            LayoutRoot.RowDefinitions.Add(new RowDefinition());
            LayoutRoot.RowDefinitions.Add(new RowDefinition() { Height = new GridLength(24) });
            LayoutRoot.RowDefinitions.Add(new RowDefinition());

            // Тип фильтра
            comboFilterType = new CellConditionTypeCombo() { Margin = new Thickness(5, 0, 0, 0) };
            comboFilterType.SelectionChanged += new SelectionChangedEventHandler(comboFilterType_SelectionChanged);
            LayoutRoot.Children.Add(comboFilterType);
            Grid.SetRow(comboFilterType, 1);
            Grid.SetColumn(comboFilterType, 1);

            // Количество записей
            numCount_1 = new NumericUpDown() { Margin = new Thickness(5,0,0,0) };
            numCount_1.DecimalPlaces = 2;
            numCount_1.Increment = 1;
            numCount_1.Minimum = int.MinValue;
            numCount_1.Maximum = int.MaxValue;
            numCount_1.Value = 0;
            LayoutRoot.Children.Add(numCount_1);
            Grid.SetRow(numCount_1, 1);
            Grid.SetColumn(numCount_1, 2);

            // Текст "и"
            lblAnd = new TextBlock() { Text = Localization.Filter_Label_And, TextAlignment = TextAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom, Margin = new Thickness(5, 0, 0, 0) };
            LayoutRoot.Children.Add(lblAnd);
            Grid.SetColumn(lblAnd, 3);
            Grid.SetRow(lblAnd, 1);

            // Количество записей
            numCount_2 = new NumericUpDown() { Margin = new Thickness(5, 0, 0, 0) };
            numCount_2.DecimalPlaces = 2;
            numCount_2.Increment = 1;
            numCount_2.Minimum = int.MinValue;
            numCount_2.Maximum = int.MaxValue;
            numCount_2.Value = 1;
            LayoutRoot.Children.Add(numCount_2);
            Grid.SetRow(numCount_2, 1);
            Grid.SetColumn(numCount_2, 4);

            this.Content = LayoutRoot;

            Refresh();
        }
Beispiel #2
0
        public CellValueConditionControl()
        {
            Grid LayoutRoot = new Grid();

            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = GridLength.Auto
            });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = GridLength.Auto
            });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition()
            {
                Width = GridLength.Auto
            });
            LayoutRoot.ColumnDefinitions.Add(new ColumnDefinition());

            LayoutRoot.RowDefinitions.Add(new RowDefinition());
            LayoutRoot.RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(24)
            });
            LayoutRoot.RowDefinitions.Add(new RowDefinition());

            // Тип фильтра
            comboFilterType = new CellConditionTypeCombo()
            {
                Margin = new Thickness(5, 0, 0, 0)
            };
            comboFilterType.SelectionChanged += new SelectionChangedEventHandler(comboFilterType_SelectionChanged);
            LayoutRoot.Children.Add(comboFilterType);
            Grid.SetRow(comboFilterType, 1);
            Grid.SetColumn(comboFilterType, 1);

            // Количество записей
            numCount_1 = new NumericUpDown()
            {
                Margin = new Thickness(5, 0, 0, 0)
            };
            numCount_1.DecimalPlaces = 2;
            numCount_1.Increment     = 1;
            numCount_1.Minimum       = int.MinValue;
            numCount_1.Maximum       = int.MaxValue;
            numCount_1.Value         = 0;
            LayoutRoot.Children.Add(numCount_1);
            Grid.SetRow(numCount_1, 1);
            Grid.SetColumn(numCount_1, 2);

            // Текст "и"
            lblAnd = new TextBlock()
            {
                Text = Localization.Filter_Label_And, TextAlignment = TextAlignment.Center, VerticalAlignment = VerticalAlignment.Bottom, Margin = new Thickness(5, 0, 0, 0)
            };
            LayoutRoot.Children.Add(lblAnd);
            Grid.SetColumn(lblAnd, 3);
            Grid.SetRow(lblAnd, 1);

            // Количество записей
            numCount_2 = new NumericUpDown()
            {
                Margin = new Thickness(5, 0, 0, 0)
            };
            numCount_2.DecimalPlaces = 2;
            numCount_2.Increment     = 1;
            numCount_2.Minimum       = int.MinValue;
            numCount_2.Maximum       = int.MaxValue;
            numCount_2.Value         = 1;
            LayoutRoot.Children.Add(numCount_2);
            Grid.SetRow(numCount_2, 1);
            Grid.SetColumn(numCount_2, 4);

            this.Content = LayoutRoot;

            Refresh();
        }