コード例 #1
0
        static void Main()
        {
            frmWait _f = new frmWait();

            _f.Show();
            Application.DoEvents();
            AutoUpdateStarter aus = new AutoUpdateStarter(_f);
        }
コード例 #2
0
        public AutoUpdateStarter(frmWait _frmWait)
        {
            WaitForm = _frmWait;
            string stConfigFileName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            stConfigFileName  = Path.Combine(stConfigFileName, Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location));
            stConfigFileName += @".exe.config";

            AutoUpdateStarterConfig config = AutoUpdateStarterConfig.Load(stConfigFileName);

            this.executablePath = config.ApplicationExePath;
            this.isDeleteTemp   = config.DeleteTemp;
            this.updatePath     = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + Path.DirectorySeparatorChar + "update" + Path.DirectorySeparatorChar;
            StartProcessAndWait();
        }