当前位置: 首页>>代码示例>>C#>>正文


C# Int32.ToString方法代码示例

本文整理汇总了C#中System.Int32.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Int32.ToString方法的具体用法?C# Int32.ToString怎么用?C# Int32.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Int32的用法示例。


在下文中一共展示了Int32.ToString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DbScriptControl

        public DbScriptControl(Event_dataset_script Data, Int32 ID, uint id)
        {
            InitializeComponent();

            this.Name = ID.ToString();
            eventid = ID;
            script_id = id;
            this.eventCheckbox.Text = "Event: " + ID.ToString();

            this.eventCheckbox.Checked = true;

            for (int n = 0; n < Info.ScriptCommands.GetLength(0); n++)
                this.comboBoxAction.Items.Add(Info.ScriptCommands[n, 0]);

            // set width
            comboBoxAction.DropDownWidth = DropDownWidth(comboBoxAction);
            comboBoxAction.DropDownStyle = ComboBoxStyle.DropDownList;

            this.comboBoxAction.SelectedIndex = Data.command;
            this.textBoxDelay.Text = Data.delay.ToString();

            this.textBox_datalong.Text = Data.datalong.ToString();
            this.textBox_datalong2.Text = Data.datalong2.ToString();

            this.textBox_buddy.Text = Data.buddy.ToString();
            this.textBox_radius.Text = Data.radius.ToString();
            this.textBox_flags.Text = Data.dataflags.ToString();

            this.textBox_dataint1.Text = Data.dataint.ToString();
            this.textBox_dataint2.Text = Data.dataint2.ToString();
            this.textBox_dataint3.Text = Data.dataint3.ToString();
            this.textBox_dataint4.Text = Data.dataint4.ToString();

            this.textBox_posX.Text = Data.position_x.ToString();
            this.textBox_posY.Text = Data.position_y.ToString();
            this.textBox_posZ.Text = Data.position_z.ToString();
            this.textBox_orientation.Text = Data.orientation.ToString();

            this.commentTextbox.Text = Data.comment;

            //switch (comboBoxAction.SelectedIndex)
            //{
            //    case 0:     // talk
            //        textBox_dataint1.ReadOnly = false;
            //        textBox_dataint2.ReadOnly = false;
            //        textBox_dataint3.ReadOnly = false;
            //        textBox_dataint4.ReadOnly = false;
            //        break;
            //    case 3:     // move
            //    case 6:     // teleport
            //    case 10:    // summon
            //        textBox_posX.ReadOnly = false;
            //        textBox_posY.ReadOnly = false;
            //        textBox_posZ.ReadOnly = false;
            //        textBox_orientation.ReadOnly = false;
            //        break;
            //}

            locked = false;
        }
开发者ID:xfurry,项目名称:eventAI_tool,代码行数:60,代码来源:DbScriptControl.cs

示例2: AddNode

        public static INode AddNode(this IGraph myIGraph, Int32 myInt32Id)
        {
            if (myIGraph == null)
                throw new ArgumentNullException("myIGraph must not be null!");

            return myIGraph.AddNode(myInt32Id.ToString());
        }
开发者ID:subbuballa,项目名称:Walkyr,代码行数:7,代码来源:IGraphExtensions.cs

示例3: Page_Load

 protected void Page_Load(object sender, EventArgs e)
 {
     Whitfield_Project _wc = new Whitfield_Project();
     if (!Page.IsPostBack)
     {
         BindCompetition();
         // 1 Get collection
         NameValueCollection n = Request.QueryString;
         // 2 See if any query string exists
         if (n.HasKeys())
         {
             // 3 Get first key and value
             string k = n.GetKey(0);
             string v = n.Get(0);
             string v1 = n.Get(1);
             // 4
             // Test different keys
             EstNum = Convert.ToInt32(v);
             twc_project_number = Convert.ToInt32(v1);
             hidEstNum.Value = EstNum.ToString();
             hidtwcProjNumber.Value = twc_project_number.ToString();
             ViewState["EstNum"] = EstNum.ToString();
             ViewState["twc_project_number"] = twc_project_number.ToString();
         }
     }
 }
开发者ID:frdharish,项目名称:WhitfieldAPPs,代码行数:26,代码来源:twc_project_contacts.aspx.cs

