當前位置: 首頁>>代碼示例>>C#>>正文


C# Brand類代碼示例

本文整理匯總了C#中Brand的典型用法代碼示例。如果您正苦於以下問題:C# Brand類的具體用法?C# Brand怎麽用?C# Brand使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Brand類屬於命名空間,在下文中一共展示了Brand類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SetUpData

        private void SetUpData()
        {
            Domain.Dependencies.Register();

            //Repository registration
            DIContainer.Instance.RegisterType<IRepository, OnlineRepository>(OnlineRepository.InstanceName);
            DIContainer.Instance.RegisterType<ReferenceDataRepository>(new ContainerControlledLifetimeManager());
            DIContainer.Instance.RegisterType<IComponentSettingsClient, ComponentSettingsClientTest>();

            var workStation = DIContainer.Instance.Resolve<Workstation>();
            workStation.ConfigurationServiceBaseAddress = "http://Localhost/";
            workStation.Ship = new Ship { ShipId = "1", BrandId = "3", Code = "3" };
            workStation.ConnectionMode = ConnectionMode.Online;
            var intCollection = new Collection<int>();
            intCollection.Add(1);
            intCollection.Add(2);
            intCollection.Add(3);
            var brand = new Brand { BrandId = "3", Name = "Carnival Breeze", MediaItemAddress = "http://172.26.248.122/ImagingMediaService/MediaItems/23" };
            brand.AssignPortIds(intCollection);
            workStation.Brand = brand;
            workStation.Voyage = new Voyage { IsActive = true, VoyageId = "31", Number = "dd0", ShipId = "1" };
            var voyages = new List<Voyage>();
            voyages.Add(new Voyage { IsActive = true, VoyageId = "31", Number = "dd0", ShipId = "1" });
            workStation.AssignVoyageList(voyages);

            this.targetRepository = new ConfigurationServiceRepository();
        }
開發者ID:JaipurAnkita,項目名稱:mastercode,代碼行數:27,代碼來源:ConfigurationServiceRepositoryTest.cs

示例2: addimage

        protected override void addimage(location state, Brand brand, RotateFlipType rotate)
        {
            Bitmap bitmap;
            // �p�G�O�i�����P�N�]�w��ܵP���ϫ��A�_�h�N��ܪ��ߪ��P Resources.upbarnd
            if (brand.IsCanSee || state == location.South || ShowAll)
                bitmap = new Bitmap(brand.image);
            else
                bitmap = new Bitmap(Resources.upbarnd);
            // �]�w�P
            BrandBox tempBrandbox = new BrandBox(brand);

            // �]�w�۰��Y��
            tempBrandbox.SizeMode = PictureBoxSizeMode.AutoSize;

            // �]�w��Z
            tempBrandbox.Margin = new Padding(0);
            tempBrandbox.Padding = new Padding(padding);

            // �n�઺����
            bitmap.RotateFlip(rotate);

            // ����
            if (ShowAll && ShowBrandInfo)
                tempBrandbox.Click += new EventHandler(debug_Click);

            // �ƹ��ƥ�
            if (
                state == location.South
                && brand.getClass() != Settings.Default.Flower
                && brand.Team < 1
                )
            {
                tempBrandbox.MouseMove += new MouseEventHandler(tempBrandbox_MouseMove);
                tempBrandbox.MouseLeave += new EventHandler(brandBox_MouseLeave);
                tempBrandbox.Click += new EventHandler(brandBox_MouseClick);

                // �@���ƥ�
                //if (ShowAll && ShowBrandInfo)
                //    tempBrandbox.MouseHover += new EventHandler(debug_Click);
                //else
                //    tempBrandbox.MouseHover -= new EventHandler(debug_Click);
            }
            else if (cheat && state != location.South)
            {
                tempBrandbox.MouseClick += new MouseEventHandler(cheat_MouseClick);
            }
            else
            {
                tempBrandbox.Click -= new EventHandler(brandBox_MouseClick);
                tempBrandbox.MouseClick -= new MouseEventHandler(cheat_MouseClick);

            }
            bitmap = ResizeBitmap(bitmap, Settings.Default.ResizePercentage);

            // �]�w�Ϥ�
            tempBrandbox.Image = bitmap;

            // �s�W�ܱ��
            add_flowLayoutBrands(state, tempBrandbox);
        }
開發者ID:billteng,項目名稱:mahjong,代碼行數:60,代碼來源:NewTable.cs

