topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday May 16, 2025, 8:37 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Recent Posts

Pages: prev1 ... 56 57 58 59 60 [61] 62 63 64 65 66 ... 122next
1501
Kyrathaba Software / Re: Kyrathasoft Internet Connection Test Demo
« Last post by kyrathaba on February 07, 2012, 12:51 PM »
Good link, app!

Yeah, my own program's try to download a small text file from a particular DC URL. If successful, then obviously both (a) my local network access if functional and (b) DC is up (or at least that particular DM subdomain is available).
1502
LOL!! Just watched the TSA satire vid  ;D
1504
Living Room / Re: Anonymous on FBI Phone Call
« Last post by kyrathaba on February 07, 2012, 07:25 AM »
Hilarious!  ;D
1505
Kyrathaba Software / Re: Kyrathasoft Internet Connection Test Demo
« Last post by kyrathaba on February 07, 2012, 07:11 AM »
Guess you never actually saw this error?:

Formatted for C# with the GeSHI Syntax Highlighter [copy or print]

    MessageBox.Show("You currently are not connected to the Internet.", "Cannot check for update");


So far, I've only seen that when my wireless adapter was unplugged, or I deliberately turned off the router. But it should work if there's ever a temporary ISP service outage, shouldn't it?
1506
Kyrathaba Software / Re: Kyrathasoft Internet Connection Test Demo
« Last post by kyrathaba on February 05, 2012, 04:47 PM »
Good point. I suppose what we could say is that if this function fails, you definitely do not have an internet connection. If it passes you might have a connection.  Having experimented with this quite a bit, I'll share the complete method I have that gets invoked when one of my program attempts to discover if an update is available. This works reliably for me:

