コード例 #1
0
        /// <summary>
        /// 执行合并
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OK_Click(object sender, RoutedEventArgs e)
        {
            ///list<object> 转换成正确类型
            IList <FileNameCustom> currencies = model.FileNameCustoms;

            model.SetPaths(currencies);


            int count = model.FileNameCustoms.Count;

            for (int a = 0; a < count; a++)
            {
                FileNameCustom custom = model.FileNameCustoms[a];
                if (!Utils.CheckFileExists(custom.FilePath))
                {
                    model.FileNameCustoms.RemoveAt(a);
                    a--;
                    count--;
                }
            }
            MyAction myAction = new MyAction(new Action(() =>
            {
                ExcelWrite.MergeExcel(model);
            }), "合并表格", "完成");

            CommHelper.FastTask(myAction);
            SoftwareConfig.SaveRedis(ExcelMergeModel.RedisKey, model);
        }
コード例 #2
0
        public WordReplacePage()
        {
            InitializeComponent();
            model            = SoftwareConfig.GetRedis <WordReplacePageViewModel>(WordReplacePageViewModel.RedisKey);
            model.Fileter    = FileUtils.WordFileter;
            this.DataContext = model;


            //if(model.ReplaceViewModels == null)
            //{
            //
            //}
            model.ReplaceViewModels = new ObservableCollection <ReplaceViewModel>();


            replacePagerPage.SetPagerPage <ReplaceViewModel>(model.ReplaceViewModels, ReplaceCustom.GetWordReplaceFieldCustoms(), true);
            replacePagerPage.HideFloot();

            ReplacePagerPageGrid.Children.Add(replacePagerPage);
            addFilePage.Init(model, model.Fileter);


            ContextMenu menu = new ContextMenu();

            MenuItem lookOldEmploeeItem = new MenuItem();

            lookOldEmploeeItem.Header = "删除";
            lookOldEmploeeItem.Click += DeleteItem_Click;
            menu.Items.Add(lookOldEmploeeItem);
            replacePagerPage.ContextMenu = menu;
        }
コード例 #3
0
        public MapForm()
        {
            ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop);
            InitializeComponent();

            m_menuMap = new ToolbarMenuClass();

            //添加事件
            AddEnvet();
            mapControlTemp           = this.axMapControl1;
            ArcGisUtils.axMapControl = this.axMapControl1;

            ArcGisUtils.axPageLayoutControl = PageLayoutForm.GetInstance().GetAxPageLayoutControl();
            //检查数据库以前是否有
            SoftwareConfig mxdConfig = SoftwareConfig.FindConfig(JTSYQMxdPathReids);

            if (mxdConfig != null)
            {
                if (this.axMapControl1.CheckMxFile(mxdConfig.Value))
                {
                    LoadMXD(mxdConfig.Value);
                    ArcGisUtils.MXDPath = mxdConfig.Value;
                }
                else
                {
                    SoftwareConfig.Delete(JTSYQMxdPathReids);
                }
            }
        }
コード例 #4
0
        public static string[][] GetHibernateDM()
        {
            HibernateUtils hibernate = HibernateUtils.GetInstance();

            string[][]     array    = new string[2][];
            SoftwareConfig expanded = hibernate.FindEntityById <SoftwareConfig>("xzdmExpanded");
            SoftwareConfig selected = hibernate.FindEntityById <SoftwareConfig>("xzdmSelected");

            if (expanded == null)
            {
                array[0] = new string[0];
            }
            else
            {
                array[0] = expanded.Value.Split('、');
                //删除数据库中的,因为每次关闭软件会重新保存
                hibernate.DeleteEntity(expanded);
            }
            if (selected == null)
            {
                array[1] = new string[0];
            }
            else
            {
                array[1] = selected.Value.Split('、');
                hibernate.DeleteEntity(selected);
            }

            return(array);
        }
コード例 #5
0
 public ExcelMergePage()
 {
     InitializeComponent();
     model            = SoftwareConfig.GetRedis <ExcelMergeModel>(ExcelMergeModel.RedisKey);
     this.DataContext = model;
     //filePagerPage.SetPagerPage<FileNameCustom>(model.FileNameCustoms, FileNameCustom.GetFieldCustoms());
     filePagerPage.Init(model, FileUtils.ExcelFileter);
 }
コード例 #6
0
        public TifToImagePage()
        {
            InitializeComponent();
            MapForm mapForm = MapForm.GetInstance();

            axMapControl = MapForm.GetAxMapControl();
            model        = SoftwareConfig.GetRedis <TifToImageViewModel>(TifToImageViewModel.RedisKey);
            filePagerPage.Init(model, "TIF|*.tif;");
            this.DataContext = model;
        }