示例3: chackBrandNumber

 private bool chackBrandNumber(Brand b1,Brand b2)
 {
     if (b1.getNumber() == b2.getNumber())
         return true;
     else
         return false;
 }
開發者ID:billteng,項目名稱:mahjong,代碼行數:7,代碼來源:BrandsTest.cs

示例4: status

 public void status()
 {
     Brand objbrand = new Brand();
     string type = Request.QueryString["dl"];
     string brandid = Request.QueryString["id"];
     objbrand.UpdatebyID(int.Parse(brandid), int.Parse(type));
 }
開發者ID:ziad007,項目名稱:URI3,代碼行數:7,代碼來源:Brandlisting.aspx.cs

示例5: SalvarBrand

        public ActionResult SalvarBrand(Brand brand)
        {
            ViewBag.Message = "Marcas de Coche";
            SaveEntity(brand);

            return base.View("Nuevo", brand);
        }
開發者ID:rfrancis1976,項目名稱:MOTORLAM,代碼行數:7,代碼來源:BrandController.cs

示例6: getBrands

        public static List<Brand> getBrands()
        {
            try
            {
                SQLHelper dbhelper = new SQLHelper();

                List<MySqlParameter> lstParameter = new List<MySqlParameter>();

                var resultSet = dbhelper.executeSP<DataSet>(lstParameter, "SelectAllBrand");

                List<Brand> brands = new List<Brand>();
                foreach (DataRow drow in resultSet.Tables[0].Rows)
                {
                    Brand brand = new Brand();
                    brand.BrandID = Convert.ToInt32(drow["brandId"].ToString());
                    brand.Brandname = drow["brandname"].ToString();
                    brand.Description = drow["description"].ToString();

                    brands.Add(brand);
                }

                return brands;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
開發者ID:niyomja,項目名稱:laksi-tractor,代碼行數:28,代碼來源:BrandDAL.cs

示例7: Create

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="brandEditVM"></param>
        /// <returns></returns>
        public ErrorCode Create(BrandEditVM brandEditVM)
        {
            try
            {
                if (BrandDal.GetExisted(o => o.CommodityTypeId == brandEditVM.CommodityTypeId && o.Name == brandEditVM.Name))
                {
                    return ErrorCode.BrandExisted;
                }

                var brand = new Brand
                {
                    Name = brandEditVM.Name,
                    CommodityTypeId = brandEditVM.CommodityTypeId,
                    Description = brandEditVM.Description,
                    CommodityId = brandEditVM.CommodityId
                };

                BrandDal.Create(brand);
                return ErrorCode.NoError;
            }
            catch (Exception)
            {
                return ErrorCode.ServerError;
            }
        }
開發者ID:jesusblessf6,項目名稱:Maike,代碼行數:30,代碼來源:BrandService.cs

示例8: InsertManufacturer

 public void InsertManufacturer()
 {
     var manufacturer = new Manufacturer();
     manufacturer.Name = "Manufacturer1";
     ManufacturerDAO.Instance.Save(manufacturer);
     var brand = new Brand {Name = "Brand1", Manufacturer = manufacturer};
     BrandDAO.Instance.Save(brand);
 }
開發者ID:vincentzh,項目名稱:nhibernate-burrow-with-dapper,代碼行數:8,代碼來源:DapperTest.cs

示例9: chackBrandClass

 private bool chackBrandClass(Brand b1, Brand b2)
 {
     if (b1.getClass() == b2.getClass())
         return true;
     else
     {
         return false;
     }
 }
開發者ID:billteng,項目名稱:mahjong,代碼行數:9,代碼來源:BrandsTest.cs

示例10: Edit

 public ActionResult Edit(Brand brand)
 {
     if (ModelState.IsValid)
     {
         _daoFactory.BrandDao().SaveOrUpdate(brand);
         return Redirect("index");
     }
     return View(brand);
 }
開發者ID:luqizheng,項目名稱:OrnamentFramework,代碼行數:9,代碼來源:BrandController.cs

示例11: CheckBrands

 /// <summary>
 /// �P�����A�ˬd �Y �I �b �J
 /// </summary>
 /// <param name="otherbrand">�i�Ӫ��P</param>
 /// <param name="player">���ߪ����a�զX</param>
 public CheckBrands(Brand otherbrand, BrandPlayer player)
 {
     for (int i = 0; i < player.getCount(); i++)
         if (player.getBrand(i).getClass() != Mahjong.Properties.Settings.Default.Flower)
             x.add(player.getBrand(i));
     brand = otherbrand;
     for (int i = 0; i < chow_player.Length; i++)
         chow_player[i] = new BrandPlayer();
 }
開發者ID:billteng,項目名稱:mahjong,代碼行數:14,代碼來源:CheckBrands.cs

示例12: UpdateBrand

 public Brand UpdateBrand(Brand updatedBrand)
 {
     var brandToUpdate = _brandRepository.FindOne(b => b.Id == updatedBrand.Id);
     SetOwner(brandToUpdate, updatedBrand.CompanyId);
     brandToUpdate.BrandName = updatedBrand.BrandName;
     brandToUpdate.LastUpdated = DateTime.Now;
     _brandRepository.Persist();
     Log.Debug("Brand {0} with Id {1} updated", brandToUpdate.BrandName, brandToUpdate.Id);
     return brandToUpdate;
 }
開發者ID:consumentor,項目名稱:Server,代碼行數:10,代碼來源:BrandApplicationService.cs

示例13: CheckUser

 public CheckUser(bool chow,bool pong,bool kong,bool darkkong,bool win,bool pass,Brand brand)
 {
     Chow = chow;
     Pong = pong;
     Kong = kong;
     DarkKong = darkkong;
     Win = win;
     Pass = pass;
     Brand = brand;
 }
開發者ID:Superbil,項目名稱:mahjong,代碼行數:10,代碼來源:CheckUser.cs

示例14: listingtblbody

    public void listingtblbody()
    {
        Brand objbrand = new Brand();
        string page = Request.QueryString["Page"];
        if (page == null) page = "1";
        int HOWMANYPAGES = 0;
        List<Brand> objbrandlisting = objbrand.getBrandall(true,9 ,page.ToString(), "20", out  HOWMANYPAGES);

        Table tblbrand = new Table();

        tblbrand.Width = Unit.Percentage(100);
        tblbrand.CellPadding = 0;
        tblbrand.CellSpacing = 0;
        tblbrand.BorderWidth = 0;
        TableRow tblrow = new TableRow();
        TableCell tblcell = new TableCell();
        int sum = 0;
        for (int i = 0; i < objbrandlisting.Count; i++)
        {
            tblrow.HorizontalAlign = HorizontalAlign.Center;
            tblcell = new TableCell();
            tblcell.Style.Add("background", "white");
            string Brandid = objbrandlisting[i].BrandID;
            string logo = objbrandlisting[i].Logo;
            Image imag = new Image();
            imag.Width = 190;
            imag.Height = 190;
            imag.ImageUrl = "~/images/" + objbrandlisting[i].Logo;
            imag.Attributes.Add("onclick", "javascript:window.open('Branddetail.aspx?id=" + Brandid + "');");
            tblcell.Controls.Add(imag);
            tblrow.Cells.Add(tblcell);

            sum = sum + 1;
            if (sum == 5)
            {
                tblbrand.Controls.Add(tblrow);
                tblrow = new TableRow();
                sum = 0;
            }

            else
            {
                tblbrand.Controls.Add(tblrow);
            }
        }

        phbrand.Controls.Add(tblbrand);

        string firstPageUrl = "http://localhost/fuck/Brand/Brandlisting.aspx?";

        //SHARIF Page={0} shoule be like this
        string pagerFormat = "http://localhost/fuck/Brand/Brandlisting.aspx?Page={0}";

        bottomPager.Show(int.Parse(page), HOWMANYPAGES, firstPageUrl, pagerFormat, true);
    }
開發者ID:ziad007,項目名稱:URI3,代碼行數:55,代碼來源:Brandlisting.aspx.cs

示例15: getReadyBrand

 /// <summary>
 /// ��P
 /// </summary>
 /// <returns></returns>
 public Brand getReadyBrand()
 {
     ans = player.getBrand(0);
     for (int i = 1; i < player.getCount(); i++)
     {
         if (player.getBrand(i).Source < ans.Source && player.getBrand(i).getClass() != Mahjong.Properties.Settings.Default.Flower)
             ans = player.getBrand(i);
     }
     //print();
     return ans;
 }
開發者ID:billteng,項目名稱:mahjong,代碼行數:15,代碼來源:Level+1.cs


注:本文中的Brand類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。