示例4: ConsoleField

        public ConsoleField(Int32 x, Int32 y, Int32 width, Int32 height, String name)
        {
            if(x < 0)
                throw new ArgumentOutOfRangeException("x", "x may not be less than zero. Given " + x.ToString() + ".");
            if(y < 0)
                throw new ArgumentOutOfRangeException("y", "y may not be less than zero. Given " + y.ToString() + ".");
            if(width < 0)
                throw new ArgumentOutOfRangeException("width", "width may not be less than zero. Given " + width.ToString() + ".");
            if(height < 0)
                throw new ArgumentOutOfRangeException("height", "height may not be less than zero. Given " + height.ToString() + ".");
            if(name == null)
                throw new ArgumentNullException("p_name");
            if((x + width - 1) > Console.WindowWidth)
                throw new ArgumentOutOfRangeException("The console field may not exceed the boundaries of the console window. Console Window is " + Console.WindowWidth + " wide, x=" + x.ToString() + ",width=" + width.ToString());
            if ((y + height - 1) > Console.WindowHeight)
                throw new ArgumentOutOfRangeException("The console field may not exceed the boundaries of the console window. Console Window is " + Console.WindowHeight + " high, y=" + y.ToString() + ",height=" + height.ToString());

            X = x;
            Y = y;
            Width = width;
            Height = height;
            Name = name;

            ConsoleFieldManager.AddField(this);
        }
开发者ID:default0,项目名称:ConsoleLib,代码行数:25,代码来源:ConsoleField.cs

示例5: GetHashID

        public static String GetHashID(Int32 usrId)
        {
            return usrId.ToString();

            if(String.IsNullOrEmpty(UserHash))
            {
                UserHash = Util.Crypto.Encrypt(usrId.ToString());
            }

            return UserHash;
        }
开发者ID:nikkw,项目名称:W2C,代码行数:11,代码来源:User.cs

示例6: AddRowTotal

 protected void AddRowTotal(Int32 intRowTotal, string strStatusID)
 {
     if (intRowTotal > 0)
     {
         sbHTML.Append("<td style='border-left-style: solid; border-left-width: 2px; border-left-color: #999999' align='center' class='" + strClassName + "' width='30px'><a href='CP_ReportResults.aspx?RID=" + strReportID + "&V1=8,9,10,11,12&V2=" + strStatusID + "&V3=" + Server.UrlEncode(strAdminCriteria) + "'>" + intRowTotal.ToString() + "</a></td>");
     }
     else
     {
         sbHTML.Append("<td style='border-left-style: solid; border-left-width: 2px; border-left-color: #999999' align='center' class='" + strClassName + "' width='30px'>" + intRowTotal.ToString() + "</td>");
     }
 }
开发者ID:nehawadhwa,项目名称:ccweb,代码行数:11,代码来源:CP_RepCompletionSummary.aspx.cs

示例7: AddGrade

 protected void AddGrade(Int32 intCount, string strStatusID, string strGrade, string strClassName)
 {
     if (intCount > 0)
     {
         sbHTML.Append("<td align='center' class='" + strClassName + "' width='30px'><a href='CP_ReportResults.aspx?RID=" + strReportID + "&V1=" + strGrade + "&V2=" + strStatusID + "&V3=" + Server.UrlEncode(strAdminCriteria) + "'>" + intCount.ToString() + "</a></td>");
     }
     else
     {
         sbHTML.Append("<td align='center' class='" + strClassName + "' width='30px'>" + intCount.ToString() + "</td>");
     }
     if (strStatusID == "1" & strGrade == "12") strGrade12Incomplete = intCount.ToString();
 }
开发者ID:nehawadhwa,项目名称:ccweb,代码行数:12,代码来源:CP_RepCompletionSummary.aspx.cs

示例8: FetchSubMaterials

 public void FetchSubMaterials(Int32 EstNum, String work_order_id,DataSet dsrec)
 {
     ViewState["EstNum"] = EstNum.ToString();
     ViewState["WorkOrderID"] = WorkOrderID.ToString();
     hdnEstNum.Value = EstNum.ToString();
     hdnworkorderNumber.Value = work_order_id.ToString();
     BindSubMaterials();
     if (dsrec.Tables[0].Rows.Count > 0)
     {
         grdpl1.DataSource = dsrec;
         grdpl1.DataBind();
     }
 }
开发者ID:frdharish,项目名称:WhitfieldAPPs,代码行数:13,代码来源:workorder_materials.ascx.cs

示例9: GetScheme

 public PageScheme GetScheme(String key, Int32 adminIdx)
 {
     PageLogger.RecordDebugLog("get page schema " + key + "||" + adminIdx.ToString());
     var result =  m_DAL.SelectScheme(key, adminIdx);
     if (result == null)
     {
         result = m_DAL.SelectDefaultScheme(adminIdx);
     }
     if (result != null)
     {
         PageLogger.RecordDebugLog("get page schema " + result.Key + "||" + adminIdx.ToString());
     }
     return result;
 }
开发者ID:dalinhuang,项目名称:tdcodes,代码行数:14,代码来源:PageSchemaMaintenance.cs

