Exemplo n.º 1
0
        /// <summary>
        /// Method to De-activate the Adjusters present in the <see cref="vGridControl1"/>
        /// </summary>
        /// <param name="_index">Index of the <see cref="clb_OutboardAdjPoints"/> item whose checkstate was set to Unchecked</param>
        private void Deactivate_OutboardAdjusters(int _index)
        {
            EditorRow upper = Outboard_CategoryRows[_index].ChildRows[0] as EditorRow;
            EditorRow lower = Outboard_CategoryRows[_index].ChildRows[1] as EditorRow;

            upper.Enabled = false;

            lower.Enabled = false;

            MultiEditorRow upperXYZ = Outboard_CategoryRows[_index].ChildRows[0].ChildRows[0] as MultiEditorRow;
            MultiEditorRow lowerXYZ = Outboard_CategoryRows[_index].ChildRows[1].ChildRows[0] as MultiEditorRow;

            upperXYZ.Enabled = false;
            lowerXYZ.Enabled = false;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Method to Activate the Adjusters present in the <see cref="vGridControl1"/>
        /// </summary>
        /// <param name="_index">Index of the <see cref="clb_InboardAdjPoints"/> item whose checkstate was set to Checked</param>
        private void Activate_InboardPointAdjusters(int _index)
        {
            EditorRow upper = Inboard_CategoryRows[_index].ChildRows[0] as EditorRow;
            EditorRow lower = Inboard_CategoryRows[_index].ChildRows[1] as EditorRow;

            upper.Enabled = true;

            lower.Enabled = true;

            MultiEditorRow upperXYZ = Inboard_CategoryRows[_index].ChildRows[0].ChildRows[0] as MultiEditorRow;
            MultiEditorRow lowerXYZ = Inboard_CategoryRows[_index].ChildRows[1].ChildRows[0] as MultiEditorRow;

            upperXYZ.Enabled = true;
            lowerXYZ.Enabled = true;
        }
 public override void Execute(BaseRow row)
 {
     if (row is MultiEditorRow)
     {
         if ((row as MultiEditorRow).PropertiesCollection[fieldName] != null)
         {
             MultiEditorRow mRow = row as MultiEditorRow;
             FocusRow(row);
             row.Grid.FocusedRecordCellIndex = mRow.PropertiesCollection.IndexOf(mRow.PropertiesCollection[fieldName]);
         }
         else
         if (row.Properties.FieldName == fieldName)
         {
             FocusRow(row);
         }
     }
 }
Exemplo n.º 4
0
        private void VGridControl1_CellValueChanged(object sender, DevExpress.XtraVerticalGrid.Events.CellValueChangedEventArgs e)
        {
            int mainIndex = 0;

            if (vGridControl1.FocusedRow is MultiEditorRow)
            {
                MultiEditorRow row = vGridControl1.FocusedRow as MultiEditorRow;

                EditorRow eRow = row.ParentRow as EditorRow;

                CategoryRow cRow = eRow.ParentRow as CategoryRow;

                string coordName = "";

                if (Inboard_CategoryRows.Contains(cRow))
                {
                    mainIndex = Inboard_CategoryRows.IndexOf(cRow);

                    coordName = clb_InboardAdjPoints.Items[mainIndex].Value as string;
                }
                else if (Outboard_CategoryRows.Contains(cRow))
                {
                    mainIndex = Outboard_CategoryRows.IndexOf(cRow);

                    coordName = clb_OutboardAdjPoints.Items[mainIndex].Value as string;
                }

                if (KO_CV.KO_MasterAdjs.ContainsKey(coordName))
                {
                    if (row.Name == ("UpperLimit" + mainIndex))
                    {
                        KO_CV.KO_MasterAdjs[coordName].UpperCoordinateLimit = new Point3D((double)row.PropertiesCollection[0].Value,
                                                                                          (double)row.PropertiesCollection[1].Value,
                                                                                          (double)row.PropertiesCollection[2].Value);
                    }
                    else if (row.Name == ("LowerLimit" + mainIndex))
                    {
                        KO_CV.KO_MasterAdjs[coordName].LowerCoordinateLimit = new Point3D((double)row.PropertiesCollection[0].Value,
                                                                                          (double)row.PropertiesCollection[1].Value,
                                                                                          (double)row.PropertiesCollection[2].Value);
                    }
                }
            }
        }
Exemplo n.º 5
0
        /// <summary>
        /// Method to an Adjustbile Coordinate Row SET. That is each call of this method creates 2 MultiEditorRows with 3 Rows (for X/Y/Z), 2 Editor Rows which represenet Upper and Lower Range of the Adjustible
        /// Coordinate and 1 category row which houses all the above mentioned rows
        /// </summary>
        /// <param name="_name">Caption of the Category</param>
        /// <param name="mr_Upper">Multi-EditorRow which will house the Upper Range of the Adjustible Coordinate</param>
        /// <param name="mr_Lower">Multi-EditorRow which will house the Lower Range of the Adjustible Coordinate</param>
        /// <param name="er_Upper">Editor Row which will house the Upper <paramref name="mr_Upper"/></param>
        /// <param name="er_Lower">Editor Row which will house the Upper <paramref name="mr_Lower"/></param>
        /// <returns><see cref="CategoryRow"/> containing all the Rows passed as parameters</returns>
        private CategoryRow CreateRows(string _name, out MultiEditorRow mr_Upper, out MultiEditorRow mr_Lower, out EditorRow er_Upper, out EditorRow er_Lower)
        {
            ///<summary>Creating the Upper Limit's Multi-Editor Row</summary>
            mr_Upper      = new MultiEditorRow();
            mr_Upper.Name = "UpperLimit";

            MultiEditorRowProperties m1 = new MultiEditorRowProperties();

            m1.Caption = "X";
            m1.Value   = (double)0;
            MultiEditorRowProperties m2 = new MultiEditorRowProperties();

            m2.Caption = "Y";
            m2.Value   = (double)0;
            MultiEditorRowProperties m3 = new MultiEditorRowProperties();

            m3.Caption = "Z";
            m3.Value   = (double)0;

            mr_Upper.PropertiesCollection.AddRange(new MultiEditorRowProperties[] { m1, m2, m3 });
            mr_Upper.Enabled = false;



            ///<summary>Creating the Lower Limit's Multi-Editor Row</summary>
            mr_Lower      = new MultiEditorRow();
            mr_Lower.Name = "LowerLimit";

            MultiEditorRowProperties m4 = new MultiEditorRowProperties();

            m4.Caption = "X";
            m4.Value   = (double)0;
            MultiEditorRowProperties m5 = new MultiEditorRowProperties();

            m5.Caption = "Y";
            m5.Value   = (double)0;
            MultiEditorRowProperties m6 = new MultiEditorRowProperties();

            m6.Caption = "Z";
            m6.Value   = (double)0;

            mr_Lower.PropertiesCollection.AddRange(new MultiEditorRowProperties[] { m4, m5, m6 });
            mr_Lower.Enabled = false;


            ///<summary>Creating the Upper Limit's Editor Row which will house the Upper Multi-Editor Row</summary>
            er_Upper = new EditorRow();
            er_Upper.Properties.Caption   = "Upper";
            er_Upper.Properties.AllowEdit = false;
            er_Upper.ChildRows.Add(mr_Upper);
            er_Upper.Enabled = false;


            ///<summary>Creating the Lower Limit's Editor Row which will house the Lower Multi-Editor Row</summary>
            er_Lower = new EditorRow();
            er_Lower.Properties.Caption   = "Lower";
            er_Lower.Properties.AllowEdit = false;
            er_Lower.ChildRows.Add(mr_Lower);
            er_Lower.Enabled = false;


            ///<summary>The Category which will house all the above rowss</summary>
            CategoryRow category = new CategoryRow(_name);

            category.Name = _name;
            category.ChildRows.AddRange(new BaseRow[] { er_Upper, er_Lower });


            return(category);
        }