コード例 #1
0
        private void AddDateList(int index, ref List <IndexList> listImageIndex)
        {
            IndexList listIndex = new IndexList();

            listIndex.Add(index);
            listImageIndex.Add(listIndex);
        }
コード例 #2
0
        public void IteratorTest()
        {
            var indexList = new IndexList <string>();

            indexList.Add("A");

            var t = new List <string>();

            t.Add("B");
            t.Add("C");
            indexList.AddRange(t);

            var str1 = "";

            foreach (var x in indexList.Entries)
            {
                str1 = str1 + x;
            }

            var str2 = "";

            if (indexList.Any())
            {
                indexList.MoveFirst();
                do
                {
                    str2 = str2 + indexList.Value;
                } while (indexList.MoveNext());
            }

            output.WriteLine("str1:{0} str2:{1}", str1, str2);
            Assert.True(str1 == str2);
        }
コード例 #3
0
        protected GroupComparer CreateGroupHeader(BaseComparer sc)
        {
            GroupComparer gc = new GroupComparer(sc.ColumnCollection, sc.ListIndex, sc.ObjectArray);

            IndexList.Add(gc);
            return(gc);
        }
コード例 #4
0
 private void addIndex(short i1, short i2, short i3)
 {
     IndexList.Add((short)(VertexCount + i1));
     IndexList.Add((short)(VertexCount + i2));
     IndexList.Add((short)(VertexCount + i3));
     VertexCount += 3;
 }
コード例 #5
0
        private void UpdateDateList(int iPosition, int index, ref List <IndexList> listImageIndex)
        {
            IndexList listIndex = new IndexList();

            listIndex = listImageIndex[iPosition];
            listIndex.Add(index);
            listImageIndex[iPosition] = listIndex;
        }
コード例 #6
0
        /// <summary>
        ///     Deserialize the indexes
        /// </summary>
        protected override void DeserializeIndexes()
        {
            IndexList.Clear();

            foreach (var index in Driver.DeserializeIndex <TKey, TIndex1, TIndex2>(typeof(T), Name) ?? new ConcurrentDictionary <TKey, Tuple <TIndex1, TIndex2> >())
            {
                IndexList.Add(new TableIndex <T, TIndex1, TIndex2, TKey>(index.Value.Item1, index.Value.Item2, index.Key, Resolver));
            }
        }
コード例 #7
0
 private void addIndex(short i1, short i2, short i3, short i4, short i5, short i6)
 {
     IndexList.Add((short)(VertexCount + i1));
     IndexList.Add((short)(VertexCount + i2));
     IndexList.Add((short)(VertexCount + i3));
     IndexList.Add((short)(VertexCount + i4));
     IndexList.Add((short)(VertexCount + i5));
     IndexList.Add((short)(VertexCount + i6));
     VertexCount += 4;
 }
コード例 #8
0
        private IndexList UnsortedIndex(SortColumnCollection col)
        {
            IndexList arrayList = new IndexList();

            for (int rowIndex = 0; rowIndex < this.table.Rows.Count; rowIndex++)
            {
                object[] values = new object[1];
                arrayList.Add(new SortComparer(col, rowIndex, values));
            }
            return(arrayList);
        }
コード例 #9
0
        // if we have no sorting, we build the indexlist as well, so we don't need to
        private IndexList IndexBuilder(SortColumnCollection col)
        {
            IndexList arrayList = new IndexList();

            for (int rowIndex = 0; rowIndex < this.baseList.Count; rowIndex++)
            {
                object[] values = new object[1];
                arrayList.Add(new SortComparer(col, rowIndex, values));
            }
            return(arrayList);
        }
コード例 #10
0
        /// <summary>
        ///     Deserialize the indexes
        /// </summary>
        protected override async Task DeserializeIndexesAsync()
        {
            IndexList.Clear();

            var indexes = await Driver.DeserializeIndexAsync <TKey, TIndex1, TIndex2>(typeof(T), Name).ConfigureAwait(false);

            foreach (var index in indexes ?? new Dictionary <TKey, Tuple <TIndex1, TIndex2> >())
            {
                IndexList.Add(new TableIndex <T, TIndex1, TIndex2, TKey>(index.Value.Item1, index.Value.Item2, index.Key, Resolver));
            }
        }
