Esempio n. 1
0
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("Name", "کیلد واژه", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("EngName", "معادل انگلیسی", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Description", "توضیحات", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);


        return(CellCol);
    }
Esempio n. 2
0
    protected CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion

        #region Data Cells
        dataCell             = new DataCell("UserCode", "کد پدر", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("FullName", "نام گیرنده", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Address", "آدرس", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
Esempio n. 3
0
    public CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion
        #region Data Cells
        dataCell             = new DataCell("Title", "Title", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Url", "Url", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("CatName", "Category", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("Title", "عنوان", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("SDate", "تاریخ شروع", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("EDate", "تاریخ پایان", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);


        return(CellCol);
    }
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("Keyword", "کد کلید واژه", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Name", "کد موجودیت", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);


        return(CellCol);
    }
Esempio n. 6
0
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("FirstName", "نام", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("LastName", "نام خانوادگی", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("Active", "وضعیت", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);


        return(CellCol);
    }
Esempio n. 7
0
 public override void ZoneInit()
 {
     base.ZoneInit();
     AssignHardware(typeof(EnumAxisName), typeof(EnumInportName), typeof(EnumOutportName));
     AxisSortingPNPY    = ThisAxis(EnumAxisName.SortingPNPY);
     AxisSortingPNPZ    = ThisAxis(EnumAxisName.SortingPNPZ);
     NGBoxFullSensor[0] = ThisInport(EnumInportName.SortingPNPNGBoxFull1);
     NGBoxFullSensor[1] = ThisInport(EnumInportName.SortingPNPNGBoxFull2);
     NGBoxFullSensor[2] = ThisInport(EnumInportName.SortingPNPNGBoxFull3);
     NGBoxFullSensor[3] = ThisInport(EnumInportName.SortingPNPNGBoxFull4);
     NGBoxBackSenser    = ThisInport(EnumInportName.SortingPNPNGBoxBack);
     NGBoxFrontSensor   = ThisInport(EnumInportName.SortingPNPNGBoxFront);
     AxisSortingPNPY.AddPoints(typeof(EnumPointPNPY));
     AxisSortingPNPZ.AddPoints(typeof(EnumPointPNPZ));
     PNPCylinder.Add(EnumCellIndex.左电芯, new CylinderControl(/*"左电芯Z气缸", "下降", "上升",*/
                         ThisOutport(EnumOutportName.SortingPNPCyLeftDown),
                         ThisOutport(EnumOutportName.SortingPNPCyLeftUp),
                         ThisInport(EnumInportName.SortingPNPCyLeftDown),
                         ThisInport(EnumInportName.SortingPNPCyLeftUp)));
     PNPCylinder.Add(EnumCellIndex.中电芯, new CylinderControl(/*"中电芯Z气缸", "下降", "上升",*/
                         ThisOutport(EnumOutportName.SortingPNPCyMidDown),
                         ThisOutport(EnumOutportName.SortingPNPCyMidUp),
                         ThisInport(EnumInportName.SortingPNPCyMidDown),
                         ThisInport(EnumInportName.SortingPNPCyMidUp)));
     PNPCylinder.Add(EnumCellIndex.右电芯, new CylinderControl(/*"右电芯Z气缸", "下降", "上升",*/
                         ThisOutport(EnumOutportName.SortingPNPCyRightDown),
                         ThisOutport(EnumOutportName.SortingPNPCyRightUp),
                         ThisInport(EnumInportName.SortingPNPCyRightDown),
                         ThisInport(EnumInportName.SortingPNPCyRightUp)));
     CellVacuums[EnumCellIndex.左电芯].MainPort.Port =
         ThisOutport(EnumOutportName.SortingPNPVacLeft);
     CellVacuums[EnumCellIndex.左电芯].AirPorts[(int)EnumVacuumIndex.后真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacLeftBack);
     CellVacuums[EnumCellIndex.左电芯].AirPorts[(int)EnumVacuumIndex.中真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacLeftCent);
     CellVacuums[EnumCellIndex.左电芯].AirPorts[(int)EnumVacuumIndex.前真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacLeftFront);
     CellVacuums[EnumCellIndex.中电芯].MainPort.Port =
         ThisOutport(EnumOutportName.SortingPNPVacMid);
     CellVacuums[EnumCellIndex.中电芯].AirPorts[(int)EnumVacuumIndex.后真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacMidBack);
     CellVacuums[EnumCellIndex.中电芯].AirPorts[(int)EnumVacuumIndex.中真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacMidCent);
     CellVacuums[EnumCellIndex.中电芯].AirPorts[(int)EnumVacuumIndex.前真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacMidFront);
     CellVacuums[EnumCellIndex.右电芯].MainPort.Port =
         ThisOutport(EnumOutportName.SortingPNPVacRight);
     CellVacuums[EnumCellIndex.右电芯].AirPorts[(int)EnumVacuumIndex.后真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacRightBack);
     CellVacuums[EnumCellIndex.右电芯].AirPorts[(int)EnumVacuumIndex.中真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacRightCent);
     CellVacuums[EnumCellIndex.右电芯].AirPorts[(int)EnumVacuumIndex.前真空].Port =
         ThisOutport(EnumOutportName.SortingPNPVacRightFront);
     CellBlow.Port = ThisOutport(EnumOutportName.SortingPNPBlow);
     CellVacSensor[EnumCellIndex.左电芯].Port = ThisInport(EnumInportName.SortingPNPVacSensLeft);
     CellVacSensor[EnumCellIndex.中电芯].Port = ThisInport(EnumInportName.SortingPNPVacSensMid);
     CellVacSensor[EnumCellIndex.右电芯].Port = ThisInport(EnumInportName.SortingPNPVacSensRight);
     ZoneSettingPanel = new SettingPanelZoneNG挑选机械手();
     ZoneManualPanel  = new ManualPanelZoneNG挑选机械手();
 }
    CellCollection IBaseBOL.GetListCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.MaxLength   = 100;
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion
        #region Data Cells
        dataCell             = new DataCell("Word", "کلمه", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
Esempio n. 9
0
    CellCollection IBaseBOL.GetListCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.MaxLength   = 100;
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("NewsFlowCode", "کد پدر", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Name", "کلید واژه", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);


        return(CellCol);
    }
Esempio n. 10
0
    CellCollection IBaseBOL.GetListCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        //        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align     = AlignTypes.Right;
        dataCell.FieldName = "Code";
        dataCell.MaxLength = 100;
        dataCell.Width     = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell();
        dataCell.CaptionName = "نام";
        dataCell.Align       = AlignTypes.Right;
        dataCell.IsListTitle = true;
        dataCell.FieldName   = "Name";
        dataCell.MaxLength   = 150;
        dataCell.Width       = 200;
        CellCol.Add(dataCell);

        return(CellCol);
    }
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("NewsCode", "کد خبر", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Title", "جریان خبری", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;

        CellCol.Add(dataCell);


        return(CellCol);
    }
Esempio n. 12
0
    protected CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion
        #region Data Cells
        dataCell             = new DataCell("Name", "نام", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Email", "ایمیل", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("SDate", "تاریخ ارسال", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
Esempio n. 13
0
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.MaxLength   = 100;
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("Name", "نام", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.MaxLength   = 100;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("EngName", "نام انگلیسی", AlignTypes.Right, 100);
        dataCell.IsListTitle = true;
        dataCell.MaxLength   = 200;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("BaseID", "لینک", AlignTypes.Right, 100);
        dataCell.IsListTitle = true;
        dataCell.MaxLength   = 150;
        CellCol.Add(dataCell);

        return(CellCol);
    }
Esempio n. 14
0
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Left;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("FromUser", "FromUser", AlignTypes.Left, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("ToUser", "ToUser", AlignTypes.Left, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Title", "Title", AlignTypes.Left, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Status", "Status", AlignTypes.Left, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);


        return(CellCol);
    }
Esempio n. 15
0
 public override void ZoneInit()
 {
     base.ZoneInit();
     AssignHardware(typeof(EnumAxisName), typeof(EnumInportName), typeof(EnumOutportName), typeof(EnumSerialPortName));
     AxisThicknessMeasY = ThisAxis(EnumAxisName.ThicknessMeasY); AxisThicknessMeasY.AddPoints(typeof(EnumPointX));
     SerialPort.Add(EnumCellIndex.左电芯, ThisSerialPortData(EnumSerialPortName.ThicknessSensorLeft));
     SerialPort.Add(EnumCellIndex.中电芯, ThisSerialPortData(EnumSerialPortName.ThicknessSensorMid));
     SerialPort.Add(EnumCellIndex.右电芯, ThisSerialPortData(EnumSerialPortName.ThicknessSensorRight));
     Cylinder.Add(EnumCellIndex.左电芯, new CylinderControl(/*"左电芯压紧气缸", "下降", "上升",*/
                      ThisOutport(EnumOutportName.ThicknessMeasCyLeftDown),
                      ThisOutport(EnumOutportName.ThicknessMeasCyLeftUp),
                      ThisInport(EnumInportName.ThicknessMeasCyLeftDown),
                      ThisInport(EnumInportName.ThicknessMeasCyLeftUp)));
     Cylinder.Add(EnumCellIndex.中电芯, new CylinderControl(/*"中电芯压紧气缸", "下降", "上升",*/
                      ThisOutport(EnumOutportName.ThicknessMeasCyMidDown),
                      ThisOutport(EnumOutportName.ThicknessMeasCyMidUp),
                      ThisInport(EnumInportName.ThicknessMeasCyMidDown),
                      ThisInport(EnumInportName.ThicknessMeasCyMidUp)));
     Cylinder.Add(EnumCellIndex.右电芯, new CylinderControl(/*"右电芯压紧气缸", "下降", "上升",*/
                      ThisOutport(EnumOutportName.ThicknessMeasCyRightDown),
                      ThisOutport(EnumOutportName.ThicknessMeasCyRightUp),
                      ThisInport(EnumInportName.ThicknessMeasCyRightDown),
                      ThisInport(EnumInportName.ThicknessMeasCyRightUp)));
     ThicknessCellVacuums[EnumCellIndex.左电芯].Port = ThisOutport(EnumOutportName.ThicknessMeasVacLeft);
     ThicknessCellVacuums[EnumCellIndex.中电芯].Port = ThisOutport(EnumOutportName.ThicknessMeasVacMid);
     ThicknessCellVacuums[EnumCellIndex.右电芯].Port = ThisOutport(EnumOutportName.ThicknessMeasVacRight);
     CellBlow.Port = ThisOutport(EnumOutportName.ThicknessMeasBlow);
     CellVacSensor[EnumCellIndex.左电芯].Port = ThisInport(EnumInportName.ThicknessMeasVacSensLeft);
     CellVacSensor[EnumCellIndex.中电芯].Port = ThisInport(EnumInportName.ThicknessMeasVacSensMid);
     CellVacSensor[EnumCellIndex.右电芯].Port = ThisInport(EnumInportName.ThicknessMeasVacSensRight);
     ZoneSettingPanel = new SettingPanelZone厚度测量();
     ZoneManualPanel  = new ManualPanelZone厚度测量();
 }
Esempio n. 16
0
    public CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion
        #region Data Cells
        dataCell             = new DataCell("Question", "سوال", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("ShowOrder", "ترتیب نمایش", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
Esempio n. 17
0
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("UserCode", "کد پدر", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("GroupCode", "کد گروه", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;

        CellCol.Add(dataCell);
        dataCell             = new DataCell("GroupName", "نام گروه", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;

        CellCol.Add(dataCell);


        return(CellCol);
    }
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell             = new DataCell();
        dataCell.CaptionName = "کد";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("Name", "نام", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Active", "فعال", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("LangName", "زبان", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        CellCol.Add(dataCell);



        return(CellCol);
    }
Esempio n. 19
0
    protected CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion
        #region Data Cells
        dataCell             = new DataCell("Title", "عنوان", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Active", "فعال", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
Esempio n. 20
0
 public override void ZoneInit()
 {
     base.ZoneInit();
     AssignHardware(typeof(EnumAxisName), typeof(EnumInportName), typeof(EnumOutportName));
     AxisLoadPNPY    = ThisAxis(EnumAxisName.LoadPNPY); AxisLoadPNPY.AddPoints(typeof(EnumPointY));
     AxisLoadPNPZ    = ThisAxis(EnumAxisName.LoadPNPZ); AxisLoadPNPZ.AddPoints(typeof(EnumPointZ));
     NGBoxFullSensor = ThisInport(EnumInportName.LoadPNPNGBoxFull);
     NGBoxSensor     = ThisInport(EnumInportName.LoadPNPNGBox);
     PNPCylinder.Add(EnumCellIndex.左电芯, new CylinderControl(/*"左电芯Z气缸", "下降", "上升",*/
                         ThisOutport(EnumOutportName.LoadPNPCyLeftDown),
                         ThisOutport(EnumOutportName.LoadPNPCyLeftUp),
                         ThisInport(EnumInportName.LoadPNPCyLeftDown),
                         ThisInport(EnumInportName.LoadPNPCyLeftUp)));
     PNPCylinder.Add(EnumCellIndex.中电芯, new CylinderControl(/*"中电芯Z气缸", "下降", "上升",*/
                         ThisOutport(EnumOutportName.LoadPNPCyMidDown),
                         ThisOutport(EnumOutportName.LoadPNPCyMidUp),
                         ThisInport(EnumInportName.LoadPNPCyMidDown),
                         ThisInport(EnumInportName.LoadPNPCyMidUp)));
     PNPCylinder.Add(EnumCellIndex.右电芯, new CylinderControl(/*"右电芯Z气缸", "下降", "上升",*/
                         ThisOutport(EnumOutportName.LoadPNPCyRightDown),
                         ThisOutport(EnumOutportName.LoadPNPCyRightUp),
                         ThisInport(EnumInportName.LoadPNPCyRightDown),
                         ThisInport(EnumInportName.LoadPNPCyRightUp)));
     CellVacuums[EnumCellIndex.左电芯].MainPort.Port =
         ThisOutport(EnumOutportName.LoadPNPVacLeft);
     CellVacuums[EnumCellIndex.左电芯].AirPorts[(int)EnumVacuumIndex.后真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacLeftBack);
     CellVacuums[EnumCellIndex.左电芯].AirPorts[(int)EnumVacuumIndex.中真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacLeftCent);
     CellVacuums[EnumCellIndex.左电芯].AirPorts[(int)EnumVacuumIndex.前真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacLeftFront);
     CellVacuums[EnumCellIndex.中电芯].MainPort.Port =
         ThisOutport(EnumOutportName.LoadPNPVacMid);
     CellVacuums[EnumCellIndex.中电芯].AirPorts[(int)EnumVacuumIndex.后真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacMidBack);
     CellVacuums[EnumCellIndex.中电芯].AirPorts[(int)EnumVacuumIndex.中真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacMidCent);
     CellVacuums[EnumCellIndex.中电芯].AirPorts[(int)EnumVacuumIndex.前真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacMidFront);
     CellVacuums[EnumCellIndex.右电芯].MainPort.Port =
         ThisOutport(EnumOutportName.LoadPNPVacRight);
     CellVacuums[EnumCellIndex.右电芯].AirPorts[(int)EnumVacuumIndex.后真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacRightBack);
     CellVacuums[EnumCellIndex.右电芯].AirPorts[(int)EnumVacuumIndex.中真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacRightCent);
     CellVacuums[EnumCellIndex.右电芯].AirPorts[(int)EnumVacuumIndex.前真空].Port =
         ThisOutport(EnumOutportName.LoadPNPVacRightFront);
     CellBlow[EnumCellIndex.左电芯].Port      = ThisOutport(EnumOutportName.LoadPNPBlowLeft);
     CellBlow[EnumCellIndex.中电芯].Port      = ThisOutport(EnumOutportName.LoadPNPBlowMid);
     CellBlow[EnumCellIndex.右电芯].Port      = ThisOutport(EnumOutportName.LoadPNPBlowRight);
     CellVacSensor[EnumCellIndex.左电芯].Port = ThisInport(EnumInportName.LoadPNPVacSensLeft);
     CellVacSensor[EnumCellIndex.中电芯].Port = ThisInport(EnumInportName.LoadPNPVacSensMid);
     CellVacSensor[EnumCellIndex.右电芯].Port = ThisInport(EnumInportName.LoadPNPVacSensRight);
     ZoneSettingPanel = new SettingPanelZone上料机械手();
     ZoneManualPanel  = new ManualPanelZone上料机械手();
     DoUpdateNGBox();
     ProductChangeHandler(null, null);
 }
Esempio n. 21
0
    CellCollection IBaseBOL.GetListCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.MaxLength   = 100;
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion

        #region Data Cells
        dataCell             = new DataCell("UserCode", "کد کاربر", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("FirstName", "نام", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("LastName", "نام خانوادگی", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Amount", "مبلغ", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("ChrgDate", "تاریخ شمسی", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("TransStatuse", "وضعیت", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("ChargeType", "نوع واریز", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("HCTransStatusCode", "کد وضعیت", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("ChargeDate", "تاریخ", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
    CellCollection IBaseBOL.GetListCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.MaxLength   = 100;
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion

        #region Data Cells
        dataCell             = new DataCell("UserCode", "کد کاربر", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("FirstName", "نام", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("LastName", "نام خانوادگی", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("HCSiteSectionCode", "کد بخش", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("ItemCode", "کد موجودیت", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Comment", "توضیحات", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("CDate", "تاریخ", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("Active", "فعال", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("SiteSection", "بخش سایت", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
Esempio n. 23
0
        public void Initialize(int firstClickX, int firstClickY)
        {
            const int isMine = -1;

            var cellCounting = new int[Width, Height];
            var rand         = new Random();

            for (var k = 0; k != MineCount; ++k)
            {
                int  x, y;
                bool notToBeMine;
                do
                {
                    x           = rand.Next(Width);
                    y           = rand.Next(Height);
                    notToBeMine =
                        cellCounting[x, y] == isMine ||
                        (x == firstClickX && y == firstClickY);
                } while (notToBeMine);

                cellCounting[x, y] = isMine;
                foreach (var(x1, y1) in GetSurroundingCellsOf(x, y, (i, j) => CheckIndex(i, j) && cellCounting[i, j] != isMine))
                {
                    ++cellCounting[x1, y1];
                }
            }

            var cells = new CellCollection();

            for (var x = 0; x != Width; ++x)
            {
                for (var y = 0; y != Height; ++y)
                {
                    var proximalCount = cellCounting[x, y];
                    var cellIsMine    = proximalCount == isMine;
                    if (cellIsMine)
                    {
                        cells.Add(Cell.CreateMine(x, y));
                    }
                    else
                    {
                        cells.Add(Cell.CreateRegularCell(x, y, proximalCount));
                    }
                }
            }

            CellData      = cells;
            UnmakredCells = cells.Count;
            UnmarkedMines = Difficulty.MineCount;
            ++Version;
            Explore(firstClickX, firstClickY);
            GameState = GameState.OnGoing;
        }
Esempio n. 24
0
        private CellCollection CreateMaximizedCells()
        {
            CellCollection cells = new CellCollection();
            int            count = Cells.Count;

            cells.Add(new Cell(0, 0, Math.Max(count - 1, 1), 1));
            for (int i = 0; i < count - 1; i++)
            {
                cells.Add(new Cell(i, 1));
            }
            return(cells);
        }
Esempio n. 25
0
    public CellCollection GetListCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        #region Code Cell
        dataCell             = new DataCell();
        dataCell.CaptionName = "Code";
        dataCell.IsKey       = true;
        dataCell.DisplayMode = DisplayModes.Hidden;
        dataCell.Align       = AlignTypes.Right;
        dataCell.FieldName   = "Code";
        dataCell.MaxLength   = 100;
        dataCell.Width       = 50;
        CellCol.Add(dataCell);
        #endregion
        #region Data Cells
        dataCell             = new DataCell("CDate", "", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("FullName", "", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("CellPhone", "", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("City", "", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("OrderStatus", "", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("SendType", "", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("PostalCode", "", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);
        dataCell             = new DataCell("OrderPayStatus", "", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.DisplayMode = DisplayModes.Visible;
        CellCol.Add(dataCell);

        #endregion
        return(CellCol);
    }
Esempio n. 26
0
        /// <summary>
        /// Creates the cell.
        /// </summary>
        /// <param name="value">The value.</param>
        /// <param name="columnSpan">The column span.</param>
        /// <param name="rowSpan">The row span.</param>
        /// <param name="cellStyle">The cell style.</param>
        /// <param name="formula">The formula.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentOutOfRangeException">
        /// columnSpan - 不可小於1。
        /// or
        /// rowSpan - 不可小於1。
        /// </exception>
        public Cell CreateCell(
            object value, int columnSpan = 1, int rowSpan       = 1,
            CellStyle?cellStyle          = null, string formula = null
            )
        {
            if (columnSpan <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(columnSpan), "不可小於1。");
            }
            if (rowSpan <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(rowSpan), "不可小於1。");
            }
            cellStyle ??= SpreadsheetManager.Configuration.CellStyle;

            if (rows.Count == 0)
            {
                CreateRow();
            }

            CellCollection lastRow = rows.Last();
            Cell           cell    = new Cell()
            {
                Value     = value,
                Size      = new Size(columnSpan, rowSpan),
                CellStyle = (CellStyle)cellStyle,
                Formula   = formula
            };

            lastRow.Add(cell);

            return(cell);
        }
Esempio n. 27
0
 ///<summary>Gets or sets the probability that a cell is occupied, between 0 and 1.</summary>
 public double this[Location location] {
     get {
         MapCell cell = cells.Get(location);
         return(cell == null ? 0 : cell.Probability);
     }
     set {
         if (value == 0)
         {
             cells.Remove(location);
         }
         else
         {
             MapCell cell = cells.Get(location);
             if (cell == null)
             {
                 cells.Add(new MapCell(location)
                 {
                     Probability = value
                 });
             }
             else
             {
                 cell.Probability = value;
             }
         }
     }
 }
Esempio n. 28
0
        public void Build(Grid grid)
        {
            if (grid == null)
            {
                return;
            }

            var unvisited = new CellCollection();

            foreach (Cell cell in grid.GetCells())
            {
                if (cell != null)
                {
                    unvisited.Add(cell);
                }
            }

            unvisited.Remove(unvisited.Sample());

            while (!unvisited.IsEmpty())
            {
                Cell cell = unvisited.Sample();
                var  path = new CellCollection();
                path.Add(cell);

                while (unvisited.Contains(cell))
                {
                    cell = cell.Neighbors.Sample();

                    int position = path.IndexOf(cell);
                    if (position >= 0)
                    {
                        path.RemoveRange(position + 1, path.Count - position - 1);
                    }
                    else
                    {
                        path.Add(cell);
                    }
                }

                for (int i = 0; i < path.Count - 1; i++)
                {
                    path[i].Link(path[i + 1]);
                    unvisited.Remove(path[i]);
                }
            }
        }
Esempio n. 29
0
    private CellCollection GetCellCollection()
    {
        DataCell       dataCell;
        CellCollection CellCol = new CellCollection();

        dataCell           = new DataCell("Code", "کد", AlignTypes.Right, 50);
        dataCell.IsKey     = true;
        dataCell.MaxLength = 100;
        CellCol.Add(dataCell);

        dataCell             = new DataCell("Name", "نام", AlignTypes.Right, 200);
        dataCell.IsListTitle = true;
        dataCell.MaxLength   = 100;
        CellCol.Add(dataCell);

        return(CellCol);
    }
Esempio n. 30
0
        //**********************************************************************************************************
        //**                                        Read ini file                                                 **
        //**********************************************************************************************************

        public CellCollection ReadIni()
        {
            CellCollection cells = new CellCollection();


            if (!File.Exists(setFile))
            {
                Writer writer = new Writer();
                writer.WriteSettings(setFile);
                Application.Restart();

                //MessageBox.Show(ex.Message);
            }
            else
            {
                try
                {
                    XmlDocument doc = new XmlDocument();
                    doc.Load(setFile);

                    XmlNodeList nodes = doc.DocumentElement.SelectNodes("/Settings/Cells/Cell");

                    conString = doc.DocumentElement.SelectSingleNode("/Settings/ConnectionString").InnerText;
                    snLength  = doc.DocumentElement.SelectSingleNode("/Settings/SnLength").InnerText;

                    foreach (XmlNode node in nodes)
                    {
                        //if (!node.SelectSingleNode("Name").InnerText.Equals(""))
                        Cell cell = new Cell();

                        var index = node.SelectSingleNode("Index").InnerText;
                        int k;

                        if (Int32.TryParse(index, out k))
                        {
                            cell.Index = k;
                        }
                        else
                        {
                            cell.Index = 100;
                            MessageBox.Show("Validator_ini.xml wrong Index value");
                        }
                        cell.Name     = node.SelectSingleNode("Cell_name").InnerText;
                        cell.Location = node.SelectSingleNode("Folder").InnerText;

                        cells.Add(cell);
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Error reading Validator_ini.xml");
                    //throw new ReadFileErrorException(setFile, ex);
                }
            }

            return(cells);
        }
        public CellCollection GetNeighbours(Point location, CAEnvironment environment)
        {
            Cell c = environment.GetCell(location);
            CellCollection neighbours = new CellCollection();
            Point newPoint = location;

            for (int i = 0; i < _neighboursDelta.Length / 2; i++)
            {
                newPoint.Offset(_neighboursDelta[i, 0], _neighboursDelta[i, 1]);
                neighbours.Add(environment.GetCell(newPoint));
                newPoint = location;
            }

            return neighbours;
        }
Esempio n. 32
0
			public CellCollection Clone()
			{
				CellCollection cc = new CellCollection();
				foreach (Cell c in this)
					cc.Add(c.Clone());
				return cc;
			}
Esempio n. 33
0
		internal void redimTable(int cols, int rows, bool copy,
			int cpCol, int cpRow, bool cpInserted,
			int colsAffected, int rowsAffected, bool undo)
		{
			resetCoveredCells();
			hasHeaderRows = false;

			if (undo) flowChart.UndoManager.onRedimTable(this);

			// remove arrows attached to deleted rows
			if (!cpInserted && (rowsAffected != 0) && (rowsList != null))
			{
				ArrayList arrowsToRemove = new ArrayList();
				for (int i = cpRow; i < cpRow + rowsAffected && i < this.rowsCount; ++i)
				{
					Row r = (Row)this.rowsList[i];
					for (int k = 0; k < r.IncomingArrows.Count; ++k)
						arrowsToRemove.Add(r.IncomingArrows[k]);
					for (int k = 0; k < r.OutgoingArrows.Count; ++k)
						arrowsToRemove.Add(r.OutgoingArrows[k]);
				}
				for (int j = 0; j < arrowsToRemove.Count; ++j)
					flowChart.DeleteObject((ChartObject)arrowsToRemove[j]);
				arrowsToRemove.Clear();
			}

			if (undo) flowChart.UndoManager.onRedimArrowsDeleted(this);

			CellCollection oldData = cells;
			RowCollection oldRowsDsc = rowsList;
			ColumnCollection oldColsDsc = colsList;
			int oldCols = this.columnsCount;
			int oldRows = this.rowsCount;
			bool copyC, copyR;
			copyC = copyR = copy;

			// resize the table
			this.columnsCount = cols;
			this.rowsCount = rows;

			// resize the columns array
			colsList = new ColumnCollection();
			if (this.columnsCount > 0)
			{
				for (int c = 0; c < this.columnsCount; ++c)
				{
					Column col = new Column(this);
					col.width = columnWidth;
					colsList.Add(col);
				}
			}
			else
			{
				copyC = false;
			}

			// resize the rows array
			rowsList = new RowCollection();
			if (this.rowsCount > 0)
			{
				for (int rr = 0; rr < this.rowsCount; ++rr)
				{
					Row row = new Row(this);
					row.Height = rowHeight;
					rowsList.Add(row);
				}
			}
			else
			{
				copyR = false;
			}

			// resize the cells array
			cells = new CellCollection();
			if (this.columnsCount > 0 && this.rowsCount > 0)
			{
				for (int i = 0; i < this.columnsCount * this.rowsCount; ++i)
					cells.Add(new Cell(this));
			}
			else
			{
				copy = false;
			}

			// copy data from the old cells array to the new one
			if (copy && (cells != null) && (oldData != null))
			{
				for (int rr = 0; rr < this.rowsCount; ++rr)
				{
					for (int c = 0; c < this.columnsCount; ++c)
					{
						int cr = rr;
						int cc = c;
						bool cp = true;
						if (cpInserted)
						{
							if (c >= cpCol && c < cpCol + colsAffected) cp = false;
							if (rr >= cpRow && rr < cpRow + rowsAffected) cp = false;
							if (c >= cpCol + colsAffected) cc -= colsAffected;
							if (rr >= cpRow + rowsAffected) cr -= rowsAffected;
						}
						else
						{
							if (c >= cpCol) cc += colsAffected;
							if (rr >= cpRow) cr += rowsAffected;
						}
						if (cp)
						{
							cells[rr * this.columnsCount + c] = oldData[cr * oldCols + cc];
							oldData[cr * oldCols + cc] = null;
						}
						else
							cells[rr * this.columnsCount + c] = new Cell(this);
					}
				}
			}

			if (oldData != null)
			{
				for (int oc = 0; oc < oldData.Count; ++oc)
				{
					if (oldData[oc] != null)
						oldData[oc].freeResources();
				}
			}

			// copy data from the old rows array to the new one
			if (copyR && (rowsList != null) && (oldRowsDsc != null))
			{
				for (int rr = 0; rr < this.rowsCount; ++rr)
				{
					int cr = rr;
					bool cp = true;
					if (cpInserted)
					{
						if (rr >= cpRow && rr < cpRow + rowsAffected) cp = false;
						if (rr >= cpRow + rowsAffected) cr -= rowsAffected;
					}
					else
					{
						if (rr >= cpRow) cr += rowsAffected;
					}
					if (cp)
						rowsList[rr] = oldRowsDsc[cr];
				}
			}

			// copy data from the old columns array to the new one
			if (copyC && (colsList != null) && (oldColsDsc != null))
			{
				for (int c = 0; c < this.columnsCount; ++c)
				{
					int cc = c;
					bool cp = true;
					if (cpInserted)
					{
						if (c >= cpCol && c < cpCol + colsAffected) cp = false;
						if (c >= cpCol + colsAffected) cc -= colsAffected;
					}
					else
					{
						if (c >= cpCol) cc += colsAffected;
					}
					if (cp)
						colsList[c] = oldColsDsc[cc];
				}
			}

			if (rowsAffected > 0)
			{
				updateLinksIndices();
				updateArrowsPos(cpRow);
			}

			if (copy && rowsAffected != 0)
				checkForHeaderRows();

			if (undo) flowChart.UndoManager.onCompleteRedim();
		}
Esempio n. 34
0
        private CellCollection GetNeighbors(Cell[,] cells, int rowIndex, int columnIndex)
        {
            CellCollection cellCollection = new CellCollection();
            int previousRowIndex = rowIndex - 1;
            int previousColumnIndex = columnIndex - 1;

            int nextRowIndex = rowIndex + 1;
            int nextColumnIndex = columnIndex + 1;

            if (previousRowIndex >= 0)
            {
                if (previousColumnIndex >= 0)
                    cellCollection.Add(cells[previousRowIndex, previousColumnIndex]);

                cellCollection.Add(cells[previousRowIndex, columnIndex]);

                if (nextColumnIndex < this.Size.Width)
                    cellCollection.Add(cells[previousRowIndex, nextColumnIndex]);
            }

            if (nextRowIndex < this.Size.Height)
            {
                if (previousColumnIndex >= 0)
                    cellCollection.Add(cells[nextRowIndex, previousColumnIndex]);

                cellCollection.Add(cells[nextRowIndex, columnIndex]);

                if (nextColumnIndex < this.Size.Width)
                    cellCollection.Add(cells[nextRowIndex, nextColumnIndex]);
            }

            if (previousColumnIndex >= 0)
                cellCollection.Add(cells[rowIndex, previousColumnIndex]);
            if (nextColumnIndex < this.Size.Width)
                cellCollection.Add(cells[rowIndex, nextColumnIndex]);

            return cellCollection;
        }
Esempio n. 35
0
 /// <summary>
 /// Initializes the cells with values.
 /// </summary>
 private void InitializeCellsWithValues()
 {
     Cells = new CellCollection();
     foreach (var column in _owner.Columns)
     {
         var cell = column.CreateCell(this);
         Cells.Add(cell);
     }
 }