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


C# Text.Update方法代碼示例

本文整理匯總了C#中Text.Update方法的典型用法代碼示例。如果您正苦於以下問題:C# Text.Update方法的具體用法?C# Text.Update怎麽用?C# Text.Update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Text的用法示例。


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

示例1: Control

 public Control(Game game, string text)
 {
     this.game = game;
     textTexture = new Text(game.ClientSize, new Size(0, 0), new Point(0, 0));
     textTexture.Update(text);
     this.text = text;
 }
開發者ID:Zhangerr,項目名稱:pulse,代碼行數:7,代碼來源:Control.cs

示例2: SelectComponent

 public SelectComponent(Game game, Rectangle bounds, string text, string line2)
     : base(game, bounds, text)
 {
     line = line2;
     lineTwo = new Text(Config.ClientSize, new Size(bounds.Width, bounds.Height), new Point(bounds.X, bounds.Y));
     lineTwo.Update(line);
     OnLoad(null);
     baseX = bounds.X;
 }
開發者ID:Zhangerr,項目名稱:pulse,代碼行數:9,代碼來源:SelectComponent.cs

示例3: UserDisplay

 public UserDisplay(User u, Point location)
 {
     this.u = u;
     back.Bounds = new Rectangle(location, new Size(back.Bounds.Width, back.Bounds.Height));
     front.Bounds = new Rectangle(location.X + 2, location.Y + 2, front.Bounds.Width, front.Bounds.Height);
     back.Colour = new Color4(0.6f, 0.6f, 0.6f, 0.9f);
     front.Colour = new Color4(0.6f, 0.6f, 0.6f, 0.8f);
     Thread t = new Thread(new ParameterizedThreadStart(downloadThread));
     wc = new WebClient();
     t.IsBackground = true;
     t.Start(u.Avatar);
     name = new Text(new Size(118, 200), new Point(location.X + 90, location.Y + 2));
     name.Shadow = false;
     name.Update(u.RealName);
     playCount = new Text(new Size(300, 300), new Point(location.X + 90, location.Y + 35));
     playCount.Shadow = false;
     playCount.textFont = new Font("Myriad Pro", 14);
     playCount.Line = ("PC: " + u.Playcount + "\nScore: " + u.TotalScore + "\nLevel: " + u.Level);
     b = new Button(Game.game, new Rectangle(playCount.Location, new Size(100, 30)), "PM", delegate(int e)
     {
         Game.pbox.addTab("pulse|" + u.RealName);
     });
     b2 = new Button(Game.game, new Rectangle(playCount.Location, new Size(100, 30)), "Spec", delegate(int e)
     {
         if (!Config.Spectating)
         {
             if (!u.Name.ToLower().Equals(Account.currentAccount.AccountName.ToLower()))
             {
                 Client.PacketWriter.sendSpectateHook(Game.conn.Bw, u.Name);
                 Game.pbox.addLine("Spectating " + u.Name + " (if they are online)");
             }
             else
             {
                 Game.pbox.addLine("You can't spectate yourself");
             }
         }
         else
         {
             if (!Config.SpectatedUser.Equals(""))
             {
                 Game.pbox.addLine("Canceling spectate on " + Config.SpectatedUser);
             }
             Client.PacketWriter.sendSpectateCancel(Game.conn.Bw, Config.SpectatedUser);
             Config.SpectatedUser = "";
             Config.Spectating = false;
         }
     });
     if (u.avatarRect != null)
     {
         avatar = u.avatarRect;
     }
 }
開發者ID:Zhangerr,項目名稱:pulse,代碼行數:52,代碼來源:UserDisplay.cs

示例4: refresh

 private void refresh()
 {
     //todo show some animation during this
     transitioning = true;
     songNameList.Clear();
     SongLibrary.cacheSongInfo(); //prob should make separate method since searching forces cache refresh lol. we are good coders dont worry
     foreach (var pair in SongLibrary.songInfos)
     {
         Text temp = new Text(Config.ClientSize, new Size(550, 35), new Point(0, 0));
         /*SizeF temp1 = temp.getStringSize(pair.Value.Artist + " - " + pair.Value.SongName);
         temp.TextureSize = new Size((int)temp1.Width, (int)temp1.Height);*/
         temp.Update(pair.Value.Artist + " - " + pair.Value.SongName);
         temp.Shadow = true;
         SelectComponent sc = new SelectComponent(game, new Rectangle(-50, 0, 550, 90), pair.Value.Artist, pair.Value.SongName);
         sc.clickEvent += new Action<int, SelectComponent>(sc_clickEvent);
         SongPair sp = new SongPair(sc, pair.Value);
         songNameList.Add(sp);
         sc.index = songNameList.IndexOf(sp);
     }
     songNameList.Sort(new Comparison<SongPair>(delegate(SongPair f, SongPair j)
        {
        return -f.Info.SongName.CompareTo(j.Info.SongName);
        }));
     foreach (SongPair sp in songNameList)
     {
         sp.select.index = songNameList.IndexOf(sp);
     }
 }
開發者ID:Zhangerr,項目名稱:pulse,代碼行數:28,代碼來源:SelectScreen.cs

示例5: CreateOrUpdate

 public void CreateOrUpdate(Text txt)
 {
     if (txt.IsCreated) txt.Update();
     else txt.Create();
 }
開發者ID:BGCX261,項目名稱:zorillacms-svn-to-git,代碼行數:5,代碼來源:TextService.cs


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