Пример #1
0
 public JwList<VmScheduledFlight> GetScheduledFlights()
 {
     if( _scheduledFlights == null )
     {
         _scheduledFlights = new JwList<VmScheduledFlight>();
         _scheduledFlights.AddRange( ScheduledFlightFile.GetAll());
     }
     return _scheduledFlights;
 }
Пример #2
0
        public static JwList<FileInfo> GetTemporaryAndShadowFiles(DirectoryInfo di)
        {
            JwList<FileInfo> v = new JwList<FileInfo>();

            FileInfo[] temps = di.GetFiles( "*" + TEMP_FILE_SUFFIX);
            FileInfo[] shadows = di.GetFiles( "*" + SHADOW_FILE_SUFFIX);

            v.AddAll(temps);
            v.AddAll(shadows);

            DirectoryInfo[] dia = di.GetDirectories();
            foreach( DirectoryInfo directory in dia )
            {
                JwList<FileInfo> results = GetTemporaryAndShadowFiles(directory);
                v.AddRange(results);
            }
            return v;
        }
Пример #3
0
        //# __________ PROTOCOL :: PUBLIC __________ #//
        public bool ValidateControls()
        {
            JwList<JwValidationError> all = new JwList<JwValidationError>();
            foreach( JwInputControlModel o in _controls)
            {
                if( ! o.ShouldValidate() ) continue;
                JwList<JwValidationError> v = o.Validate();
                o.ValidationErrors = v;
                o.ValidationVisibilityWrapper.LayoutVisibility = o.HasErrors();
                all.AddRange(v);
            }
            if( all.IsNotEmpty() )
            {
                FocusOnFirstError();
                JwValidationErrorFormatter formatter = new JwValidationErrorFormatter();
                String message = formatter.Format(all, "<BR>");
                _showErrorDelegate(message);
                JwUtility.PlayAlertSound(
                    _audioTonePath,
                    _audioToneRepeatCount,
                    _audioToneSleepMillis);
            }

            return all.IsEmpty();
        }