Ejemplo n.º 1
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            //调整监测分析面板窗体宽度,以显示完整整个控件
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp != null)
            {
                object        obj     = arp.GetArg("SmartSession");
                ISmartSession session = obj as ISmartSession;
                if (session != null)
                {
                    ISmartToolWindow wnd = session.SmartWindowManager.SmartToolWindowFactory.GetSmartToolWindow(_extractWindowID);
                    (wnd as DockWindow).TabStrip.SizeInfo.AbsoluteSize = new System.Drawing.Size(_extractWindowWidth, 0);
                }
            }
            InitArgument();
            //if (_handler != null)
            //    _handler(GetArgumentValue());
        }
Ejemplo n.º 2
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            string filename = arp.DataProvider.fileName;

            if (string.IsNullOrEmpty(filename) || !File.Exists(filename))
            {
                return;
            }
            SearchDBLVFormWorkSpace(filename, subProduct.Identify);
        }
Ejemplo n.º 3
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            string filename = arp.DataProvider.fileName;

            _currentRasterDir = Path.GetDirectoryName(filename);
        }
Ejemplo n.º 4
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            Tag           = arp;
            _dataProvider = arp.DataProvider;
            if (_handler != null)
            {
                _handler(GetArgumentValue());
            }
        }
Ejemplo n.º 5
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            _isInit = true;
            txtNatrueColorDir.Tag = null;
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            SaveArgsFile(null, null);
            _isInit = false;
        }
Ejemplo n.º 6
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            _arp = subProduct.ArgumentProvider;
            if (_arp == null)
            {
                return;
            }
            _arp.SetArg("ucAnlysisTool", this);
        }
Ejemplo n.º 7
0
 public void InitControl(IExtractPanel panel, ArgumentBase arg)
 {
     _lakeDic.Clear();
     cbLake.Items.Clear();
     if (!File.Exists(_argsFilename))
     {
         InitLakeResulotion();
         return;
     }
     string[] argContent  = File.ReadAllLines(_argsFilename, Encoding.Default);
     string[] stringSplit = null;
     for (int i = 0; i < argContent.Length; i++)
     {
         if (string.IsNullOrEmpty(argContent[i]))
         {
             continue;
         }
         stringSplit = argContent[i].Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
         if (stringSplit == null || stringSplit.Length < 2)
         {
             continue;
         }
         _lakeDic.Add(stringSplit[0], stringSplit[1]);
         cbLake.Items.Add(stringSplit[0]);
     }
     InitLakeResulotion();
 }
Ejemplo n.º 8
0
 public void InitControl(IExtractPanel panel, ArgumentBase arg)
 {
     if (_handler != null)
     {
         _handler(GetArgFileSetting());
     }
 }
Ejemplo n.º 9
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            ckNCalc.Checked = _ckNCalcChecked;
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            _arp = subProduct.ArgumentProvider;
            if (_arp.DataProvider != null)
            {
                string rasterfilename = _arp.DataProvider.fileName;
                IntivalAngles(rasterfilename);
            }
        }
Ejemplo n.º 10
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            _productIdentify    = subProduct.Definition.ProductDef.Identify;
            _subProductIdentify = subProduct.Identify;
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            _currentFileName = arp.DataProvider.fileName;
        }
Ejemplo n.º 11
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            _isInit         = true;
            txtAITxtDir.Tag = null;
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            txtAITxtDir.Tag = arp.DataProvider == null ? null : arp.DataProvider.fileName;
            GetDefaultPathFromTxt();
            SearchCurRasterAI();
            SaveArgsFile(null, null);
            _isInit = false;
        }
Ejemplo n.º 12
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp != null)
            {
                if (arp.DataProvider != null)
                {
                    _currentRasterFile = arp.DataProvider.fileName;
                }
                object obj = arp.GetArg("SmartSession");
                if (obj != null)
                {
                    _session = obj as ISmartSession;
                }
            }
        }
Ejemplo n.º 13
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            _isInit = true;
            txtNatrueColorDir.Tag = null;
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            SaveArgsFile(null, null);
            //string filename = arp.DataProvider.fileName;
            //if (string.IsNullOrEmpty(filename) || !File.Exists(filename))
            //    return;
            //txtNatrueColorDir.Tag = filename;
            //txtDir_TextChanged(null, null);
            _isInit = false;
        }
Ejemplo n.º 14
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            Tag = arp;
            InitFileDir();
        }
