예제 #1
0
 private void Load_firstPageContent(ISmartSession smartSession)
 {
     _firstPageContent      = new UCGbalFirRevise(smartSession);
     _firstPageContent.Dock = DockStyle.Fill;
     this.Text = _firstPageContent.Text;
     this.Controls.Add(_firstPageContent);
 }
예제 #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)
            {
                if (arp.DataProvider != null)
                {
                    _dataProvider = arp.DataProvider;
                }
                object obj = arp.GetArg("SmartSession");
                if (obj != null)
                {
                    ISmartSession session = obj as ISmartSession;
                    _progress = session.ProgressMonitorManager;
                }
            }
            InitArgument();
        }
예제 #3
0
        /// <summary>
        /// 监测示意图
        /// </summary>
        /// <param name="session"></param>
        /// <param name="argument">"template:沙尘监测示意图,监测示意图,DST,MCSI"</param>
        public static void DisplayMonitorShow(ISmartSession session, string argument)
        {
            string subIdentify = null;

            try
            {
                //MonitorShowSettings setting = GetMonitorShowSettings();
                //if (setting == null)
                //    return ;
                //MonitorShowSettings.CurrentSettings = setting;
                MonitorShowDisplay msd   = new MonitorShowDisplay();
                string             fname = msd.DisplayMonitorBitmap(session, argument, out subIdentify);
                if (string.IsNullOrEmpty(fname))
                {
                    return;
                }
                IExtractResult er = new FileExtractResult(subIdentify, fname) as IExtractResult;
                if (er == null)
                {
                    return;
                }
                DisplayResultClass.DisplayResult(session, null, er, false);
            }
            finally
            {
                //if (MonitorShowSettings.CurrentSettings != null)
                //    MonitorShowSettings.CurrentSettings = null;
            }
        }
예제 #4
0
파일: UITabASL.cs 프로젝트: windygu/hispeed
 public void Init(ISmartSession session, params object[] arguments)
 {
     this._session = session;
     CreateThemeGraphRegionButton();
     CreateClose();
     SetImage();
 }
예제 #5
0
 private void Load_firstPageContent(ISmartSession smartSession)
 {
     _firstPageContent      = new UCClousatSingleProfile(smartSession);
     _firstPageContent.Dock = DockStyle.Fill;
     this.Text = _firstPageContent.Text;
     this.Controls.Add(_firstPageContent);
 }
예제 #6
0
        public Producter()
        {
            frmMainForm mainForm = new frmMainForm(new StartProgress());

            _session = mainForm.Session;
            _context = new ContentText();
        }
예제 #7
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());
        }
예제 #8
0
 private void Load_firstPageContent(ISmartSession smartSession)
 {
     _firstPageContent      = new UCGbalFireCorrect(smartSession);
     _firstPageContent.Dock = DockStyle.Fill;
     this.Text = "全球火点修正";
     this.Controls.Add(_firstPageContent);
 }