コード例 #11
0
        public void ReadFromFile(string Tray)
        {
            const int indexPlace = 0;
            const int row        = 2;
            const int col        = 3;
            const int xPlace     = 4;
            const int yPlace     = 5;
            const int startLine  = 5;

            try
            {
                string path = "";
                if (Tray == "LoadTray")
                {
                    path = filePathTXT + AppGen.Inst.OrderParams.ServiceLoadTrayName;
                }
                else
                {
                    path = filePathTXT + AppGen.Inst.OrderParams.ServiceUnloadTrayName;
                }

                if (!System.IO.File.Exists(path))
                {
                    System.Windows.Forms.MessageBox.Show("TRAY File not found");
                    return;
                }

                string[] lines = System.IO.File.ReadAllLines(path);
                InsertCountAtServiceRow = 0;
                for (int ii = startLine; ii < lines.Length; ii++)
                {
                    string   line  = lines[ii];
                    string[] parts = line.Split(("").ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                    if (parts.Length == 0)
                    {
                        continue;
                    }

                    TrayIndexData trayIndexData = new TrayIndexData();
                    trayIndexData.Index      = int.Parse(parts[indexPlace]);
                    trayIndexData.RowNum     = int.Parse(parts[row]);
                    trayIndexData.CollumnNum = int.Parse(parts[col]);
                    trayIndexData.X_file     = double.Parse(parts[xPlace]);
                    trayIndexData.Y_file     = double.Parse(parts[yPlace]);
                    IndexList.Add(trayIndexData);
                    if (trayIndexData.CollumnNum > InsertCountAtServiceRow)
                    {
                        InsertCountAtServiceRow = trayIndexData.CollumnNum;
                    }
                }
            }
            catch { }
        }
コード例 #12
0
        private void UpdateIndexList()
        {
            IndexList.Clear();

            if (TotalIndex <= 7)
            {
                for (var i = 1; i <= TotalIndex; i++)
                {
                    IndexList.Add(i);
                }
            }
            else
            {
                IndexList.Add(1);
                IndexList.Add(2);


                if (CurrentIndex == 1 || CurrentIndex == 2 || CurrentIndex == 3 || CurrentIndex == 4)
                {
                    IndexList.Add(3);
                    IndexList.Add(4);
                    IndexList.Add(5);
                }

                IndexList.Add(null);

                if (CurrentIndex >= TotalIndex - 3)
                {
                    IndexList.Add(null);

                    for (var i = TotalIndex - 4; i <= TotalIndex; i++)
                    {
                        IndexList.Add(i);
                    }
                    return;
                }
                if (CurrentIndex != 1 && CurrentIndex != 2 && CurrentIndex != 3 && CurrentIndex != 4)
                {
                    for (var i = CurrentIndex - 1; i <= (CurrentIndex + 1); i++)
                    {
                        IndexList.Add(i);
                    }
                }
                IndexList.Add(null);
                for (var i = TotalIndex - 1; i <= TotalIndex; i++)
                {
                    IndexList.Add(i);
                }
            }
        }
コード例 #13
0
ファイル: Object.cs プロジェクト: JamieO53/xpangen.old
        public Index AddIndex(string name, string isPrimaryKey = "", string isUnique = "", string isClusterKey = "")
        {
            var item = new Index(GenDataBase)
            {
                GenObject    = ((GenObject)GenObject).CreateGenObject("Index"),
                Name         = name,
                IsPrimaryKey = isPrimaryKey,
                IsUnique     = isUnique,
                IsClusterKey = isClusterKey
            };

            IndexList.Add(item);
            return(item);
        }
コード例 #14
0
        private void Initialize()
        {
            IndexList.Clear();
            ItemsCount = 0;
            InnerCollection.Clear();

            foreach (var item in Source)
            {
                var isTarget = Filter(item);
                IndexList.Add(isTarget ? (int?)ItemsCount : null);
                if (isTarget)
                {
                    ItemsCount++;
                    InnerCollection.Add(item);
                }
            }
        }
コード例 #15
0
        private IndexList BuildSortIndex(SortColumnCollection col)
        {
            IndexList arrayList = new IndexList();

            PropertyDescriptor[] sortProperties = BuildSortProperties(col);
            for (int rowIndex = 0; rowIndex < this.baseList.Count; rowIndex++)
            {
                object   rowItem = this.baseList[rowIndex];
                object[] values  = new object[col.Count];

                // Hier bereits Wertabruf um dies nicht während des Sortierens tun zu müssen.
                for (int criteriaIndex = 0; criteriaIndex < sortProperties.Length; criteriaIndex++)
                {
                    object value = sortProperties[criteriaIndex].GetValue(rowItem);
                    // Hier auf Verträglichkeit testen um Vergleiche bei Sortierung zu vereinfachen.
                    // Muss IComparable und gleicher Typ sein.

                    if (value != null && value != DBNull.Value)
                    {
                        if (!(value is IComparable))
                        {
                            throw new InvalidOperationException("ReportDataSource:BuildSortArray - > This type doesn't support IComparable." + value.ToString());
                        }

                        values[criteriaIndex] = value;
                    }
                }
                arrayList.Add(new SortComparer(col, rowIndex, values));
            }

            if (arrayList[0].ObjectArray.GetLength(0) == 1)
            {
                List <BaseComparer> lbc = BaseListStrategy.GenericSorter(arrayList);
                arrayList.Clear();
                arrayList.AddRange(lbc);
            }
            else
            {
                arrayList.Sort();
            }
            return(arrayList);
        }
コード例 #16
0
        private IndexList  BuildSortIndex(ColumnCollection col)
        {
            IndexList arrayList = new IndexList();

            for (int rowIndex = 0; rowIndex < this.table.Rows.Count; rowIndex++)
            {
                DataRow  rowItem = this.table.Rows[rowIndex];
                object[] values  = new object[col.Count];
                for (int criteriaIndex = 0; criteriaIndex < col.Count; criteriaIndex++)
                {
                    object value = ExtractColumnValue(rowItem, col, criteriaIndex);

                    if (value != null && value != DBNull.Value)
                    {
                        values[criteriaIndex] = value;
                    }
                    else
                    {
                        values[criteriaIndex] = DBNull.Value;
                    }
                }

                arrayList.Add(new SortComparer(col, rowIndex, values));
            }

            if (arrayList[0].ObjectArray.GetLength(0) == 1)
            {
                List <BaseComparer> lbc = BaseListStrategy.GenericSorter(arrayList);
                arrayList.Clear();
                arrayList.AddRange(lbc);
            }
            else
            {
                arrayList.Sort();
            }
            return(arrayList);
        }
コード例 #17
0
		private  IndexList BuildSortIndex(SortColumnCollection col) 
		{
			IndexList arrayList = new IndexList();
			PropertyDescriptor[] sortProperties = BuildSortProperties (col);
			for (int rowIndex = 0; rowIndex < this.baseList.Count; rowIndex++){
				object rowItem = this.baseList[rowIndex];
				object[] values = new object[col.Count];
				
				// Hier bereits Wertabruf um dies nicht während des Sortierens tun zu müssen.
				for (int criteriaIndex = 0; criteriaIndex < sortProperties.Length; criteriaIndex++){
					object value = sortProperties[criteriaIndex].GetValue(rowItem);
					// Hier auf Verträglichkeit testen um Vergleiche bei Sortierung zu vereinfachen.
					// Muss IComparable und gleicher Typ sein.
					
					if (value != null && value != DBNull.Value)
					{
						if (!(value is IComparable)){
							throw new InvalidOperationException("ReportDataSource:BuildSortArray - > This type doesn't support IComparable." + value.ToString());
						}
						
						values[criteriaIndex] = value;
					}
				}
				arrayList.Add(new SortComparer(col, rowIndex, values));
			}
			
			if (arrayList[0].ObjectArray.GetLength(0) == 1) {
				List<BaseComparer> lbc = BaseListStrategy.GenericSorter (arrayList);
				arrayList.Clear();
				arrayList.AddRange(lbc);
			}
			else {
				arrayList.Sort();
			}
			return arrayList;
		}
コード例 #18
0
		// if we have no sorting, we build the indexlist as well, so we don't need to
		private IndexList IndexBuilder(SortColumnCollection col)
		{
			IndexList arrayList = new IndexList();
			for (int rowIndex = 0; rowIndex < this.baseList.Count; rowIndex++){
				object[] values = new object[1];
				arrayList.Add(new SortComparer(col, rowIndex, values));
			}
			return arrayList;
		}
コード例 #19
0
		private IndexList  BuildSortIndex(ColumnCollection col)
		{
			IndexList arrayList = new IndexList();
			
			for (int rowIndex = 0; rowIndex < this.table.Rows.Count; rowIndex++){
				DataRow rowItem = this.table.Rows[rowIndex];
				object[] values = new object[col.Count];
				for (int criteriaIndex = 0; criteriaIndex < col.Count; criteriaIndex++)
				{
					object value = ExtractColumnValue(rowItem,col,criteriaIndex);
					
					if (value != null && value != DBNull.Value)
					{
						values[criteriaIndex] = value;
					}   else {
						values[criteriaIndex] = DBNull.Value;
					}
				}
				
				arrayList.Add(new SortComparer(col, rowIndex, values));
			}
			
			if (arrayList[0].ObjectArray.GetLength(0) == 1) {
				List<BaseComparer> lbc = BaseListStrategy.GenericSorter (arrayList);
				arrayList.Clear();
				arrayList.AddRange(lbc);
			}
			else {
				arrayList.Sort();
			}
			return arrayList;
		}
コード例 #20
0
		protected static void CreateGroupedChildren(IndexList list,BaseComparer sc)
		{
			list.Add(sc);
		}
コード例 #21
0
		private IndexList BuildGroup (IndexList source,GroupColumnCollection groups)
		{
			string compareValue = String.Empty;
			var idlist = new IndexList();

			PropertyDescriptor[] groupProperties = BuildSortProperties (groups);

			GroupComparer groupComparer = null;
			
			foreach (BaseComparer element in source) {
				var groupValue = ExtractValue(element,groupProperties);
//				var query2 =  idlist.FirstOrDefault( s => ((GroupComparer)s).ObjectArray[0] == groupValue) as GroupComparer;
//				if (query2 == null) {
//					groupComparer = CreateGroupHeader(element);
//					idlist.Add(groupComparer);
//				} else {
//					Console.WriteLine("xx");
//				}
				if (compareValue != groupValue) {
					groupComparer = CreateGroupHeader(element);
					idlist.Add(groupComparer);
				}
				groupComparer.IndexList.Add(element);
				
				compareValue = groupValue;
			}
			ShowGrouping(ref idlist);
			return idlist;
		}
コード例 #22
0
		IndexList BuildIndexInternal(Collection<AbstractColumn> sortColumnsCollection)
		{
			var indexList = new IndexList();
			PropertyDescriptor[] sortProperties = BuildSortProperties(sortColumnsCollection);
			for (int rowIndex = 0; rowIndex < this.baseList.Count; rowIndex++) {
				var rowItem = this.baseList[rowIndex];
				var values = FillComparer(sortProperties, rowItem);
				indexList.Add(new SortComparer(sortColumnsCollection, rowIndex, values));
			}
			return indexList;
		}
コード例 #23
0
        public void ReadFromFile()
        {
            const int Cir       = 1;
            const int Pos       = 2;
            const int xPlace    = 3;
            const int yPlace    = 4;
            const int Angle     = 5;
            const int startLine = 6;

            try
            {
                string path = filePath + AppGen.Inst.OrderParams.CarrierName;
                if (!System.IO.File.Exists(path))
                {
                    System.Windows.Forms.MessageBox.Show("CARRIER File not found");
                    return;
                }

                string[] lines = System.IO.File.ReadAllLines(path);
                IndexList.Clear();
                CarrierIndex carrierIndex;

                for (int ii = startLine; ii < lines.Length; ii++)
                {
                    string line = lines[ii];
                    if (line == "")
                    {
                        break;
                    }                         //end of carrier
                    string[] parts = line.Split(("").ToCharArray(), StringSplitOptions.RemoveEmptyEntries);
                    if (parts.Length == 0)
                    {
                        continue;
                    }

                    carrierIndex              = new CarrierIndex();
                    carrierIndex.Master.X     = double.Parse(parts[xPlace]);
                    carrierIndex.Master.Y     = double.Parse(parts[yPlace]);
                    carrierIndex.Master.Cir   = int.Parse(parts[Cir]);
                    carrierIndex.Master.Pos   = int.Parse(parts[Pos]);
                    carrierIndex.Master.Angle = double.Parse(parts[Angle]);

                    IndexList.Add(carrierIndex);

                    if (LastCircleNo < carrierIndex.Master.Cir)
                    {
                        //start Old
                        // CircleRadius[carrierIndex.Master.Cir] = carrierIndex.Master.X;    //first index in circle is the radius (x=radius, y=0)
                        //end old
                        //start New
                        CircleRadius[carrierIndex.Master.Cir] = Math.Sqrt(Math.Pow(carrierIndex.Master.X, 2) + Math.Pow(carrierIndex.Master.Y, 2));    //first index in circle is the radius of srqt of Y and Y <<new>>
                        //end New
                    }
                    LastCircleNo = carrierIndex.Master.Cir;
                    NoOfCircles  = carrierIndex.Master.Cir;
                    NoOfInsAtCircle[carrierIndex.Master.Cir] += 1;    //how many inserts in each cycle


                    //if (ii == startLine)           //first index is the radius (x=radius, y=0)
                    //{
                    //    CircleRadius[1] = carrierIndex.Master.X;
                    //}
                    // CircleRadius[1] = Math.Max(1,2);
                    //if (CurrCycle < carrierIndex.Master.Cir)
                    //{
                    //    CircleRadius[CurrCycle] = carrierIndex.Master.X;
                    //}
                    //CurrCycle = carrierIndex.Master.Cir;
                    //NoOfCircles = Math.Max(NoOfCircles, carrierIndex.Master.Cir);

                    //////////////////////////////////
                    //tbd: read from file!!!:
                    //NoOfInsAtCircle[1] = 15;      //how many inserts in first cycle
                    //NoOfInsAtCircle[2] = 8;       //how many inserts in second cycle

                    //NoOfCircles = 2;              //No of circles

                    //CircleRadius[1] = 86.9;       //radius of first cycle
                    //CircleRadius[2] = 50.1;       //radius of second cycle
                    //////////////////////////////////
                }
            }
            catch { }
        }
コード例 #24
0
ファイル: TableStrategy.cs プロジェクト: nylen/SharpDevelop
		private IndexList UnsortedIndex(SortColumnCollection col)
		{
			IndexList arrayList = new IndexList();
			for (int rowIndex = 0; rowIndex < this.table.Rows.Count; rowIndex++){
				object[] values = new object[1];
				arrayList.Add(new SortComparer(col, rowIndex, values));
			}
			return arrayList;
		}
コード例 #25
0
 protected static void CreateGroupedChildren(IndexList list, BaseComparer sc)
 {
     list.Add(sc);
 }
コード例 #26
0
        public void RefreshZn()
        {
            Fjcclist.Clear();
            IndexList.Clear();
            for (int i = 0; i < Sbhlist.Length; i++)
            {
                FJCClist    list    = new FJCClist();
                MES_PD_SCRW pd_scrw = new MES_PD_SCRW();
                pd_scrw.SBBH = Sbhlist[i].SBBH;
                pd_scrw.GC   = getGC("value");
                //pd_scrw.GZZXBH = getUserInfo("gzzxvalue");
                pd_scrw.ZPRQ = Convert.ToDateTime(ServicModel.PUBLIC_FUNC.GET_TIME(getToken())).AddHours(-4).ToString("yyyy-MM-dd");
                SELECT_MES_PD_SCRW Smodel = ServicModel.PD_SCRW.SELECT(pd_scrw, getToken());
                if (Smodel.MES_RETURN.TYPE.Equals("S"))
                {
                    list.RwArr = Smodel;
                }
                else
                {
                    list.RwArr = new SELECT_MES_PD_SCRW();
                }
                list.SbStruct = Sbhlist[i];
                Fjcclist.Add(list);
            }
            for (int i = 0; i < Fjcclist.Count; i++)
            {
                if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST == null)
                {
                    IndexList.Add(-2);
                    continue;
                }
                else
                {
                    if (Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Length == Fjcclist[i].RwArr.MES_PD_SCRW_LIST.Count(p => p.ISACTION == 2))
                    {
                        IndexList.Add(-1);
                        continue;
                    }
                    ;
                    int action1Index = Fjcclist[i].RwArr.MES_PD_SCRW_LIST.ToList().FindIndex(p => p.ISACTION == 1);
                    if (action1Index >= 0)
                    {
                        IndexList.Add(action1Index);
                        continue;
                    }
                    int action0Index = Fjcclist[i].RwArr.MES_PD_SCRW_LIST.ToList().FindIndex(p => p.ISACTION == 0);
                    if (action0Index >= 0)
                    {
                        IndexList.Add(action0Index);
                        continue;
                    }
                }
            }
            int panelCount = 0;

            foreach (Control p1 in totalpanel.Controls)
            {
                if (p1 is Panel)
                {
                    foreach (Control item in p1.Controls)
                    {
                        if (Fjcclist[panelCount].RwArr.MES_PD_SCRW_LIST == null)
                        {
                            p1.BackColor = Color.FromArgb(252, 228, 214);
                            if (Convert.ToInt32(item.Tag) == 1 + panelCount * 100)
                            {
                                //item.Visible = false;
                                item.Visible = true;
                            }
                            else if (Convert.ToInt32(item.Tag) == 2 + panelCount * 100)
                            {
                                item.Visible = false;
                            }
                            else if (Convert.ToInt32(item.Tag) == 3 + panelCount * 100)
                            {
                                item.Visible = false;
                            }
                            else if (Convert.ToInt32(item.Tag) == 4 + panelCount * 100)
                            {
                                item.Visible = false;
                            }
                            else if (Convert.ToInt32(item.Tag) == 5 + panelCount * 100)
                            {
                                item.Visible = false;
                            }
                            else if (Convert.ToInt32(item.Tag) == 6 + panelCount * 100)
                            {
                                item.Visible = false;
                            }
                            else if (Convert.ToInt32(item.Tag) == 7 + panelCount * 100)
                            {
                                item.Visible = false;
                            }
                            else if (Convert.ToInt32(item.Tag) == 8 + panelCount * 100)
                            {
                                item.Visible = true;
                            }
                            else if (Convert.ToInt32(item.Tag) == 9 + panelCount * 100)
                            {
                                item.Visible = false;
                            }
                            else if (Convert.ToInt32(item.Tag) == 10 + panelCount * 100)
                            {
                                item.Visible = false;
                            }
                            else if (Convert.ToInt32(item.Tag) == 11 + panelCount * 100)
                            {
                                item.Visible = false;
                            }

                            break;
                        }
                        else
                        {
                            if (Fjcclist[panelCount].RwArr.MES_PD_SCRW_LIST.Length == Fjcclist[panelCount].RwArr.MES_PD_SCRW_LIST.Count(p => p.ISACTION == 2))
                            {
                                p1.BackColor = Color.FromArgb(252, 228, 214);
                                if (Convert.ToInt32(item.Tag) == 1 + panelCount * 100)
                                {
                                    item.Visible = true;
                                }
                                else if (Convert.ToInt32(item.Tag) == 2 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 3 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 4 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 5 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 6 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 7 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 8 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 9 + panelCount * 100)
                                {
                                    item.Visible = true;
                                }
                                else if (Convert.ToInt32(item.Tag) == 10 + panelCount * 100)
                                {
                                    item.Visible = true;
                                }
                                else if (Convert.ToInt32(item.Tag) == 11 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }

                                continue;
                            }
                            ;
                            int action1Index = Fjcclist[panelCount].RwArr.MES_PD_SCRW_LIST.ToList().FindIndex(p => p.ISACTION == 1);
                            if (action1Index >= 0)
                            {
                                p1.BackColor = Color.FromArgb(146, 208, 80);
                                MES_PD_SCRW_LIST[] data = Fjcclist[panelCount].RwArr.MES_PD_SCRW_LIST;
                                if (Convert.ToInt32(item.Tag) == 1 + panelCount * 100)
                                {
                                    item.Visible = true;
                                }
                                else if (Convert.ToInt32(item.Tag) == 2 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titleth) + data[action1Index].TH.ToString();//"桶号:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 3 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titlepf) + data[action1Index].PFDH;//"配方:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 4 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titlepldh) + data[action1Index].PLDH;//"配料单号:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 5 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titlexfcd) + data[action1Index].XFCDNAME;//"锌粉产地:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 6 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titlexfcd) + data[action1Index].XFPC;//"锌粉批号:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 7 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible   = true;
                                    lb.Text      = q(Msg_Type.titlezt) + q(Msg_Type.fieldytl);//"状态:已投料";
                                    lb.ForeColor = Color.Black;
                                }
                                else if (Convert.ToInt32(item.Tag) == 8 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 9 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 10 + panelCount * 100)
                                {
                                    Button btn = (Button)item;
                                    btn.Enabled = true;
                                    btn.Visible = true;
                                }
                                else if (Convert.ToInt32(item.Tag) == 11 + panelCount * 100)
                                {
                                    Button btn = (Button)item;
                                    btn.Enabled = true;
                                    btn.Visible = true;
                                }
                                continue;
                            }
                            int action0Index = Fjcclist[panelCount].RwArr.MES_PD_SCRW_LIST.ToList().FindIndex(p => p.ISACTION == 0);
                            if (action0Index >= 0)
                            {
                                p1.BackColor = Color.FromArgb(252, 228, 214);
                                MES_PD_SCRW_LIST[] data = Fjcclist[panelCount].RwArr.MES_PD_SCRW_LIST;

                                if (Convert.ToInt32(item.Tag) == 1 + panelCount * 100)
                                {
                                    item.Visible = true;
                                }
                                else if (Convert.ToInt32(item.Tag) == 2 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titleth) + data[action0Index].TH.ToString();//"桶号:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 3 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titlepf) + data[action0Index].PFDH;//"配方:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 4 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titlepldh) + data[action0Index].PLDH;//"配料单号:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 5 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titlexfcd) + data[action0Index].XFCDNAME;//"锌粉产地:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 6 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible = true;
                                    lb.Text    = q(Msg_Type.titlexfph) + data[action0Index].XFPC;//"锌粉批号:"
                                }
                                else if (Convert.ToInt32(item.Tag) == 7 + panelCount * 100)
                                {
                                    Label lb = (Label)item;
                                    lb.Visible   = true;
                                    lb.Text      = q(Msg_Type.titlezt) + q(Msg_Type.fieldnotl);//"状态:未投料";
                                    lb.ForeColor = Color.Red;
                                }
                                else if (Convert.ToInt32(item.Tag) == 8 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 9 + panelCount * 100)
                                {
                                    item.Visible = false;
                                }
                                else if (Convert.ToInt32(item.Tag) == 10 + panelCount * 100)
                                {
                                    item.Visible = true;
                                }
                                else if (Convert.ToInt32(item.Tag) == 11 + panelCount * 100)
                                {
                                    Button btn = (Button)item;
                                    btn.Visible = true;
                                    btn.Enabled = false;
                                }
                                continue;
                            }
                        }
                    }

                    panelCount++;
                }
            }
        }