예제 #1
0
 private void PortNo_TextChanged(object sender, EventArgs e)
 {
     if (this.PortNo.Text == "" + IntTools.ToRange(IntTools.Parse(this.PortNo.Text, 1), 1, 65535))
     {
         this.PortNo.ForeColor = Color.Black;
     }
     else
     {
         this.PortNo.ForeColor = Color.Red;
     }
 }
예제 #2
0
        private void DoSave()
        {
            try
            {
                Gnd.Sd.PortNo = IntTools.Parse(this.PortNo.Text, 80, 1, 65535);

                File.WriteAllLines(
                    DOC_ROOT_FILE,
                    new string[] { "default " + DocRootFltr(this.DocRoot.Text) },
                    StringTools.ENCODING_SJIS
                    );
            }
            catch
            { }
        }