RSS 2.0 Feed
Code
摘要:using System;using System.ComponentModel;using System.Collections.Generic;using System.Runtime.InteropServices;using System.Text; namespace Sunmast.SharedCode{    /// <summary>    /// The type of logon operation to perform.    /// </summary>    enum LogonType : uint    {        /// <summary>        /// This logon type is intended for users who will be interactively using the computer, such as a user being logged on by a terminal server, remote shell, or similar process. This logon type has the additional expense of caching logon information for disconnected operations; therefore, it is inappropriate for some client/server applications, such as a mail server.        /// </summary>        Interactive = 2,        /// <summary>        /// This logon type is intended for high performance......[阅读全文]

posted @ | Feedback (1) |

摘要:// MainForm.cs using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Globalization;using System.Text;using System.Windows.Forms; namespace XGenerator{    public partial class MainForm : Form    {        IFormatProvider formatter = new NumberFormatInfo();         public MainForm()        {            InitializeComponent(); #if DEBUG            tbMin.Text = "874";            tbMax.Text = "142857";#endif        }         private void btnGenerate_Click(object sender, EventArgs e)        {            int minValue, maxValue;            if (!int.TryParse(tbMin.Text, out minValue) || !int.TryParse(tbMax.Text, out maxValue)                || minValue > maxValue)            {                rtbResult.Text = string.Format("Please fill the two text boxes correctly.");                return;            }             string min = minValue.ToString(formatter), max = maxValue.ToString(formatter);            if (minValue == maxValue)            {                rtbResult.Text = min; // == max                return;            }             int minLength = min.Length, maxLength = max.Length;            StringBuilder result = new......[阅读全文]

posted @ | Feedback (1) |