Ejemplo n.º 1
0
        private string GetFormattedTime(ImageExposureTimeFilter filter)
        {
            string time = "(";

            if(filter.Value.Denominator == 0) {
                time += "0";
            }
            else {
                time += string.Format("{0:f5}", ((double)filter.Value.Numerator / (double)filter.Value.Denominator));

                // trim unnecessary zeroes
                while(time.Length > 0 && time[time.Length - 1] == '0') {
                    time = time.Substring(0, time.Length - 1);
                }
            }

            time += ") seconds";
            return time;
        }
Ejemplo n.º 2
0
 public override object Clone()
 {
     ImageExposureTimeFilter temp = new ImageExposureTimeFilter();
     temp._name = _name;
     temp._condition = _condition;
     temp._enabled = _enabled;
     temp._value = _value;
     temp._sizeImplication = _sizeImplication;
     return temp;
 }