예제 #9
0
        public void Init(ISmartSession session, params object[] arguments)
        {
            _session = session;

            _layerManager.Image    = _session.UIFrameworkHelper.GetImage("system:layermanager.png");
            _removeAll.Image       = _session.UIFrameworkHelper.GetImage("system:exit32.png");
            _removeRef.Image       = _session.UIFrameworkHelper.GetImage("system:wydclear.png");
            _adminRegion.Image     = _session.UIFrameworkHelper.GetImage("system:wydxzqy.png");
            _rivers.Image          = _session.UIFrameworkHelper.GetImage("system:wydhlhp2.png");
            _lonlatGrid.Image      = _session.UIFrameworkHelper.GetImage("system:wydwg1.png");
            _rasterMap.Image       = _session.UIFrameworkHelper.GetImage("system:wydOther1.png");
            _otherRaster.Image     = _session.UIFrameworkHelper.GetImage("system:otherRaster.png");
            _newInterestArea.Image = _session.UIFrameworkHelper.GetImage("system:wydgzqy2.png");
            _bookMarkGroups.Image  = _session.UIFrameworkHelper.GetImage("system:wydzdsy3.png");
            //_seaiceInter.Image = _session.UIFrameworkHelper.GetImage("system:wydhbgzq1.png");
            _definedSplit.Image                = _session.UIFrameworkHelper.GetImage("system:wydgrid2.png");
            _newSplit.Image                    = _session.UIFrameworkHelper.GetImage("system:wydgrid1.png");
            _specialData.Image                 = _session.UIFrameworkHelper.GetImage("system:wydsatelite.png");
            _dataSourceCon.Image               = _session.UIFrameworkHelper.GetImage("system:wydpz.png");
            _addDatasource.Image               = _session.UIFrameworkHelper.GetImage("system:wydmoredata.png");
            _addAOITemplate.Image              = _session.UIFrameworkHelper.GetImage("system:Extracting_导入AOI.png");
            _btnApplyDefatultBkgrdLayer.Image  = _session.UIFrameworkHelper.GetImage("system:DataRef_DefaultBkgrd.png");
            _aoi2maskButton.Image              = _session.UIFrameworkHelper.GetImage("system:AOI_AOI2Mask.png");
            _removeMaskLayer.Image             = _session.UIFrameworkHelper.GetImage("system:AOI_RemoveMask.png");
            _btnRemoveDefatultBkgrdLayer.Image = _session.UIFrameworkHelper.GetImage("system:DataRef_RemoveBkgrd.png");
            _creatBookMarks.Image              = _session.UIFrameworkHelper.GetImage("system:creatBookMark.png");
            _manageBookMarks.Image             = _session.UIFrameworkHelper.GetImage("system:bookMarkManager.png");
            _trafficline.Image                 = _session.UIFrameworkHelper.GetImage("system:Traffic.png");
        }
예제 #10
0
        /// <summary>
        /// 根据所选的文件提取产品标识和子产品标识,自动匹配应该生成的专题图类型,如ndvi
        /// </summary>
        /// <param name="session"></param>
        /// <param name="isCustom"></param>
        /// <param name="multiSelect"></param>
        /// <returns></returns>
        private static IExtractResult CreateThemeGraphyBase(ISmartSession session, string algorithmName, bool isCustom, bool multiSelect)
        {
            IMonitoringSubProduct msp = (session.MonitoringSession as IMonitoringSession).ActiveMonitoringSubProduct;

            if (msp == null)
            {
                return(null);
            }
            object obj = msp.ArgumentProvider.GetArg("SelectedPrimaryFiles");

            //从工作空间中获取选择的文件名
            if (!SetSelectedPrimaryFiles(session, ref obj, msp.ArgumentProvider, algorithmName))
            {
                return(null);
            }
            string[] files = obj as string[];
            if (files == null || files.Length == 0)
            {
                if (File.Exists(obj.ToString()))
                {
                    files = new string[] { obj.ToString() }
                }
                ;
                else
                {
                    return(null);
                }
            }
            //添加对生成专题图文件类型的判断,排除生成的专题图和统计结果文件,add by wangyu,20120923
            foreach (string fname in files)
            {
                CanCreatThemegraph(fname);
            }
            string outFileIdentify = null;
            string templateName    = null;

            GetTemplateName(msp.Definition.SubProductInstanceDefs, files, multiSelect, out outFileIdentify, out templateName);
            if (string.IsNullOrEmpty(outFileIdentify) || string.IsNullOrEmpty(templateName))
            {
                return(null);
            }

            if (isCustom && !SetAOIArugment(files, msp, multiSelect))
            {
                return(null);
            }
            else if (!isCustom)
            {
                msp.ArgumentProvider.SetArg("AOI", null);
            }
            IThemeGraphGenerator tgg = (session.MonitoringSession as IMonitoringSession).ThemeGraphGenerator;

            msp.ArgumentProvider.SetArg("ThemeGraphyGenerator", tgg);
            msp.ArgumentProvider.SetArg("OutFileIdentify", outFileIdentify);
            msp.ArgumentProvider.SetArg("ThemeGraphTemplateName", templateName);
            IExtractResult result = msp.Make(null);

            DisplayResultClass.DisplayResult(session, msp, result, false);
            return(result);
        }
