protected override bool Run(string folderPath)
 {
     ProgressWait wait = new ProgressWait("区位可达性");
     Hashtable para=new Hashtable()
     {
         {"wait",wait},{"folderPath",folderPath},{"ret",false}
     };
     Thread t=new Thread(new ParameterizedThreadStart(Run));
     t.Start(para);
     wait.ShowDialog();
     t.Abort();
     return (bool) para["ret"];
 }
Ejemplo n.º 2
0
        private bool WriteCityRaster(string folderPath)
        {
            ProgressWait wait = new ProgressWait("计算(已开通)空间可达性");
            Hashtable para = new Hashtable()
            {
                {"wait",wait},{"folderPath",folderPath},{"ret",false}
            };
            Thread t = new Thread(new ParameterizedThreadStart(Run));
            t.Start(para);
            wait.ShowDialog();
            t.Abort();
            return (bool)para["ret"];   

        }
 private bool SetTimeCost(string shapeFilePath, string typeField, string targetField)
 {
     if (!FieldsCheck(shapeFilePath, typeField,targetField))
     {
         Messenger.Default.Send(new GenericMessage<string>(string.Format("{0}shape文件缺少{1}和{2}",shapeFilePath,typeField,targetField))
             , "ArgumentError");
         return false;
     }
     var wait = new ProgressWait("计算时间成本");
     Hashtable para = new Hashtable()
     {
         {"shapeFilePath",shapeFilePath},{"typeField",typeField},{"targetField",targetField}
         ,{"wait",wait},{"ret",false}
     };
     Thread t = new Thread(new ParameterizedThreadStart(TimeCostRun));
     t.Start(para);
     wait.ShowDialog();
     t.Abort();
     return (bool)para["ret"];
 }