Ejemplo n.º 1
0
        public static StrategyFilter StrategyFilter(WorkspaceDef wksdef)
        {
            string filename = GetStrategyXmlName(wksdef);

            StrategyFilter strategyFilter;

            if (!File.Exists(filename))
            {
                strategyFilter         = new StrategyFilter();
                strategyFilter.Days    = 1;
                strategyFilter.Sensors = new string[] { "AVHRR", "MERSI", "MODIS", "VISSR", "VIRR" };
                var str = UXmlConvert.GetString(strategyFilter);
                UIO.SaveFile(str, filename);
            }
            else
            {
                var str = UIO.ReadFile(filename);
                strategyFilter = UXmlConvert.GetObject <StrategyFilter>(str);
            }
            return(strategyFilter);
        }
Ejemplo n.º 2
0
        private static void SaveWorkspace(string filename, WorkspaceInfo workspaceInfo)
        {
            var str = UXmlConvert.GetString(workspaceInfo);

            UIO.SaveFile(str, filename);
        }