Exemple #1
0
        /// <summary>
        /// Required Method for Grid Settings
        /// </summary>
        void GridSettings()
        {
            this.gridGroupingControl1.DataSource = this.northwindDataSet1.Orders;
            this.gridGroupingControl1.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended;
            fchooser = new FieldChooser(this.gridGroupingControl1);
            this.checkBoxAdv1.Checked         = true;
            this.checkBoxAdv1.EnableTouchMode = true;
            this.gridGroupingControl1.TableDescriptor.Columns["OrderID"].HeaderText        = "Order ID";
            this.gridGroupingControl1.TableDescriptor.Columns["CustomerID"].HeaderText     = "Customer ID";
            this.gridGroupingControl1.TableDescriptor.Columns["EmployeeID"].HeaderText     = "Employee ID";
            this.gridGroupingControl1.TableDescriptor.Columns["OrderDate"].HeaderText      = "Order Date";
            this.gridGroupingControl1.TableDescriptor.Columns["RequiredDate"].HeaderText   = "Require Date";
            this.gridGroupingControl1.TableDescriptor.Columns["ShippedDate"].HeaderText    = "Shipped Date";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipVia"].HeaderText        = "Ship Via";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipName"].HeaderText       = "Ship Name";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipAddress"].HeaderText    = "Ship Address";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipCity"].HeaderText       = "Ship City";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipRegion"].HeaderText     = "Ship Region";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipAddress"].HeaderText    = "Ship Address";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipCountry"].HeaderText    = "Ship Country";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipPostalCode"].HeaderText = "Ship Postal Code";
            this.gridGroupingControl1.TableDescriptor.Columns["ShipPostalCode"].Width      = 160;
            this.gridGroupingControl1.Table.DefaultColumnHeaderRowHeight = 30;

            //Navigate to other control using tabkey navigation
            this.gridGroupingControl1.WantTabKey = false;
        }
Exemple #2
0
        /// <summary>
        /// Enable Localiztion in Record Navigation Bar handled
        /// </summary>
        private void checkBox7_CheckedChanged(object sender, EventArgs e)
        {
            LockWindowUpdate(this.Handle);
            Localizer loc = new Localizer();

            loc.getstring(checkBox5.Checked, checkBox8.Checked, checkBox6.Checked, checkBox7.Checked);
            LocalizationProvider.Provider = loc;
            FieldChooser fieldChooserObj = new FieldChooser(this.gridGroupingControl1);

            GridGroupingSettings();
            LockWindowUpdate(IntPtr.Zero);
        }
Exemple #3
0
        static int Main(string[] args)
        {
            // Using TinyTest
            Test.Module("Fluent Ignore Tests");

            Test.Case("Ignoring request fields works", () =>
            {
                var ignored = Ignore.FromRequest()
                              .Field(req => req.Method)
                              .Field(req => req.Path)
                              .Field(req => req.RequestHeaders)
                              .ToArray();

                Test.Equal(ignored[0], "Method");
                Test.Equal(ignored[1], "Path");
                Test.Equal(ignored[2], "RequestHeaders");
            });


            Test.Case("Ignoring response fields works", () =>
            {
                var ignored = Ignore.FromResponse()
                              .Field(res => res.RawResponseCookies)
                              .Field(req => req.ReasonPhrase)
                              .ToArray();

                Test.Equal(ignored[0], "RawResponseCookies");
                Test.Equal(ignored[1], "ReasonPhrase");
            });


            Test.Case("Ignoring error fields works", () =>
            {
                var ignored = Ignore.FromError()
                              .Field(error => error.Duration)
                              .Field(error => error.ResolvedRouteParameters)
                              .ToArray();

                Test.Equal(ignored[0], "Duration");
                Test.Equal(ignored[1], "ResolvedRouteParameters");
            });


            Test.Case("FieldChoser<T> returns empty array when no fields had been chosen", () =>
            {
                var defaultChoser = new FieldChooser <ErrorLogData>();

                Test.Equal(0, defaultChoser.ToArray().Length);
            });

            return(Test.Report());
        }
Exemple #4
0
        /// <summary>
        /// GridGrouping control Grouping Events customization.
        /// </summary>
        private void GridSettings()
        {
            String commandstring1 = "select * from Employees";
            String commandstring2 = "select * from Orders";

            SqlCeDataAdapter da1 = new SqlCeDataAdapter(commandstring1, connString);
            SqlCeDataAdapter da2 = new SqlCeDataAdapter(commandstring2, connString);

            try
            {
                da1.Fill(dataset11, "Employees");
                da2.Fill(dataset11, "Orders");
            }
            catch (SqlException ex)
            {
                ShowErrorMessage(ex);
            }

            //Setting Grid properties
            this.gridGroupingControl1.TableControl.DpiAware = true;
            this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails    = false;
            this.gridGroupingControl1.NestedTableGroupOptions.ShowAddNewRecordBeforeDetails = false;
            this.gridGroupingControl1.TableOptions.GridLineBorder = new GridBorder(GridBorderStyle.Solid, System.Drawing.Color.FromArgb(208, 215, 229), GridBorderWeight.Thin);
            this.BackColor = Color.White;
            this.gridGroupingControl1.GridVisualStyles     = GridVisualStyles.Metro;
            this.gridGroupingControl1.GridOfficeScrollBars = OfficeScrollBars.Metro;
            FieldChooser fc = new FieldChooser(this.gridGroupingControl1);

            //used to set multiextended selection mode in gridgrouping control.
            this.gridGroupingControl1.TableOptions.ListBoxSelectionMode  = SelectionMode.MultiExtended;
            this.gridGroupingControl1.Table.DefaultColumnHeaderRowHeight = (int)DpiAware.LogicalToDeviceUnits(30.0f);
            //this.gridGroupingControl1.Table.DefaultRecordRowHeight = (int)DpiAware.LogicalToDeviceUnits(22.0f);
            this.gridGroupingControl1.Table.DefaultRecordRowHeight = this.gridGroupingControl1.GetTable("Orders").DefaultRecordRowHeight = (int)DpiAware.LogicalToDeviceUnits(22.0f);

            //Navigate to other control using tabkey navigation
            this.gridGroupingControl1.WantTabKey = false;
        }
Exemple #5
0
 /// <summary>
 /// Required Method for sample level customization.
 /// </summary>
 void SampleCustomization()
 {
     FieldChooser fchooser = new FieldChooser(this.gridGroupingControl1);
 }