Beispiel #1
0
        public void SetupMaskFromContainer(MaskContainer cont)
        {
            _mask.MaskID           = cont.MaskID;
            _mask.Rows             = cont.Rows;
            _mask.Cols             = cont.Cols;
            _mask.XOffset          = cont.XOffset;
            _mask.YOffset          = cont.YOffset;
            _mask.XSize            = cont.XSize;
            _mask.YSize            = cont.YSize;
            _mask.XStep            = cont.XStep;
            _mask.YStep            = cont.YStep;
            _mask.Angle            = cont.Angle;
            _mask.Shape            = cont.Shape;
            _mask.Description      = cont.Description;
            _mask.PlateTypeID      = cont.PlateTypeID;
            _mask.ReferenceImageID = cont.ReferenceImageID;
            _mask.IsDefault        = cont.IsDefault;

            WaveguideDB        wgDB = new WaveguideDB();
            PlateTypeContainer ptc;
            bool success = wgDB.GetPlateType(Mask.PlateTypeID, out ptc);

            if (success)
            {
                PlateType = ptc;
            }
            else
            {
                PlateType = null;
            }
        }
Beispiel #2
0
        public ReportWriter(ProjectContainer project, ExperimentContainer experiment)
        {
            m_initializationSuccess = false;
            m_lastErrorString       = "";

            m_waveguideReportDirectory = GlobalVars.DefaultWaveGuideReportFileDirectory;
            m_format = REPORT_FILEFORMAT.EXCEL;

            m_wgDB       = new WaveguideDB();
            m_project    = project;
            m_experiment = experiment;


            bool success = m_wgDB.GetMethod(m_experiment.MethodID, out m_method);

            if (m_method == null)
            {
                success = false;
            }
            if (success)
            {
                success = m_wgDB.GetPlate(m_experiment.PlateID, out m_plate);
                if (m_plate == null)
                {
                    success = false;
                }
                if (success)
                {
                    success = m_wgDB.GetUser(m_plate.OwnerID, out m_user);
                    if (m_user == null)
                    {
                        success = false;
                    }
                    if (success)
                    {
                        success = m_wgDB.GetPlateType(m_plate.PlateTypeID, out m_plateType);
                        if (m_plateType == null)
                        {
                            success = false;
                        }
                    }
                }
            }

            m_initializationSuccess = success;
        }