Ejemplo n.º 15
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            expFilename = string.Empty;
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            string path = AppDomain.CurrentDomain.BaseDirectory + "\\SystemData\\ProductArgs\\" + subProduct.Definition.ProductDef.Identify;

            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
            expFilename      = Path.Combine(path, subProduct.Definition.Identify + "LandExpInfo.xml");
            txtFilename.Text = Path.GetFileName(expFilename);
            if (_handler != null)
            {
                _handler(GetArgumentValue());
            }
        }
Ejemplo n.º 16
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            string filename = arp.DataProvider.fileName;

            if (string.IsNullOrEmpty(filename) || !File.Exists(filename))
            {
                filename = arp.GetArg("mainfiles").ToString();
            }
            _currentFileName = filename;
        }
Ejemplo n.º 17
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp != null)
            {
                if (arp.DataProvider != null)
                {
                    _dataProvider = arp.DataProvider;
                }
                object obj = arp.GetArg("SmartSession");
                if (obj != null)
                {
                    ISmartSession session = obj as ISmartSession;
                    _progress = session.ProgressMonitorManager;
                }
            }
            InitArgument();
        }
Ejemplo n.º 18
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            _panel = panel;

            SubProductDef subProductDef = _panel.MonitoringSubProduct.Definition;

            aoiTemplate.BuildControl(subProductDef.ProductDef.AOITemplates, subProductDef.AoiTemplates);
        }
Ejemplo n.º 19
0
        public ExtractPanelWindowContent()
        {
            InitializeComponent();
            UCExtractPanel c = new UCExtractPanel();

            _extractPanel = c as IExtractPanel;
            c.Dock        = DockStyle.Fill;
            panel2.Controls.Add(c);
            c.OnAlgorithmChanged      += new OnAlgorithmChangedHandler(c_OnAlgorithmChanged);
            c.OnArgumentValueChanged  += new OnArgumentValueChangedHandler(c_OnArgumentValueChanged);
            c.OnArgumentValueChanging += new OnArgumentValueChangingHandler(c_OnArgumentValueChanging);
        }
Ejemplo n.º 20
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            //如果需要自动定位  实现
            if (_stageRegions == null || _stageRegions.Count == 0)
            {
                return;
            }
            cbRegion.Items.Clear();
            foreach (StageRegionDef region in _stageRegions)
            {
                cbRegion.Items.Add(region.Name);
            }
            cbRegion.SelectedIndex = 0;
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp != null)
            {
                _argumentProvider = arp;
                CoordEnvelope dataCoordEnv = arp.DataProvider.CoordEnvelope;
                Envelope      dataEnvelope = new Envelope(dataCoordEnv.MinX, dataCoordEnv.MinY, dataCoordEnv.MaxX, dataCoordEnv.MaxY);
                foreach (StageRegionDef item in _stageRegions)
                {
                    if (item.Evelope != null && dataEnvelope.Contains(item.Evelope))
                    {
                        cbRegion.Text = item.Name;
                        break;
                    }
                }
            }
        }
Ejemplo n.º 21
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            object        obj     = arp.GetArg("SmartSession");
            ISmartSession session = null;

            if (obj != null)
            {
                session = obj as ISmartSession;
            }
            Tag = arp;
            if (arp.DataProvider != null && session != null && session.SmartWindowManager.ActiveCanvasViewer != null)
            {
                _lonMin = Math.Round(arp.DataProvider.CoordEnvelope.MinX, 4);
                _lonMax = Math.Round(arp.DataProvider.CoordEnvelope.MaxX, 4);
                _latMin = Math.Round(arp.DataProvider.CoordEnvelope.MinY, 4);
                _latMax = Math.Round(arp.DataProvider.CoordEnvelope.MaxY, 4);
            }
            SetDefalutValue();
            if (_handler != null)
            {
                _handler(GetOutEvenlope());
            }
        }
Ejemplo n.º 22
0
 public void Free()
 {
     _session = null;
     if (_extractPanel != null)
     {
         (_extractPanel as UCExtractPanel).OnAlgorithmChanged      -= new OnAlgorithmChangedHandler(c_OnAlgorithmChanged);
         (_extractPanel as UCExtractPanel).OnArgumentValueChanged  -= new OnArgumentValueChangedHandler(c_OnArgumentValueChanged);
         (_extractPanel as UCExtractPanel).OnArgumentValueChanging -= new OnArgumentValueChangingHandler(c_OnArgumentValueChanging);
         (_extractPanel as UCExtractPanel).Dispose();
         _extractPanel.MonitoringSubProductTag = null;
         _extractPanel = null;
     }
     //if (_currentWks != null)
     //{
     //    (_currentWks as UCWorkspace).Dispose();
     //    _currentWks = null;
     //}
 }
