コード例 #1
0
ファイル: AstroData.cs プロジェクト: pprasit/Project
        private static void SubFrameChecking(DEVICENAME DeviceName, StationHandler ExistingStation)
        {
            try
            {
                int STARTX      = Convert.ToInt32(ExistingStation.GetInformation(DeviceName, IMAGING.IMAGING_STARTX).Value);
                int STARTY      = Convert.ToInt32(ExistingStation.GetInformation(DeviceName, IMAGING.IMAGING_STARTX).Value);
                int CAMERAXSIZE = Convert.ToInt32(ExistingStation.GetInformation(DeviceName, IMAGING.IMAGING_CCD_CAMERAXSIZE).Value);
                int CAMERAYSIZE = Convert.ToInt32(ExistingStation.GetInformation(DeviceName, IMAGING.IMAGING_CCD_CAMERAYSIZE).Value);
                int NUMX        = Convert.ToInt32(ExistingStation.GetInformation(DeviceName, IMAGING.IMAGING_STARTX).Value);
                int NUMY        = Convert.ToInt32(ExistingStation.GetInformation(DeviceName, IMAGING.IMAGING_STARTX).Value);
                int BINX        = Convert.ToInt32(ExistingStation.GetInformation(DeviceName, IMAGING.IMAGING_CCD_BINX).Value);
                int BINY        = Convert.ToInt32(ExistingStation.GetInformation(DeviceName, IMAGING.IMAGING_CCD_BINY).Value);

                if (STARTX > 0 && STARTY > 0 && NUMX < CAMERAXSIZE && NUMY < CAMERAYSIZE && BINX > 1 && BINY > 1)
                {
                    ExistingStation.NewIMAGINGInformation(DeviceName, IMAGING.IMAGING_CCD_ISSUBFRAMEON, true, DateTime.UtcNow);
                }
                else
                {
                    ExistingStation.NewIMAGINGInformation(DeviceName, IMAGING.IMAGING_CCD_ISSUBFRAMEON, false, DateTime.UtcNow);
                }
            }
            catch
            {
                ExistingStation.NewIMAGINGInformation(DeviceName, IMAGING.IMAGING_CCD_ISSUBFRAMEON, false, DateTime.UtcNow);
            }
        }
コード例 #2
0
ファイル: AstroData.cs プロジェクト: pprasit/Project
        public static OUTPUTSTRUCT GetInformation(STATIONNAME StationName, DEVICENAME DeviceName, dynamic FieldName, Object[] Paramter)
        {
            StationHandler SiteInformation = KeeperData.FirstOrDefault(Item => Item.StationName == StationName);

            if (SiteInformation != null)
            {
                return(SiteInformation.GetInformation(DeviceName, FieldName));
            }
            return(null);
        }
コード例 #3
0
ファイル: AstroData.cs プロジェクト: pprasit/Project
        public static List <OUTPUTSTRUCT> GetInformation(STATIONNAME StationName)
        {
            StationHandler SiteInformation = KeeperData.FirstOrDefault(Item => Item.StationName == StationName);

            if (SiteInformation != null)
            {
                return(SiteInformation.GetInformation());
            }
            return(null);
        }
コード例 #4
0
ファイル: AstroData.cs プロジェクト: pprasit/Project
        public static List <OUTPUTSTRUCT> GetInformation(STATIONNAME StationName, DEVICECATEGORY DeviceCategory)
        {
            StationHandler SiteInformation = KeeperData.FirstOrDefault(Item => Item.StationName == StationName);

            if (SiteInformation != null)
            {
                List <OUTPUTSTRUCT> ThisOutput = SiteInformation.GetInformation(DeviceCategory);
                return(ThisOutput);
            }
            return(null);
        }