예제 #11
0
 private ThemeGraphRegionFacctory(RadDropDownButtonElement btn, RibbonTab tab, string productIdentify, ISmartSession session)
 {
     _btnSetThemeGraphRegion = btn;
     _tab             = tab;
     _productIdentify = productIdentify;
     _session         = session;
 }
예제 #12
0
 public void Init(ISmartSession session, params object[] arguments)
 {
     _session = session;
     AddThemeGraphRegionBotton();
     AddCloseButton();
     SetImage();
 }
예제 #13
0
        private static IExtractResult StatAnalysisVgt(ISmartSession session, string outFileIdentify, string productTitle, bool isCustom)
        {
            (session.MonitoringSession as IMonitoringSession).ChangeActiveSubProduct("VTAT");
            IMonitoringSubProduct msp = (session.MonitoringSession as IMonitoringSession).ActiveMonitoringSubProduct;

            if (msp == null)
            {
                return(null);
            }
            object obj = msp.ArgumentProvider.GetArg("SelectedPrimaryFiles");

            if (obj == null || !File.Exists(obj.ToString()))
            {
                if (!SetSelectedPrimaryFiles(session, ref obj, msp.ArgumentProvider))
                {
                    return(null);
                }
            }
            msp.ArgumentProvider.SetArg("IsCustom", isCustom);
            if (!string.IsNullOrEmpty(outFileIdentify))
            {
                msp.ArgumentProvider.SetArg("OutFileIdentify", outFileIdentify);
            }
            if (!string.IsNullOrEmpty(productTitle))
            {
                msp.ArgumentProvider.SetArg("ProductTitle", productTitle);
            }
            GetCommandAndExecute(session, 6602);
            return(null);
        }
예제 #14
0
 public CanvasViewer(string text, ISmartSession session)
     : base(text)
 {
     InitializeComponent();
     canvasHost1.Load += new EventHandler(canvasHost1_Load);
     _session          = session;
 }
예제 #15
0
 public frmAddPlugin(ISmartSession session, RadRibbonBarGroup rbgroup)
 {
     InitializeComponent();
     _smartSession = session;
     _rbgroup      = rbgroup;
     InitForm();
 }
예제 #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)
            {
                if (arp.DataProvider != null)
                {
                    _currentRasterFile = arp.DataProvider.fileName;
                }
                object obj = arp.GetArg("SmartSession");
                if (obj != null)
                {
                    _session = obj as ISmartSession;
                }
            }
        }
예제 #17
0
        /// <summary>
        /// 生成动画
        /// </summary>
        /// <param name="session"></param>
        /// <param name="argument">template:沙尘动画示意专题图,动画示意专题图,productIdentify, subProductIdentify</param>
        public static void CreatAVI(ISmartSession session, string argument)
        {
            string[] fnames = GetFilesByWorkspace(session);
            if (fnames == null || fnames.Length == 0)
            {
                return;
            }
            string tempArg         = null;
            string wndName         = null;
            string productIdentify = null;
            string subIdentify     = null;

            ParserArgument(argument, ref tempArg, ref wndName, ref productIdentify, ref subIdentify);
            IAVILayerDisplay aviDis = new AVILayerDisplay();

            if (subIdentify == "CMED")
            {
                aviDis.IsCustom = true;
            }
            string outputFname = null;

            aviDis.DisplayAvi(session, wndName, fnames, tempArg, subIdentify, out outputFname);
            IExtractResult er = new FileExtractResult(subIdentify, outputFname) as IExtractResult;

            if (er == null)
            {
                return;
            }
            DisplayResultClass.DisplayResult(session, null, er, false);
        }
