想飞的鱼丶 2016-04-28 05:17 采纳率: 0%
浏览 580

为什么进不到项目里面啊?入口进不去!

using System;
using System.Collections.Generic;
using System.Windows.Forms;
using WF_SysApplication;
using AutoUpdater;
using KnightsWarriorAutoupdater;
using System.Net;
using System.Xml;
using System.Diagnostics;

namespace WF.MainMap
{
static class Program
{
///
/// 应用程序的主入口点。
///
[STAThread]
static void Main(string [] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
#region check and download new version program
bool bHasError = false;
try
{

            IAutoUpdater autoUpdater = new KnightsWarriorAutoupdater.AutoUpdater(args);
            if (autoUpdater.NeedUpdate())
            {
                Application.Exit();
                Process proc = new Process();
                proc.StartInfo.UseShellExecute = true;//是否使用操作系统外壳程序启动进程
                if (args != null && args.Length > 0)
                proc.StartInfo.Arguments = args[0];
              proc.StartInfo.WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory;//启动进程的初始目录
               proc.StartInfo.FileName = "KnightsWarrior.exe";
               proc.WaitForExit(100);
               proc.Start();
               return;
           }
        }
        catch (WebException exp)
        {
            MessageBox.Show("服务器连接失败");
          bHasError = true;
        }
        catch (XmlException exp)
        {
            bHasError = true;
            MessageBox.Show("下载更新文件错误");
        }
        catch (NotSupportedException exp)
        {
            bHasError = true;
           MessageBox.Show("升级文件配置错误");
        }
        catch (ArgumentException exp)
        {
          bHasError = true;
           MessageBox.Show("下载升级文件错误");
        }
        catch (Exception exp)
        {
            bHasError = true;
           MessageBox.Show("更新过程中出现错误");
        }
        finally
        {
        //    //if (bHasError == true)
        //    //{
        //    //    try
        //    //    {
        //    //        autoUpdater.RollBack();
        //    //    }
        //    //    catch (Exception)
        //    //    {
        //    //        //Log the message to your file or database
        //    //    }
        //    //}
        //    ////OperProcess op = new OperProcess();
        //    //启动进程
        //    //op.StartProcess();
        }
        #endregion

        //StaticSystemUIClass.MsgControl.ShowInfoDialog(StaticSystemUIClass.SysConfigXmlControl.SysPath);
        if (args == null || args.Length == 0)
        {
            args = new string[1];
            args[0] = "数据管理子系统.wfs";
        }
        if (args == null || args.Length == 0)
        {
            MessageBox.Show("未指定子系统类型");
            return;
        }

        DevExpress.UserSkins.BonusSkins.Register();
        DevExpress.Skins.SkinManager.EnableFormSkins();
        DevExpress.Skins.SkinManager.EnableMdiFormSkins();
        Application.Run(new frmMain());  (未将对象引用设置到对象的实例)          
    }
}

}
还有那个查看详细信息的异常快照怎么看啊?

  • 写回答

0条回答

    报告相同问题?

    悬赏问题

    • ¥15 求差集那个函数有问题,有无佬可以解决
    • ¥15 【提问】基于Invest的水源涵养
    • ¥20 微信网友居然可以通过vx号找到我绑的手机号
    • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
    • ¥15 解riccati方程组
    • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
    • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
    • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
    • ¥50 树莓派安卓APK系统签名
    • ¥65 汇编语言除法溢出问题