示例10: Check

        public void Check(Int32 externGuess)
        {
            IGuessService clientCB = OperationContext.Current.GetCallbackChannel<IGuessService>();
            Player currentPlayer = _players[clientCB];
            Guess guess = new Guess(externGuess.ToString(), currentPlayer.Name);
            played.Add(guess);

            if (_randomInt == externGuess)
            {
                clientCB.GameOver(true, played);
                foreach (KeyValuePair<IGuessService, Player> copyied in _players)
                {
                    if (copyied.Key != clientCB)
                    {
                        copyied.Key.GameOver(false, played);
                    }
                }
            }
            else
            {
                if (externGuess < _randomInt){guess.Tipp = GuessTipp.ToLow;}
                else { guess.Tipp = GuessTipp.ToHigh; }

                foreach (KeyValuePair<IGuessService, Player> player in _players)
                {
                    player.Key.PlayerGuess(guess);
                }
            }
        }
开发者ID:tdellenbach,项目名称:inte_silvermini,代码行数:29,代码来源:GuessGame.cs

示例11: CreateLogFile

 public static void CreateLogFile (Int32 iCountTestcases, Int32 iCountErrors)
 {
     FileStream fs = new FileStream("results.txt", FileMode.Create, FileAccess.Write);
     StreamWriter w = new StreamWriter(fs);
     w.WriteLine ("<Testcase>");
     if (iCountErrors > 0)
     {
         w.WriteLine ("	<FinalResults type=\"Fail\" total=\"{0}\" fail=\"{1}\"/>", iCountTestcases.ToString(), iCountErrors.ToString());
     }
     else
     {
         w.WriteLine ("\t<FinalResults type=\"Pass\" total=\"{0}\" fail=\"{1}\"/>", iCountTestcases.ToString(), iCountErrors.ToString());
     }
     w.WriteLine ("</Testcase>");
     w.Close();
 }
开发者ID:ArildF,项目名称:masters,代码行数:16,代码来源:streamread.cs

示例12: bb

    private void bb()
    {
        try
        {
         DataView dv = (DataView)(SqlDataSource2.Select(DataSourceSelectArguments.Empty));
         if (dv.Table.Rows.Count != 0)
         {
             Int32 ii;
             for (ii = 0; ii < dv.Table.Rows.Count; ii++)
             {
                 i = Convert.ToInt32(dv.Table.Rows[ii][1]);
             }
             i++;
             no.Text = i.ToString();
         }
         else
         {
             no.Text = "101".ToString();
         }
        }
        catch(Exception t)
        {

            no.Text = "101".ToString();
        }
    }
开发者ID:hpie,项目名称:hpie,代码行数:26,代码来源:receipt_book.aspx.cs

示例13: UpdateView

        public void UpdateView(Int32 operand1, Int32 operand2, Int32 result)
        {
            Txt_Operand1.Text = operand1.ToString();
            Txt_Operand2.Text = operand2.ToString();

            Txt_Result.Text = result.ToString();
        }
开发者ID:marigerr,项目名称:MVPWinFormGerman,代码行数:7,代码来源:DemoView.cs

示例14: LoadDisplay

 public void LoadDisplay(string FriendInvitationKey, Int32 AccountID, string AccountFirstName, string AccountLastName, string SiteName)
 {
     lblFullName.Text = AccountFirstName + " " + AccountLastName;
     lblSiteName1.Text = SiteName;
     lblSiteName2.Text = SiteName;
     imgProfileAvatar.ImageUrl = "~/images/ProfileAvatar/ProfileImage.aspx?AccountID=" + AccountID.ToString();
 }
开发者ID:lengocluyen,项目名称:pescode,代码行数:7,代码来源:ConfirmFriendshipRequest.aspx.cs

示例15: FormStatistic

        /* Constructors */
        public FormStatistic(Int32 totalJobs, Int32 completedJobs, Int32 expiredJobs)
        {
            InitializeComponent();
            Icon = Resources.Statistic_Icon_16;

            // Calculations
            activeJobs = totalJobs - completedJobs - expiredJobs;

            if (totalJobs == 0)
            {
                jobCompletedSize = 360;
                jobRemainingSize = jobExpiredSize = 0;
                jobsEfficiency = 100;
            }
            else
            {
                jobCompletedSize = 360 * completedJobs / totalJobs;
                jobRemainingSize = 360 * activeJobs / totalJobs;
                jobExpiredSize =  360 - jobRemainingSize - jobCompletedSize;
                jobsEfficiency = 100 * completedJobs / totalJobs;
            }

            // Fill data
            lTotalJobs.Text = totalJobs.ToString();
            lActiveJobs.Text = activeJobs.ToString();
            lCompletedJobs.Text = completedJobs.ToString();
            lExpiredJobs.Text = expiredJobs.ToString();
            lEfficiency.Text = jobsEfficiency.ToString() + "%";
        }
开发者ID:jeka-js,项目名称:MyJobs,代码行数:30,代码来源:FormStatistic.cs


注:本文中的System.Int32.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。