private void FileBrowser_KeyDown(object sender, KeyEventArgs e)
        {
            if (CurrentTime == null)
            {
                CurrentSearchString = "^"+e.KeyCode.ToString();
                CurrentTime = TimeSpanPlus.Now;
            }
            else
            {
                TimeSpanPlus Old = CurrentTime;
                CurrentTime= TimeSpanPlus.Now;
                if ((CurrentTime - Old).TotalSeconds < 2)
                {
                    CurrentSearchString += e.KeyCode.ToString();
                }
                else
                {
                    CurrentSearchString = "^" + e.KeyCode.ToString();
                }
            }

            ScrollTo(CurrentSearchString,RegexOptions.IgnoreCase);
        }
Beispiel #2
0
 public CountDown(int Interval=1000)
 {
     tsp = new TimeSpanPlus();
     this.Interval = Interval;
     InitTimer();
 }
Beispiel #3
0
 public CountDown(TimeSpanPlus TimeSpan, int Interval = 1000)
 {
     SetTime(TimeSpan);
     this.Interval = Interval;
     InitTimer();
 }
Beispiel #4
0
 public bool SubtractTime(TimeSpanPlus Time)
 {
     return SubtractDays(Time.Days) && SubtractHours(Time.Hours) && SubtractMinuts(Time.Minutes) && SubtractSeconds(Time.Seconds) && SubtractMilliseconds(Time.Milliseconds);
 }
Beispiel #5
0
 public void SetTime(TimeSpan TimeSpan)
 {
     Stop(StopStatus.Stopped);
     tsp = new TimeSpanPlus(TimeSpan);
 }
Beispiel #6
0
 public TimeSpanPlus(TimeSpanPlus Time)
 {
     SetTime(Time);
 }
Beispiel #7
0
 public void SetTime(TimeSpanPlus Time)
 {
     _millisec = Time._millisec;
     _sec = Time._sec;
     _min = Time._min;
     _hour = Time._hour;
     _day = Time._day;
 }
Beispiel #8
0
 public void AddTime(TimeSpanPlus Time)
 {
     AddMilliseconds(Time.Milliseconds);
     AddSeconds(Time.Seconds);
     AddMinuts(Time.Minutes);
     AddHours(Time.Hours);
     AddDays(Time.Days);
 }
Beispiel #9
0
 public static TimeSpanPlus operator -(TimeSpanPlus c1, TimeSpanPlus c2)
 {
     TimeSpanPlus t = new TimeSpanPlus(c1);
     t.SubtractTime(c2);
     return t;
 }
Beispiel #10
0
 public static TimeSpanPlus operator +(TimeSpanPlus c1, TimeSpanPlus c2)
 {
     TimeSpanPlus t=new TimeSpanPlus(c1);
     t.AddTime(c2);
     return t;
 }