コード例 #7
0
        /// <summary>
        /// 添加文档
        /// </summary>
        /// <param name="mxdFile"></param>
        public void LoadMXD(string mxdFile)
        {
            //axMapControl1.LoadMxFile(mxdFile);
            mapDocument = new MapDocumentClass();

            mapDocument.Open(mxdFile);
            axMapControl1.Map = mapDocument.Map[0];
            axMapControl1.Refresh();
            //mxdfile 路径 写入数据库
            SoftwareConfig.Refresh(JTSYQMxdPathReids, mxdFile);
        }
コード例 #8
0
        public ZJDExportDataPage(ZJDDataSourceViewModel DataSourceViewModel)
        {
            InitializeComponent();


            var jsydCustom = JSYDPagerPageViewModel.GetViewModel(zjdController.GetJSYD(DataSourceViewModel));

            pagerPage.SetPagerPage <JSYDPagerPageViewModel>(jsydCustom, JSYDPagerPageViewModel.GetFieldCustoms(), true, true);
            pagerPage.SetDataSourceViewModel(DataSourceViewModel);

            model            = SoftwareConfig.GetRedis <ZJDExportDataViewModel>(ZJDExportDataViewModel.RedisKey);
            this.DataContext = model;
        }
コード例 #9
0
ファイル: ZJDDataSourcePage.xaml.cs プロジェクト: YB9527/CG
        public ZJDDataSourcePage()
        {
            InitializeComponent();
            model = SoftwareConfig.GetRedis <ZJDDataSourceViewModel>(ZJDDataSourceViewModel.RedisKey);


            pagerPage.SetPagerPage <DirPagerCustom>(model.DirPagerCustoms, DirPagerCustom.GetFieldCustoms());
            pagerPage.HideFloot();
            this.DataContext = model;
            pagerPage.AddObject(model.DirPagerCustoms);
            this.pagerPageGird.Children.Add(pagerPage);
            pagerPage.GetTabGrid().MouseDoubleClick += PagerPage_DBClick;
        }
コード例 #10
0
        public static ExportDataPageViewModel GetRedis()
        {
            SoftwareConfig config = SoftwareConfig.FindConfig(ExportDataPageRides);

            if (config != null)
            {
                ExportDataPageViewModel model = JObejctReflect.ToObejct <ExportDataPageViewModel>(config.Value);
                return(model);
            }
            else
            {
                return(new ExportDataPageViewModel());
            }
        }
