當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。