Exemple #1
0
        public QSections(DCAnalytics.ObjectType objectType, Questionaire _questionaire, QuestionairePageState questionairePageState = null, Certification _certification = null, FieldInspection _fieldInspection = null)
        {
            InitializeComponent();
            controls                   = new UIControls(this);
            ObjectType                 = objectType;
            selectPageState            = this;
            promptPageState            = this;
            picturePageState           = this;
            locationPageState          = this;
            questionaire               = null;
            questionaire               = _questionaire;
            FieldInspection            = _fieldInspection;
            certification              = _certification;
            Title                      = questionaire.Name;
            this.questionairePageState = questionairePageState;
            sectionViews               = new List <SectionView>();
            _questionaireStatus        = string.IsNullOrEmpty(questionaire.Key) ? QuestionaireStatus.Create : QuestionaireStatus.Modify;
            _dbManager                 = new DatabaseManager();
            user          = AiDataStore.GetUser();
            configuration = AiDataStore.GetConfiguration();
            isValid       = true;

            Sections.Clear();
            Sections = (FieldInspection != null) ?
                       FieldInspection.Sections:
                       (certification != null) ?
                       certification.Sections:
                       questionaire.Sections;
            dependencies.Clear();
            navigatedTargetSections.Clear();
            controls.targets.Clear();
            Init();
        }
 public PhotoUploadOptions(AIImage image, PicturePageState pageState)
 {
     this._pageState = pageState;
     InitializeComponent();
     this.Image = image;
 }