コード例 #11
0
        public void ClassToXml()
        {
            string         startupPath      = System.IO.Path.GetFullPath(@"..\..\..\..\");
            HardwareConfig m_list           = XmlHandler.XmlReader <HardwareConfig>(startupPath + @"HardwareConfig.xml");
            SoftwareConfig mySoftwareConfig = XmlHandler.XmlReader <SoftwareConfig>(startupPath + @"SoftwareConfig.xml");


            Dictionary <string, string> myTestDictionary = new Dictionary <string, string>();

            foreach (SoftwareConfigPathsFile item in mySoftwareConfig.paths.installedFonts)
            {
                myTestDictionary.Add(item.type, item.Value);
            }
        }
コード例 #12
0
ファイル: ReplacePage.xaml.cs プロジェクト: YB9527/CG
        public ExcelReplacePage()
        {
            InitializeComponent();
            model            = SoftwareConfig.GetRedis <RepalcePageViewModel>(RepalcePageViewModel.RedisKey);
            this.DataContext = model;

            //IList<ReplaceViewModel> test = new List<ReplaceViewModel>();
            //test.Add(new ReplaceViewModel { OldText = "1", NewText = "345", Rel = Relation.Contains });
            //model.ReplaceViewModels = test;

            replacePagerPage.SetPagerPage <ReplaceViewModel>(model.ReplaceViewModels, ReplaceCustom.GetFieldCustoms(), true);
            replacePagerPage.HideFloot();
            ReplacePagerPageGrid.Children.Add(replacePagerPage);

            filePagerPage.Init(model, FileUtils.ExcelFileter);
        }
コード例 #13
0
ファイル: FileConfigPageViewModel.cs プロジェクト: YB9527/CG
        public static FileConfigPageViewModel GetRedis()
        {
            SoftwareConfig config = SoftwareConfig.FindConfig(FileConfigPageRides);

            if (config != null)
            {
                FileConfigPageViewModel model = JObejctReflect.ToObejct <FileConfigPageViewModel>(config.Value);
                if (!MyUtils.Utils.CheckFileExists(model.PhotoExcelPath))
                {
                    model.PhotoExcelPath = "";
                }

                return(model);
            }
            else
            {
                return(new FileConfigPageViewModel());
            }
        }
コード例 #14
0
        private void Ok_Click(object sender, RoutedEventArgs e)
        {
            IList <FileNameCustom> list = filePagerPage.GetAllList();

            if (MyUtils.Utils.CheckListExists(list))
            {
                model.Files = new ObservableCollection <FileNameCustom>();
                foreach (FileNameCustom fileNameCustom in list)
                {
                    model.Files.Add(fileNameCustom);
                }
                //执行转换
                TifToImage(model.Files, model.SaveDir);
            }
            else
            {
                MessageBox.Show("没有数据可转换!!!");
            }
            SoftwareConfig.SaveRedis(TifToImageViewModel.RedisKey, model);
        }
コード例 #15
0
        /// <summary>
        /// 导出资料
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OK_Click(object sender, RoutedEventArgs e)
        {
            SoftwareConfig.SaveRedis(ZJDExportDataViewModel.RedisKey, model);
            if (!MyUtils.Utils.CheckDirExists(model.SaveDir))
            {
                MessageBox.Show("没有选择保存的文件夹!!!");
                return;
            }

            IList <JSYDPagerPageViewModel> jsydCustoms = pagerPage.GetChekedAll <JSYDPagerPageViewModel>();
            IList <JSYD> jsyds = new List <JSYD>();

            foreach (JSYDPagerPageViewModel custom in jsydCustoms)
            {
                jsyds.Add(custom.JSYD);
            }

            zjdController.ExportZJD(jsyds, model);
            MessageBox.Show("导出完成");
            ;
        }
コード例 #16
0
        private void Check_Click(object sender, RoutedEventArgs e)
        {
            List <MyAction> actions = new List <MyAction>();

            SoftwareConfig.SaveRedis(JTSYQCheckDataViewModel.RedisKey, model);
            IList <JTSYQ> jtsyqs = MainWindow.mainWindow.GetSelectJTSYQS();

            if (!MyUtils.Utils.CheckListExists(jtsyqs))
            {
                MessageBox.Show("你还没有选择行政区!!!");
                return;
            }

            if (model.BasicData)
            {
                actions.AddRange(JTSYQCustom.CheckDataActions(jtsyqs));
            }
            if (model.Angle)
            {
                actions.AddRange(JTSYQCustom.CheckAngle(jtsyqs, model.AngleValue));
            }
            SingleTaskForm taskForm = new SingleTaskForm(actions, "检查");
        }
コード例 #17
0
ファイル: FileHelper.cs プロジェクト: Mds92/ChiDaram
 public static string GetTempFolderPath(SoftwareConfig softwareConfig)
 {
     return(ZlpPathHelper.Combine(softwareConfig.WebRootPath, Constants.UploadFolderNameTemp));
 }
コード例 #18
0
ファイル: ZJDDataSourcePage.xaml.cs プロジェクト: YB9527/CG
 private void Save_Click(object sender, RoutedEventArgs e)
 {
     model.DirPagerCustoms = pagerPage.GetAllList <DirPagerCustom>();
     SoftwareConfig.SaveRedis(ZJDDataSourceViewModel.RedisKey, model);
 }
コード例 #19
0
 private void SaveRedis_Click(object sender, RoutedEventArgs e)
 {
     SoftwareConfig.SaveRedis(WordReplacePageViewModel.RedisKey, model);
 }
コード例 #20
0
        public void SaveRedis()
        {
            string str = ReflectManager.JObejctReflect.ObjectToStr(this);

            SoftwareConfig.Refresh(ExportDataPageRides, str);
        }
コード例 #21
0
ファイル: ReplacePage.xaml.cs プロジェクト: YB9527/CG
 private void SaveRedis_Click(object sender, RoutedEventArgs e)
 {
     model.Files = filePagerPage.GetAllList();
     SoftwareConfig.SaveRedis(RepalcePageViewModel.RedisKey, model);
 }
コード例 #22
0
 public JTSYQCheckDataPage()
 {
     InitializeComponent();
     model            = SoftwareConfig.GetRedis <JTSYQCheckDataViewModel>(JTSYQCheckDataViewModel.RedisKey);
     this.DataContext = model;
 }
コード例 #23
0
 private void SaveRedis_Click(object sender, RoutedEventArgs e)
 {
     SoftwareConfig.SaveRedis(ZJDExportDataViewModel.RedisKey, model);
 }
コード例 #24
0
 public SwaggerSecurityDocumentFilter(IHttpContextAccessor httpContextAccessor, SoftwareConfig softwareConfig)
 {
     _httpContextAccessor = httpContextAccessor;
     _softwareConfig      = softwareConfig;
 }