private bool ResetCsrString(Dictionary <string, string> csrStr) { string csrFile = null; string filename = _argumentProvider.GetArg("CurrentRasterFile") as string; if (string.IsNullOrEmpty(csrStr["0CSR"]) || !File.Exists(csrStr["0CSR"])) { csrFile = GetFileByDirArg.GetFileBySattileSensor(_argumentProvider, "HistroyCSRDir", "DefHistroyCSRDir", filename); csrStr["0CSR"] = csrFile; } if (string.IsNullOrEmpty(csrStr["MAXN"]) || !File.Exists(csrStr["0CSR"])) { if (csrFile != null) { string maxNDVI = csrFile.Replace("_0CSR_", "_MAXN_"); if (File.Exists(maxNDVI)) { csrStr["MAXN"] = maxNDVI; } } } return(CheckFileExist(csrStr, "0CSR") && CheckFileExist(csrStr, "MAXN")); }
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()); } }