} //eczaneler için public void RunCMD() { string cmd = "cmd"; string enter = "/c"; string exe = " ogr2ogr -f \"GeoJSON\" -t_srs WGS84 " + "C:\\json\\ilce42.json " + "C:\\ilce42.TAB"; try { Process p = new Process(); p.StartInfo = new ProcessStartInfo(cmd, enter + exe); p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.Start(); p.WaitForExit(); } catch (Exception) { //string script1 = "alert('Dosya/Dosyalar Yüklenemiyor !');"; //ClientScript.RegisterClientScriptBlock(this.GetType(), "Alert1", script1, true); } string json = ReadJSON("C:\\json\\ilce42.json"); string str = "ilce(" + json + ");"; ResourceManager1.AddScript(str); } //ilçeler için
protected void OnStartLongAction(object sender, DirectEventArgs e) { CurrentStep = 0; prgProcess.Text = ""; ThreadPool.QueueUserWorkItem(LongAction); ResourceManager1.AddScript("{0}.startTask('longactionprogress');", TaskManager1.ClientID); }
protected void RefreshProgress(object sender, DirectEventArgs e) { int progress = CurrentStep; if (progress >= 0) { prgProcess.UpdateProgress(((int)progress) / 10f, string.Format("Step {0} of {1}...", progress.ToString(), 10)); } else if (progress == -2) { ResourceManager1.AddScript("{0}.stopTask('longactionprogress');", TaskManager1.ClientID); prgProcess.UpdateProgress(1, "Task is Cancel!"); } else { ResourceManager1.AddScript("{0}.stopTask('longactionprogress');", TaskManager1.ClientID); prgProcess.UpdateProgress(1, "All finished!"); } }