Ejemplo n.º 1
0
        private void btnExport_Click(object sender, EventArgs e)
        {
            try
            {
                List <string> lstFields = new List <string>();
                List <string> lstNames  = new List <string>();
                for (int i = 0; i < gridRes.ColumnCount; i++)
                {
                    lstFields.Add(gridRes.Columns[i].HeaderText);
                    lstNames.Add(gridRes.Columns[i].Name);
                }

                frmFields frm = new frmFields();
                frm.lstSourceFields = lstFields;
                frm.lstSourceNames  = lstNames;
                frm.ShowDialog();
                if (frm.DialogResult != DialogResult.OK)
                {
                    return;
                }

                lstFields = frm.lstTagFields;

                ModCommon.ExportDataGridview(this.gridRes, lstFields, "占地面积" + DateTime.Now.ToString("yyyyMMdd"));
            }
            catch (Exception ex)
            {
                MessageBox.Show("请确认已经安装Microsoft Office Excel 2003" + Environment.NewLine + "错误信息:" + ex.Message, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Ejemplo n.º 2
0
        public override void OnClick()
        {
            if (_AppHk == null)
            {
                return;
            }
            if (_AppHk.MainUserControl == null)
            {
                return;
            }
            if (_AppHk.MapControl.LayerCount == 0)
            {
                MessageBox.Show("未加载数据!", "提示!"); return;
            }

            string LinBanLayerKey = "", LinBanCodeField = "", XzqField = "";

            string playerTreePath = Application.StartupPath + "\\..\\res\\xml\\展示图层树.xml";
            string strConfigPath  = Application.StartupPath + "\\..\\res\\xml\\林班号查询.xml";

            CopyConfigXml("最大林斑号", strConfigPath);

            GetConfig(strConfigPath, out LinBanLayerKey, out LinBanCodeField, out XzqField);

            IFeatureClass _LinBanFeatureClass = SysCommon.ModSysSetting.GetFeatureClassByNodeKey(Plugin.ModuleCommon.TmpWorkSpace, playerTreePath, LinBanLayerKey);

            if (_LinBanFeatureClass == null)
            {
                MessageBox.Show("未添加林斑数据!", "提示!"); return;
            }
            ModCommon.DoEightStatistics(_LinBanFeatureClass, "xbmj");
            MessageBox.Show("统计成功!", "提示");
        }
Ejemplo n.º 3
0
        public override void OnLoad(Harmony harmony)
        {
            ModCommon.Init("Piped Deodorizer");
            PUtil.InitLibrary();

            base.OnLoad(harmony);
        }
Ejemplo n.º 4
0
        public override void OnLoad(Harmony harmony)
        {
            ModCommon.Init("Threshold Walls");
            PUtil.InitLibrary();

            ModFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            base.OnLoad(harmony);
        }
Ejemplo n.º 5
0
        public override void OnClick()
        {
            if (_AppHk == null)
            {
                return;
            }
            if (_AppHk.MainUserControl == null)
            {
                return;
            }
            if (_AppHk.MapControl.LayerCount == 0)
            {
                DevComponents.DotNetBar.MessageBoxEx.Show("未加载数据!", "提示!"); return;
            }

            string LinBanLayerKey = "", LinBanCodeField = "", XzqField = "";

            string playerTreePath = Application.StartupPath + "\\..\\res\\xml\\展示图层树0.xml";
            string strConfigPath  = Application.StartupPath + "\\..\\res\\xml\\林班号查询.xml";

            SysCommon.ModSysSetting.CopyConfigXml(Plugin.ModuleCommon.TmpWorkSpace, "最大林斑号", strConfigPath); //20130312 ygc 复制配置树到相应的位置
            SysCommon.ModSysSetting.CopyLayerTreeXmlFromDataBase(Plugin.ModuleCommon.TmpWorkSpace, playerTreePath);
            GetConfig(strConfigPath, out LinBanLayerKey, out LinBanCodeField, out XzqField);

            IFeatureClass _LinBanFeatureClass = SysCommon.ModSysSetting.GetFeatureClassByNodeKey(Plugin.ModuleCommon.TmpWorkSpace, playerTreePath, LinBanLayerKey);

            try
            {
                System.IO.File.Delete(strConfigPath);
                System.IO.File.Delete(playerTreePath);
            }
            catch
            { }
            if (_LinBanFeatureClass == null)
            {
                DevComponents.DotNetBar.MessageBoxEx.Show("未添加林斑数据!", "提示!"); return;
            }
            //添加进度条 ygc 2012-10-8
            SysCommon.CProgress vProgress = new SysCommon.CProgress();
            vProgress.ShowDescription    = true;
            vProgress.ShowProgressNumber = true;
            vProgress.TopMost            = true;
            vProgress.EnableCancel       = false;
            vProgress.EnableUserCancel(false);
            vProgress.MaxValue       = 9;
            vProgress.ProgresssValue = 0;
            vProgress.Step           = 1;
            vProgress.ShowProgress();
            vProgress.SetProgress("正在进行八大类总体统计");
            ModCommon.DoEightStatistics(_LinBanFeatureClass, "xbmj", vProgress);
            vProgress.Close();
            //MessageBox.Show("统计成功!", "提示");
            DevComponents.DotNetBar.MessageBoxEx.Show("统计成功!", "提示");
        }
Ejemplo n.º 6
0
        public override void OnLoad(Harmony harmony)
        {
            ModCommon.Init("Permeable Plastic Tiles");

            base.OnLoad(harmony);
        }
Ejemplo n.º 7
0
        public override void OnLoad(Harmony harmony)
        {
            ModCommon.Init("Soggy Carpet");

            base.OnLoad(harmony);
        }