Code: C# [Select]
  1. if (!kyr.networkIsUp()) {
  2.                 MessageBox.Show("You currently are not connected to the Internet.", "Cannot check for update");
  3.                 return;
  4.             }
  5.  
  6.             string msg = string.Empty;
  7.             string pathLastSuccessfullyCheckedForUpdate = Path.Combine(specFldrAppData, "lastUpdateCheck.txt");          
  8.  
  9.             if (System.IO.File.Exists(Path.Combine(specFldrAppData + "updateURL.txt"))) {
  10.                 try {
  11.                     updateToolStripMenuItem.Enabled = false;
  12.                     Cursor = Cursors.WaitCursor;
  13.                     this.Text = "Checking for update...";
  14.                     string url = string.Empty;
  15.                     using (StreamReader sr = new StreamReader(Path.Combine(specFldrAppData + "updateURL.txt"))) {
  16.                         url = sr.ReadLine();                        
  17.                     }
  18.                    
  19.                     WebClient client = new WebClient();
  20.                     try {
  21.                         client.DownloadFile(url, specFldrAppData + "temp.txt");
  22.                     } catch (Exception exFailedToObtain) {
  23.                         MessageBox.Show("Unable to obtain update info from website at this time. Please try again later." +
  24.                         Environment.NewLine + Environment.NewLine + exFailedToObtain.Message, "Try Again Later");
  25.                         updateToolStripMenuItem.Enabled = true;
  26.                         Cursor = Cursors.Default;
  27.                         this.Text = appTitle;
  28.                         return;
  29.                     }
  30.                     client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged);
  31.                     string downloadURL = string.Empty;
  32.                     string[] parts;                    
  33.                     using (StreamReader sr = new StreamReader(Path.Combine(specFldrAppData, "temp.txt"))) {
  34.                         parts = sr.ReadLine().Split('|');
  35.                         string newest = parts[1].Trim();                        
  36.                         parts = sr.ReadLine().Split('|');
  37.                         downloadURL = parts[1].Trim();
  38.                         pathToOnlineZippedInstaller = downloadURL;
  39.                         parts = sr.ReadLine().Split('|');
  40.                         expectedDownloadSize = Convert.ToInt32(parts[1]);
  41.                         if (String.Compare(Application.ProductVersion.ToString(), newest) < 0) {
  42.  
  43.                             if (blnLoadedPrayerHasBeenModified) {
  44.                                 msg = "A loaded prayer has been modified. Discard it and download the available installer for an updated version of this application?";
  45.                                 if (DialogResult.No == MessageBox.Show(msg, "Discard modified prayer and download update?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) {
  46.                                     return;
  47.                                 }
  48.                             } else {
  49.                                 clearMyPrayerFields();
  50.                             }
  51.  
  52.                             if (blnWorkingOnNewPrayer) {
  53.                                 msg = "You're currently working on a new prayer. Discard it and download the available installer for an updated version of this application?";
  54.                                 if (DialogResult.No == MessageBox.Show(msg, "Discard modified prayer and download update?", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)) {
  55.                                     return;
  56.                                 }
  57.                             } else {
  58.                                 clearMyPrayerFields();
  59.                             }
  60.  
  61.                             versionDownloading = "v" + newest;
  62.                             this.Text = "Downloading newest version " + versionDownloading;
  63.                             downloadProgress.Value = 0;                                                                                  
  64.  
  65.                             downloadFullpath = Path.Combine(pathToDesktop, Path.GetFileName(downloadURL));
  66.                             tmrDownload.Enabled = true;
  67.                             presentMyPrayersPanel();
  68.                             myPrayersInterfaceToolStripMenuItem.Checked = true;
  69.                             tmrDownload.Start();
  70.                             _downloadUpdateBegins = DateTime.Now;
  71.                             blnDownloadingUpdateInstaller = true;
  72.                             client.DownloadFileAsync(new Uri(downloadURL), downloadFullpath);
  73.                         } else {                            
  74.                             using (StreamWriter sw = new StreamWriter(pathLastSuccessfullyCheckedForUpdate)) {
  75.                                 sw.WriteLine(DateTime.Now.ToString());
  76.                             }
  77.                             this.Text = appTitle;
  78.                             if (myPrayersInterfaceToolStripMenuItem.Checked) {
  79.                                 this.Text += " (\"My Prayers\" interface) ";
  80.                             }
  81.                             MessageBox.Show("You are using the most recent version of the program: " +
  82.                                 Application.ProductVersion.ToString(), "No update is currently available");
  83.                             this.Text = appTitle;
  84.                         }
  85.                     }
  86.                 } catch (Exception exUpdate) {                                        
  87.                     updateToolStripMenuItem.Enabled = true;
  88.                     blnDownloadingUpdateInstaller = false;
  89.                     Cursor = Cursors.Default;
  90.                     string errMsg = exUpdate.Message;
  91.                     if ((exUpdate.Message.Contains("outside the bounds")) || (exUpdate.Message.Contains("remote name could not be resolved"))) {
  92.                         errMsg = "\"Prayer Minder\" was unable to connect to the download server to check for an available update at this time.";
  93.                     }
  94.                     MessageBox.Show(errMsg, "Error while seeking available program update");
  95.                 }
  96.                 finally {
  97.  
  98.                 }
  99.             } else {
  100.                 MessageBox.Show("\"Prayer Minder\" couldn't retrieve the URL to look for updates. Please contact the programmer.", "Failed to obtain update info");                
  101.             }
  102.  
  103.             updateToolStripMenuItem.Enabled = true;
  104.             Cursor = Cursors.Default;
  105.  
  106.         }
1507
Developer's Corner / Re: Introductory C# web-based tutorials
« Last post by kyrathaba on February 05, 2012, 08:35 AM »
For anyone interested, it's extremely simple, in C#, to determine whether your internet connection is "up" (connected) or "down" (not connected). I've done a C# project demonstrating:



download link
1508
Kyrathaba Software / Re: Kyrathasoft Christian Prayer Minder (a NANY 2012 entry)
« Last post by kyrathaba on February 04, 2012, 05:32 PM »
v1.0.6.9 released. Update program from within the program using the Update menu item. View "Version History" for bug-fixes and features-added in versions 1.0.6.8 and 1.0.6.9.
1509
v1.0.0.7 corrects the title of secondary form from "Add Two Times Together" to "Add Two Timespans Together".
1510
Living Room / Re: When you make your 100'th Post
« Last post by kyrathaba on February 04, 2012, 11:43 AM »
sixteenHundredthPost.png
1511
Living Room / Re: Main hard drive in my PC died today suddenly
« Last post by kyrathaba on February 04, 2012, 11:41 AM »
I know you guys are gonna laugh, but I don't have that much stuff to backup: just what few C# projects I plan to continue updating, and a few other odds and ends. I just backup occasionally to memory stick and frequently to DropBox. Note that my irreplaceable photos and stuff always get backed up to both DropBox and mem-stick. And as a third measure of protection, stuff I'd really hate to lose gets FTPed to a remote repository.
1512
It took a few weeks before I got the alarm code to our clinic. I guess it takes that long for them to trust you. I remember getting the code and feeling shocked. The code was 2229. That seems innocent…until they told me what it spelled out…BABY. Really. Wow. We were really joking about that…our alarm code was mocking the murder of children.

