Ejemplo n.º 1
0
        public void start()
        {
            try
            {
                geoDatabaseUtility         geoUtil = new geoDatabaseUtility();
                System.Diagnostics.Process pr      = new System.Diagnostics.Process();
                geoUtil.check_dir(rmrsDir);
                string hFl = rmrsDir + "\\" + HelpFileName;
                pr.StartInfo.FileName = hFl;

                if (System.IO.File.Exists(hFl))
                {
                    pr.Start();
                }
                else
                {
                    update up = new update();
                    try
                    {
                        System.Windows.Forms.MessageBox.Show("Can't find help files. Trying to download from the internet.");
                        string cuSet = up.UpdateCheck;
                        if (cuSet.ToLower() != "yes")
                        {
                            up.UpdateCheck = "yes";
                        }
                        Properties.Settings.Default.HelpVersion = "unknown";
                        Properties.Settings.Default.Save();
                        if (up.updateHelp())
                        {
                            pr.Start();
                        }
                        else
                        {
                            System.Windows.Forms.MessageBox.Show("Can't find help files on the internet. Try again later.");
                        }
                        up.UpdateCheck = cuSet;
                    }
                    catch
                    {
                        System.Windows.Forms.MessageBox.Show("Error in updating help. Try again later.");
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e.ToString());
            }
            finally
            {
            }
        }