Esempio n. 1
0
 private void InitHdDataService()
 {
     _rootPath       = ConfigurationManager.AppSettings["DataServerRootPath"];
     _hdDataProvider = new HdDataProvider();
     _hdDataProvider.getProjectionsCompleted += new EventHandler <getProjectionsCompletedEventArgs>(Instance_getProjectionsCompleted);
     _hdDataProvider.getBlocksCompleted      += new EventHandler <getBlocksCompletedEventArgs>(_hdDataProvider_getBlocksCompleted);
     _hdDataProvider.getMosaicsCompleted     += new EventHandler <getMosaicsCompletedEventArgs>(_hdDataProvider_getMosaicsCompleted);
 }
Esempio n. 2
0
        private void InitHdDataService()
        {
            _rootPathProjetion = ConfigurationManager.AppSettings["DataServerProjetionPath"];
            _rootPathMosaic    = ConfigurationManager.AppSettings["DataServerMosaicPath"];
            _rootPathBlock     = ConfigurationManager.AppSettings["DataServerBlockPath"];
            _rootStatDat       = ConfigurationManager.AppSettings["DataServerStatPath"];

            _hdDataProvider = new HdDataProvider();
            _hdDataProvider.getProjectionsCompleted += new EventHandler <getProjectionsCompletedEventArgs>(Instance_getProjectionsCompleted);
            _hdDataProvider.getBlocksCompleted      += new EventHandler <getBlocksCompletedEventArgs>(_hdDataProvider_getBlocksCompleted);
            _hdDataProvider.getMosaicsCompleted     += new EventHandler <getMosaicsCompletedEventArgs>(_hdDataProvider_getMosaicsCompleted);
            _hdDataProvider.getRasterDatsCompleted  += new EventHandler <getRasterDatsCompletedEventArgs>(_hdDataProvider_getRasterDatsCompleted);
        }
Esempio n. 3
0
        void toolBlock_Click(object sender, EventArgs e)
        {
            ToolStripItem tool = sender as ToolStripItem;
            //补充
            HdDataProvider hdProvider = new HdDataProvider();

            BlockInfo[] blocks = hdProvider.GetBlockByFile(tool.Text, getBlockType());
            int         length = blocks.Length;

            for (int i = 0; i < length; i++)
            {
                OpenFileFactory.Open(DataPathHelper.DataServerBlockPath + blocks[i].datapath);
                Application.DoEvents();
            }
        }
Esempio n. 4
0
        public HdDataMonitorNotify()
        {
            _dbProvider = new HdDataProvider();
            _dbProvider.getProjectionsCompleted += new EventHandler <getProjectionsCompletedEventArgs>(_dbProvider_getProjectionsCompleted);
            _dbProvider.getBlocksCompleted      += new EventHandler <getBlocksCompletedEventArgs>(_dbProvider_getBlocksCompleted);
            _dbProvider.getMosaicsCompleted     += new EventHandler <getMosaicsCompletedEventArgs>(_dbProvider_getMosaicsCompleted);

            tasks = new GeneralMonitoringTask2(
                new Action[] {
                //new Action(getProjections)
                //,new Action(getMosaics)
                //,new Action(getBlocks)
                new Action(getProjectionsAsync)
                , new Action(getMosaicsAsync)
                , new Action(getBlocksAsync)
            });
            tasks.ThreadExceptionEventHandler += new System.Threading.ThreadExceptionEventHandler(tasks_ThreadExceptionEventHandler);
        }
Esempio n. 5
0
        public HdDataMonitorNotify_Old()
        {
            _dbProvider = new HdDataProvider();
            _dbProvider.getProjectionsCompleted += new EventHandler <getProjectionsCompletedEventArgs>(_dbProvider_getProjectionsCompleted);
            _dbProvider.getBlocksCompleted      += new EventHandler <getBlocksCompletedEventArgs>(_dbProvider_getBlocksCompleted);

            tasks = new GeneralMonitoringTask2(
                new Action[] {
                new Action(getProjections)
                //,new Action(getMosaicsAsync)
            });
            tasks.ThreadExceptionEventHandler += new System.Threading.ThreadExceptionEventHandler(tasks_ThreadExceptionEventHandler);
            //if (HdDataProvider.Instance.CanUse())
            //{
            //    MoProjectionInfo = new GeneralMonitoringTask<ProjectionInfo>(
            //        (items, item) => { return ContainsFromId(items, item); },
            //        () => { return getProjectionInfo(); });

            //    MoMosaicInfo = new GeneralMonitoringTask<MosaicInfo>(
            //        (items, item) => { return ContainsFromId(items, item); },
            //        () => { return getMosaicInfo(); });

            //    MoBlockInfo = new GeneralMonitoringTask<BlockInfo>(
            //        (items, item) => { return ContainsFromId(items, item); },
            //        () => { return HdDataProvider.Instance.getBlocks(DateTime.Today, DateTime.Today.AddDays(1).AddSeconds(-1)); });

            //    this.MoProjectionInfo.MessageSend += new Action<string>(OnMessageSend);
            //    this.MoProjectionInfo.DataAdded += new Action<HdDataServer.ProjectionInfo[]>(OnDataAdded);
            //    this.MoProjectionInfo.DataRemoved += new Action<HdDataServer.ProjectionInfo[]>(OnDataRemoved);

            //    this.MoMosaicInfo.MessageSend += new Action<string>(OnMessageSend);
            //    this.MoMosaicInfo.DataAdded += new Action<HdDataServer.MosaicInfo[]>(OnDataAdded);
            //    this.MoMosaicInfo.DataRemoved += new Action<HdDataServer.MosaicInfo[]>(OnDataRemoved);

            //    this.MoBlockInfo.MessageSend += new Action<string>(OnMessageSend);
            //    this.MoBlockInfo.DataAdded += new Action<HdDataServer.BlockInfo[]>(OnDataAdded);
            //    this.MoBlockInfo.DataRemoved += new Action<HdDataServer.BlockInfo[]>(OnDataRemoved);
            //}
        }