예제 #1
0
 public void initializeColorList()
 {
     ColorsList.Add(new CGColor[2] {
         UIColor.FromRGB(45, 189, 212).CGColor, UIColor.FromRGB(187, 210, 198).CGColor
     });
     ColorsList.Add(new CGColor[2] {
         UIColor.FromRGB(224, 50, 115).CGColor, UIColor.FromRGB(251, 147, 66).CGColor
     });
     ColorsList.Add(new CGColor[2] {
         UIColor.FromRGB(37, 191, 44).CGColor, UIColor.FromRGB(216, 204, 121).CGColor
     });
     ColorsList.Add(new CGColor[2] {
         UIColor.FromRGB(137, 25, 178).CGColor, UIColor.FromRGB(237, 168, 152).CGColor
     });
     ColorsList.Add(new CGColor[2] {
         UIColor.FromRGB(32, 98, 229).CGColor, UIColor.FromRGB(30, 197, 206).CGColor
     });
 }
예제 #2
0
        public ColorLinkViewModel()
        {
            if (!DesignerProperties.IsInDesignTool)
            {
                Client.GetAllBrandsCompleted += (s, sv) =>
                {
                    BrandsList = sv.Result;
                };
                Client.GetAllBrandsAsync(LoggedUserInfo.Iserial);

                var seasonClient = new CRUD_ManagerServiceClient();
                seasonClient.GetGenericCompleted += (s, sv) =>
                {
                    SeasonList = sv.Result;
                };
                seasonClient.GetGenericAsync("TblLkpSeason", "%%", "%%", "%%", "Iserial", "ASC");

                Client.GetTblColorCompleted += (s, sv) =>
                {
                    // ColorsList.Clear();
                    //  GenericMapper.InjectFromObCollection(ColorsList, sv.Result);

                    foreach (var row in sv.Result)
                    {
                        ColorsList.Add(new TblColor().InjectFrom(row) as TblColor);
                    }

                    Loading         = false;
                    DetailFullCount = sv.fullCount;
                };
                Client.GetTblColorLinkCompleted += (s, sv) =>
                {
                    foreach (var row in sv.Result)
                    {
                        //if (!MainRowList.Contains(row.TblColor1))
                        //{
                        TblColor col = new TblColor();
                        col.Iserial    = row.TblColor1.Iserial;
                        col.Code       = row.TblColor1.Code;
                        col.Ename      = row.TblColor1.Ename;
                        col.Aname      = row.TblColor1.Aname;
                        col.PantonCode = row.PantonCode;

                        MainRowList.Add(col);
                        // }
                    }
                    Loading   = false;
                    FullCount = sv.fullCount;
                };

                lkpClient.GetTblBrandSectionLinkCompleted += (s, sv) =>
                {
                    if (Copy)
                    {
                        BrandSectionListCopy.Clear();
                        foreach (var row in sv.Result)
                        {
                            BrandSectionListCopy.Add(row.TblLkpBrandSection1);
                        }
                        Copy = false;
                    }
                    else
                    {
                        BrandSectionList.Clear();
                        foreach (var row in sv.Result)
                        {
                            BrandSectionList.Add(row.TblLkpBrandSection1);
                        }
                    }
                    Loading = false;
                };

                Client.UpdateOrDeleteTblColorLinkCompleted += (s, ev) =>
                {
                    if (ev.Error != null)
                    {
                    }
                    else
                    {
                        MainRowList.Clear();
                        GetMaindata();
                    }
                    Loading = false;
                };

                Client.CopyColorLinkCompleted += (s, sv) =>
                {
                    Loading = false;
                };
            }
        }