A few weeks later I was introduced to our freezer in the POC (products of conception) lab. This was the freezer that held the fetal tissue until the biohazard truck came for disposal. I found out the name for that freezer…the nursery. Again, that was a joke. How had that become a joke?

+1, Ren.
1513
Living Room / Re: According To FBI, Internet Privacy Now Considered Suspicious
« Last post by kyrathaba on February 04, 2012, 11:32 AM »
Yes... I've been making typos all damned day!

Maybe you're a hacker and part of your attention is distracted by some project you're working on that is aimed against the government. I think sufficient suspicion exists to bring you in for questioning. I'm calling the SOPA police, the ACTA marshals, and the FBI. Be back shortly...  :P
1514
Living Room / Re: According To FBI, Internet Privacy Now Considered Suspicious
« Last post by kyrathaba on February 04, 2012, 10:58 AM »
It truly is frightening.
1515
Kyrathaba Software / Kyrathasoft Internet Connection Test Demo
« Last post by kyrathaba on February 04, 2012, 09:19 AM »
You can download the entire C# project as a 41 Kb zipped archive. The project is quite brief, and demonstrates testing for the presence of an active (i.e., "up") internet connection.

NetConnectStatusDemo.png

Download link
1516
Living Room / Re: According To FBI, Internet Privacy Now Considered Suspicious
« Last post by kyrathaba on February 04, 2012, 08:40 AM »
I am We are Anonymous...
1517
Living Room / Re: According To FBI, Internet Privacy Now Considered Suspicious
« Last post by kyrathaba on February 04, 2012, 08:28 AM »
I'm also guilty of thought crimes  :P
1518
Living Room / Re: According To FBI, Internet Privacy Now Considered Suspicious
« Last post by kyrathaba on February 04, 2012, 08:22 AM »
I do every single thing in that list...  :o
1519
Looks very nice, justice!  :up:
1520
Thanks for sharing yuvidroid  :Thmbsup:
1521
Post New Requests Here / Re: IDEA: "CopySmart"
« Last post by kyrathaba on January 31, 2012, 08:59 AM »
I understand your point Tao. I think English is such an incredibly abstruse beast (look at the horror on the faces of non-native English speakers who are trying to learn English) that every time you think you've got all cases nailed down, another exception will be found in someone's diary, journal, etc. The coding project then becomes one of grinning as your program seems to deal properly with all sample texts submitted thus far, only to have your happiness dashed when someone else says "Hey, I ran such and such file through your program and it did THIS!  :( ) I submit that my particular example is not impossible to code against, as you have correctly stated. But it was only offered as an example of something that at first seems easy enough, but really is beginning to enter the area of subjective coding. Perhaps I should have used an example with a less-limited problem-space.

I maintain that robots will never be able to pass for human  :P
1522
v1.0.6.7 fleshes out what was started in v1.0.6.6. Optional passwording of Author Names provides a degree of privacy and protection for your files. Passwording is now discussed in the relevant sections of the Help file (saving files, loading files, deleting files, searching files).
1523
youngjohn12, welcome to the site!
1524
Great flowchart! LOL  :P
1525
Universal had a song pulled from YouTube when they did not own the copyright, and the people that put the song up there in the first place owned the copyright...

http://www.techdirt....t-leaked-track.shtml

You just cannot make this stuff up...

That it happened at all is simply inexcusable.

+1. The only thing preventing a revolt/revolution at this point is the ignorance of the unwashed masses, and the fact that there are so many bleeding-heart liberals endorsing such ridiculous behavior.
Pages: prev1 ... 56 57 58 59 60 [61] 62 63 64 65 66 ... 122next