public override void OnClick() { MyIODATA_FRM myIODATA_FRM = new MyIODATA_FRM(); if (myIODATA_FRM.ShowDialog() != DialogResult.OK) { return; } ISODataClassification_Exchange_Info iSODataClassification = new ISODataClassification_Exchange_Info(); iSODataClassification = MyIODATA_FRM.ISODataParams; ISODataClassificationAlgo iSODataClassificationAlgo = new ISODataClassificationAlgo { Params = iSODataClassification }; AlgoFactory.Instance().AsynExecuteAlgo(iSODataClassificationAlgo); ISystemAlgoEvents systemAlgoEvents = iSODataClassificationAlgo as ISystemAlgoEvents; systemAlgoEvents.OnExecuteCompleted += OnAlgoExecuteCompleted; //systemAlgoEvents.OnProgressChanged += OnAlgoProgresChanged; //PIE.AxControls.IStatusBar statusBar = m_Application.StatusBar; //statusBar.ShowProgress(0, 100, ""); //Application.DoEvents(); ProgressBar progressBar = new ProgressBar(); }
private void OnAlgoExecuteCompleted(ISystemAlgo algo) { ILayer layer = LayerFactory.CreateDefaultLayer(ISODATA_FRM.ISODataParams.OutputFilePath); m_HookHelper.FocusMap.AddLayer(layer); m_HookHelper.ActiveView.PartialRefresh(ViewDrawPhaseType.ViewAll); ISystemAlgoEvents algoEvents = algo as ISystemAlgoEvents; algoEvents.OnExecuteCompleted -= OnAlgoExecuteCompleted; algoEvents.OnProgressChanged -= OnAlgoProgresChanged; MainForm.parentForm.myProgressBar.Value = 0; MainForm.parentForm.myLabel.Text = ""; }
private void OnAlgoExecuteCompleted(ISystemAlgo algo) { //ISODataClassification_Exchange_Info exchange_Info = new ISODataClassification_Exchange_Info(); //IRasterDataset rasterDataset = DatasetFactory.OpenRasterDataset(exchange_Info.OutputFilePath, OpenMode.ReadOnly) as IRasterDataset; //ILayer layer = LayerFactory.CreateDefaultRasterLayer(rasterDataset) as ILayer; ILayer layer = LayerFactory.CreateDefaultLayer(MyIODATA_FRM.ISODataParams.OutputFilePath); //IMap map = m_HookHelper.FocusMap; // map.AddLayer(layer); m_HookHelper.FocusMap.AddLayer(layer); m_HookHelper.ActiveView.PartialRefresh(ViewDrawPhaseType.ViewAll); ISystemAlgoEvents algoEvents = algo as ISystemAlgoEvents; algoEvents.OnExecuteCompleted -= OnAlgoExecuteCompleted; //algoEvents.OnProgressChanged -= OnAlgoProgresChanged; }
public override void OnClick() { FrmKmeansClassification frmKmeansClassification = new FrmKmeansClassification(); if (frmKmeansClassification.ShowDialog() != DialogResult.OK) return; KmeansClassification_Exchange_Info KmeansClassification = new KmeansClassification_Exchange_Info(); KmeansClassification = frmKmeansClassification.ExChangeData; KmeansClassificationAlgo kmeansClassificationAlgo = new KmeansClassificationAlgo { Params = KmeansClassification }; Application.DoEvents(); AlgoFactory.Instance().AsynExecuteAlgo(kmeansClassificationAlgo); ISystemAlgoEvents systemAlgoEvents = kmeansClassificationAlgo as ISystemAlgoEvents; systemAlgoEvents.OnExecuteCompleted += OnAlgoExecuteCompleted; systemAlgoEvents.OnProgressChanged += OnAlgoProgresChanged; }
public override void OnClick() { PCAfusion_FRM pCAfusion_FRM = new PCAfusion_FRM(); if (pCAfusion_FRM.ShowDialog() != DialogResult.OK) { return; } Pansharp_Exchange_Info PCAfusionParams = new Pansharp_Exchange_Info(); PCAfusionParams = PCAfusion_FRM.PCAfusionParam; PansharpFuseAlgo PCAfusionAlgo = new PansharpFuseAlgo { Params = PCAfusionParams }; Application.DoEvents(); AlgoFactory.Instance().AsynExecuteAlgo(PCAfusionAlgo); ISystemAlgoEvents systemAlgoEvents = PCAfusionAlgo as ISystemAlgoEvents; systemAlgoEvents.OnExecuteCompleted += OnAlgoExecuteCompleted; systemAlgoEvents.OnProgressChanged += OnAlgoProgresChanged; }
public override void OnClick() { Form_KMeans form_KMeans = new Form_KMeans(); if (form_KMeans.ShowDialog() != DialogResult.OK) { return; } KmeansClassification_Exchange_Info exchange_Info = new KmeansClassification_Exchange_Info(); exchange_Info = Form_KMeans.KMeansParam; KmeansClassificationAlgo kmeansAlgo = new KmeansClassificationAlgo { Params = exchange_Info }; Application.DoEvents(); AlgoFactory.Instance().AsynExecuteAlgo(kmeansAlgo); ISystemAlgoEvents systemAlgoEvents = kmeansAlgo as ISystemAlgoEvents; systemAlgoEvents.OnExecuteCompleted += OnAlgoExecuteCompleted; systemAlgoEvents.OnProgressChanged += OnAlgoProgresChanged; }
public override void OnClick() { Neural_FRM neural_From = new Neural_FRM(); if (neural_From.ShowDialog() != DialogResult.OK) { return; } NeuralNetworkCluster_Exchange_Info neuralNet = new NeuralNetworkCluster_Exchange_Info(); neuralNet = Neural_FRM.NeuralEx; //访问静态成员 NeuralNetworkClusterAlgo neuralN_Algo = new NeuralNetworkClusterAlgo { Params = neuralNet }; AlgoFactory.Instance().AsynExecuteAlgo(neuralN_Algo); ISystemAlgoEvents systemAlgoEvents = neuralN_Algo as ISystemAlgoEvents; systemAlgoEvents.OnExecuteCompleted += OnAlgoExecuteCompleted; ///?? systemAlgoEvents.OnProgressChanged += OnAlgoProgresChanged; }
public override void OnClick() { ISODATA_FRM myIODATA_FRM = new ISODATA_FRM(); if (myIODATA_FRM.ShowDialog() != DialogResult.OK) { return; } ISODataClassification_Exchange_Info iSODataClassification = new ISODataClassification_Exchange_Info(); iSODataClassification = ISODATA_FRM.ISODataParams; ISODataClassificationAlgo iSODataClassificationAlgo = new ISODataClassificationAlgo { Params = iSODataClassification }; Application.DoEvents(); AlgoFactory.Instance().AsynExecuteAlgo(iSODataClassificationAlgo); ISystemAlgoEvents systemAlgoEvents = iSODataClassificationAlgo as ISystemAlgoEvents; systemAlgoEvents.OnExecuteCompleted += OnAlgoExecuteCompleted; systemAlgoEvents.OnProgressChanged += OnAlgoProgresChanged; }