예제 #18
0
 private void TrySetSelectedPrimaryFilesArgs(ISmartSession session, IMonitoringSubProduct subProduct)
 {
     if (!SetSelectedPrimaryFiles(session, subProduct.ArgumentProvider))
     {
         return;
     }
 }
예제 #19
0
        public static string GetEnhanceNameCurDrawing(ISmartSession session)
        {
            if (session.SmartWindowManager == null)
            {
                return(null);
            }
            ICanvasViewer viewer = session.SmartWindowManager.ActiveCanvasViewer;

            if (viewer == null)
            {
                return(null);
            }
            IRasterDrawing drawing = viewer.ActiveObject as IRasterDrawing;

            if (drawing == null)
            {
                return(null);
            }
            IRasterDataProvider raster = drawing.DataProviderCopy;

            if (!EnhancePicture(raster))//如果不是通道数大于3的图片 则不进行图像增强
            {
                return(null);
            }
            IMonitoringSession msession    = session.MonitoringSession as IMonitoringSession;
            string             product     = GetProduct(msession);
            string             enhancePath = FindEnhanceFileNameByRasterFileName(raster, product);

            return(enhancePath);
        }
예제 #20
0
        private static void DisplayFileResult(IMonitoringSubProduct subProduct, ISmartSession session, IExtractResult restult)
        {
            string filename = (restult as IFileExtractResult).FileName;

            RecordFileForAfterProcess(filename);
            IFileExtractResult fileResult = restult as IFileExtractResult;

            if (fileResult.Add2Workspace)
            {
                TrySaveFileToWorkspace(subProduct, session, filename, restult, null);
            }
            if (!(restult as IExtractResultBase).Display)
            {
                return;
            }
            if (NeedOpenFile())
            {
                object   obj  = subProduct.ArgumentProvider.GetArg("fileOpenArgs");
                string[] args = null;
                if (obj != null && !string.IsNullOrEmpty(obj.ToString()))
                {
                    args = new string[] { obj.ToString() }
                }
                ;
                ICommand cmd = session.CommandEnvironment.Get(2000);
                if (cmd != null)
                {
                    cmd.Execute(filename, args);
                }
            }
        }
예제 #21
0
        public bool SetFileArg(ISmartSession session, IArgumentProvider iArgumentProvider, string argName)
        {
            IWorkspace wks = (session.MonitoringSession as IMonitoringSession).Workspace;

            if (wks == null)
            {
                return(false);
            }
            ICatalog catalog = wks.ActiveCatalog;

            if (catalog == null)
            {
                return(false);
            }
            string[] fnames = catalog.GetSelectedFiles();
            if (fnames == null || fnames.Length == 0)
            {
                return(false);
            }
            string selectFileName = Path.GetFileName(fnames[0]);

            if (selectFileName.Contains("BPCD"))
            {
                iArgumentProvider.SetArg(argName, fnames[0]);
                return(true);
            }
            string bpcdName = Path.GetDirectoryName(fnames[0]) + "\\" + selectFileName.Replace("DBLV", "BPCD");

            if (File.Exists(bpcdName))
            {
                iArgumentProvider.SetArg(argName, bpcdName);
            }
            return(true);
        }
예제 #22
0
 public frmImageClip(ISmartSession session)
 {
     InitializeComponent();
     txtInputFile.DoubleClick          += new EventHandler(txtInputFile_DoubleClick);
     txtOutFile.DoubleClick            += new EventHandler(txtOutFile_DoubleClick);
     ucGeoRangeControl1.OnValueChanged += new UCGeoRangeControl.ValueChangedHandler(ucGeoRangeControl1_OnValueChanged);
     SetSession(session);
 }
예제 #23
0
        public frmEqualValueCal(ISmartSession session)
        {
            InitializeComponent();
            ucEqualValueCal evc = new ucEqualValueCal(session);

            this.Controls.Add(evc);
            FormClosed += new FormClosedEventHandler(frmEqualValueCal_FormClosed);
        }
