Exemplo n.º 1
0
 void multiTask_CreatingTaskChanged(CheckTask curTask)
 {
     m_GifProgress = new Hy.Common.UI.XGifProgress();
     m_GifProgress.ShowHint(string.Format("正在创建任务“{0}”…", curTask.Name));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Sets the task.
        /// </summary>
        /// <param name="task">The task.</param>
        public void SetTask(CheckTask task)
        {
            XGifProgress progressbar = new XGifProgress();
            try
            {

                //���taskΪnull����Ϊ�ͷ���Դ
                if (task == null)
                {
                    UCDispose();
                    return;
                }

                //�����Ϊ�գ�������
                m_CurrentTask = task;

                //������½�������
                progressbar.ShowHint("���ڴ򿪵�ǰ�ʼ�����.....");
                //��ʼ��������

                this.ucRulesTree.CurrentSchemaId = task.SchemaID;
                this.ucRulesTree.CurrentTaskName = task.Name;
                //����ί�У��ڴ����˿ؼ����߳��ϵ��ü���tree��������ֹ���֡���ǰ�������������ط�ʹ�á��Ĵ���;
                LoadRules Load = new LoadRules(this.ucRulesTree.LoadRulesTree);
                this.BeginInvoke(Load);

                this.ucResult.CurrentTask = m_CurrentTask;
                if (File.Exists(task.GetMXDFile()))
                {
                    //�����õ�mxdģ��ͼ��
                    UcMap.LoadMxFile(task.GetMXDFile());
                    TocControl.SetBuddyControl(UcMap.Object);
                    TocControl.Update();
                    UcMap.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null);
                    m_MapLayersController = new MapLayersController(UcMap.Map);
                }
                else
                {
                    progressbar.Hide();
                    MessageBoxApi.ShowErrorMessageBox(task.GetMXDFile() + "�����ڣ��޷��򿪴�����");
                    return;
                }
                //���ؽ��
                if (task.ResultConnection != null)
                {
                    //�����Ѿ������ɵ�����
                    this.TabCtrl.ShowTabHeader = DefaultBoolean.True;
                    this.TabCtrl.SelectedTabPage = this.TabPageCheckResults;
                    this.ucResultsTree.CurrentSchemaId = task.SchemaID;
                    this.ucResultsTree.CurrentTaskName = task.Name;
                    Sundary.ResultDbOper resultOper = new Hy.Check.UI.UC.Sundary.ResultDbOper(task.ResultConnection);
                    this.ucResultsTree.LayersResultsDt = resultOper.GetLayersResults();
                    this.ucResultsTree.ResultsDt = resultOper.GetAllResults();
                    this.ucResultsTree.CheckResultsCount = resultOper.GetResultsCount();
                    this.ucResultsTree.LoadResultsTree();

                }
                else
                {
                    TabCtrl.SelectedTabPage = this.TabPageRules;
                    this.TabCtrl.ShowTabHeader = DefaultBoolean.False;
                    this.ucResultsTree.CurrentTreeList.Nodes.Clear();
                }
                //����top����ͼ�㵽map
                if (task.TopoWorkspace != null)
                {
                    //��ȡ��ǰ�����ӿ��е�ͼ�㼯��
                    m_pDatasetSon = TopoOperAPI.GetCurrentSonDataSet(task.TopoWorkspace as IFeatureWorkspace);
                    // ��ȡ�ӿ������е�Ҫ���������
                    TopoOperAPI.GetFcTopoNameInSon(UcMap, task.TopoWorkspace as IFeatureWorkspace, m_pDatasetSon);
                }
                this.dockTree.Visibility = DockVisibility.Visible;
                this.dockTree.Text = "�����б�";
                this.dockTree.Width = 260;
                this.dockLegend.Visibility = DockVisibility.Visible;
            }
            catch (Exception ex)
            {
                progressbar.Hide();
                //GT_CONST.LogAPI.CheckLog.AppendErrLogs(ex.Message);
                XtraMessageBox.Show("�򿪽����ʧ�ܣ�", "��ʾ");
            }
            finally
            {
                progressbar.Hide(); //�رմ򿪽������ȷ���
            }
        }
Exemplo n.º 3
0
 void multiTask_CreatingTaskChanged(CheckTask curTask)
 {
     m_GifProgress = new Hy.Common.UI.XGifProgress();
     m_GifProgress.ShowHint(string.Format("正在创建任务“{0}”…", curTask.Name));
 }