Beispiel #1
0
        private void MillisCommonChanged(TextBox tb, int minval = 0)
        {
            try
            {
                IntTools.Parse(tb.Text, minval, 60000);

                tb.ForeColor = new TextBox().ForeColor;
                tb.BackColor = new TextBox().BackColor;
            }
            catch
            {
                tb.ForeColor = Color.Red;
                tb.BackColor = Color.FromArgb(255, 255, 200);
            }
        }
Beispiel #2
0
        // ---- 全フィールドなめる系 ----

        public void LoadData()
        {
            if (File.Exists(DatFile) == false)
            {
                return;
            }

            try
            {
                string[] lines = File.ReadAllLines(DatFile, Encoding.UTF8);
                int      c     = 0;

                MainWin_L         = int.Parse(lines[c++]);
                MainWin_T         = int.Parse(lines[c++]);
                SndInputBatLocal  = StringTools.ToFlag(lines[c++]);
                RecStrokeMillis   = IntTools.Parse(lines[c++], 0, 60000);
                RecClickMillis    = IntTools.Parse(lines[c++], 0, 60000);
                RecDblClickMillis = IntTools.Parse(lines[c++], 0, 60000);
                Recまとめ            = StringTools.ToFlag(lines[c++]);
                StrokeMillis      = IntTools.Parse(lines[c++], 0, 60000);
                ClickMillis       = IntTools.Parse(lines[c++], 0, 60000);
                DblClickMillis    = IntTools.Parse(lines[c++], 0, 60000);
                SamplingMillis    = IntTools.Parse(lines[c++], 1, 60000);
                RecStartMin       = StringTools.ToFlag(lines[c++]);
                RecEndUnmin       = StringTools.ToFlag(lines[c++]);
                RecRCtrl停止        = StringTools.ToFlag(lines[c++]);
                StartMin          = StringTools.ToFlag(lines[c++]);
                EndUnmin          = StringTools.ToFlag(lines[c++]);
                RCtrl中断           = StringTools.ToFlag(lines[c++]);
                KeyRec            = (KeyRec_e)int.Parse(lines[c++]);
                MouseRec          = (MouseRec_e)int.Parse(lines[c++]);
                AlwaysTop         = StringTools.ToFlag(lines[c++]);
                LoopMode          = StringTools.ToFlag(lines[c++]);
                OutDir            = EraseDq(lines[c++]);
                // ここへ追加..
            }
            catch (Exception e)
            {
                Utils.WriteLog(e);
            }
        }