예제 #24
0
        private string GetTempBmpFilename(string filename, ISmartSession session)
        {
            string sugFilename = Path.ChangeExtension(Path.GetFileName(filename), ".png");
            string tempPath    = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Temp");

            //return session.TemporalFileManager.NextTemporalFilename(sugFilename, ".png", null);
            return(Path.Combine(tempPath, sugFilename));
        }
예제 #25
0
 public MonitoringSession(ISmartSession session)
 {
     _session             = session;
     _themeGraphGenerator = new ThemeGraphGenerator(session);
     _filenameGenerator   = new FileNameGeneratorDefault();
     _extractingSession   = new ExtractingSession(session);
     LoadMonitoringTheme();
 }
예제 #26
0
 public void Init(ISmartSession session, params object[] arguments)
 {
     this._session = session;
     CreateSettingGroup();
     CreateqQuickReportRegionButton();
     CreateCloseGroup();
     SetImage();
 }
예제 #27
0
 public CanvasViewer(ISmartSession session)
 {
     InitializeComponent();
     Text              = Guid.NewGuid().ToString();
     Name              = Text;
     canvasHost1.Load += new EventHandler(canvasHost1_Load);
     _session          = session;
 }
예제 #28
0
 private void Load_firstPageContent(ISmartSession smartSession)
 {
     _firstPageContent = new frmGeoCorrection(smartSession);
     // _firstPageContent.ProjectionFinished += new EventHandler(_firstPageContent_CorrectionFinished);
     _firstPageContent.Dock = DockStyle.Fill;
     this.Text = _firstPageContent.Text;
     this.Controls.Add(_firstPageContent);
 }
예제 #29
0
        public static IExtractResult StatAnaylsisBase(ISmartSession session, string outFileIdentify, string aoiTemplate, string subProductIdentify, string algorithmName, bool isCustom, bool multiSelect)
        {
            (session.MonitoringSession as IMonitoringSession).ChangeActiveSubProduct(subProductIdentify);
            GetCommandAndExecute(session, 6602);
            IMonitoringSubProduct msp = (session.MonitoringSession as IMonitoringSession).ActiveMonitoringSubProduct;

            if (msp == null)
            {
                return(null);
            }
            object obj = msp.ArgumentProvider.GetArg("SelectedPrimaryFiles");

            if (!SetSelectedPrimaryFiles(session, ref obj, msp.ArgumentProvider, algorithmName))
            {
                return(null);
            }
            string[] files = obj as string[];
            if (files == null || files.Length == 0)
            {
                if (File.Exists(obj.ToString()))
                {
                    files = new string[] { obj.ToString() }
                }
                ;
                else
                {
                    return(null);
                }
            }
            CoordEnvelope customEnv = null;

            if (isCustom && !SetAOIArugment(files, msp, multiSelect, out customEnv))
            {
                return(null);
            }
            else if (!isCustom)
            {
                msp.ArgumentProvider.SetArg("AOI", string.IsNullOrEmpty(aoiTemplate) ? null : aoiTemplate);
            }
            else
            if (customEnv != null)
            {
                RasterProject.PrjEnvelope prjEnvelope = new RasterProject.PrjEnvelope(customEnv.MinX, customEnv.MaxX, customEnv.MinY, customEnv.MaxY);
                msp.ArgumentProvider.SetArg("UseRegion", prjEnvelope);
            }
            try
            {
                msp.ArgumentProvider.SetArg("FileNameGenerator", (session.MonitoringSession as IMonitoringSession).FileNameGenerator);
                msp.ArgumentProvider.SetArg("OutFileIdentify", outFileIdentify);
                IExtractResult result = msp.Make(null);
                DisplayResultClass.DisplayResult(session, msp, result, false);
                return(result);
            }
            catch
            {
                return(null);
            }
        }
예제 #30
0
        public ucEqualValueCal(ISmartSession session)
        {
            InitializeComponent();
            _session = session;
            InitControls();

            //_onWindowClosed += new EventHandler(IsoLine_FormClosed);
            //FormClosed += new FormClosedEventHandler(IsoLine_FormClosed);
        }