Ejemplo n.º 23
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            _argProvider = subProduct.ArgumentProvider;
        }
Ejemplo n.º 24
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            txtDir.Tag = null;
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            string filename = arp.DataProvider.fileName;

            if (string.IsNullOrEmpty(filename) || !File.Exists(filename))
            {
                return;
            }
            txtDir.Tag = filename;
            if (_handler != null)
            {
                _handler(GetArgFileSetting());
            }
        }
Ejemplo n.º 25
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            _ucFiles.Title = arg.Description;
            List <string> files = new List <string>();

            _argumentProvider = panel.MonitoringSubProduct.ArgumentProvider;
            _workspace        = panel.Workspace;
            IRasterDataProvider rad = _argumentProvider.DataProvider;

            if (panel.MonitoringSubProduct.Definition.IsNeedCurrentRaster && rad != null)
            {
                files.Add(rad.fileName);
            }
            _argName            = (arg as ArgumentDef).Name;
            _refIdentify        = (arg as ArgumentDef).RefIdentify;
            _fileFilter         = (arg as ArgumentDef).RefFilter;
            _ucFiles.FileFilter = _fileFilter;
            string[] sfiles = GetSelectedFiles();
            if (sfiles != null)
            {
                files.AddRange(sfiles);
            }
            _ucFiles.Files = files.ToArray();
        }
Ejemplo n.º 26
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp == null)
            {
                return;
            }
            string filename = arp.DataProvider.fileName;

            if (string.IsNullOrEmpty(filename) || !File.Exists(filename))
            {
                filename = GetStringArgument(arp, "mainfiles");
            }
            txtFileDir.Text = GetFileByDirArg.GetFileBySattileSensor(arp, "HistroyCSRDir", "DefHistroyCSRDir", filename);
            if (_handler != null)
            {
                _handler(GetArgumentValue());
            }
        }
Ejemplo n.º 27
0
 public void InitControl(IExtractPanel panel, ArgumentBase arg)
 {
     InitFileDir();
 }
Ejemplo n.º 28
0
 public void InitControl(IExtractPanel panel, ArgumentBase arg)
 {
     _ucAOITemplate.BuildControl(panel.MonitoringSubProduct.Definition.ProductDef.AOITemplates, panel.MonitoringSubProduct.Definition.AoiTemplates);
 }
Ejemplo n.º 29
0
 public void InitControl(IExtractPanel panel, ArgumentBase arg)
 {
 }
Ejemplo n.º 30
0
        public void InitControl(IExtractPanel panel, ArgumentBase arg)
        {
            if (panel == null)
            {
                return;
            }
            UCExtractPanel ucPanel = panel as UCExtractPanel;

            if (ucPanel == null)
            {
                return;
            }
            IMonitoringSubProduct subProduct = ucPanel.MonitoringSubProduct;

            if (subProduct == null)
            {
                return;
            }
            IArgumentProvider arp = subProduct.ArgumentProvider;

            if (arp != null)
            {
                if (arp.DataProvider != null)
                {
                    IRasterDataProvider dataPrd = arp.DataProvider;
                    txtFileName.Text = arp.DataProvider.fileName;
                    //set cmbBand and cmbRange
                    if (dataPrd.BandCount >= 1)
                    {
                        string datasetStr = dataPrd.GetRasterBand(1).Description;
                        if (!string.IsNullOrEmpty(datasetStr))
                        {
                            string[] stringArray = datasetStr.Split(new char[] { '_' }, StringSplitOptions.RemoveEmptyEntries);
                            if (stringArray != null && stringArray.Length == 3)
                            {
                                if (stringArray[1] == "north")
                                {
                                    cmbRange.SelectedIndex = 0;
                                }
                                else
                                {
                                    cmbRange.SelectedIndex = 1;
                                }
                                switch (stringArray[2])
                                {
                                case "asc":
                                {
                                    cmbBand.SelectedIndex = 0;
                                    break;
                                }

                                case "des":
                                {
                                    cmbBand.SelectedIndex = 1;
                                    break;
                                }

                                case "avg":
                                {
                                    cmbBand.SelectedIndex = 2;
                                    break;
                                }
                                }
                            }
                        }
                    }
                }
            }
        }