Ejemplo n.º 1
0
        //string UpdatePath; // news page used to alert users of non-autoupdates


        public AppContext(string[] args)
        {
            // if instance already running, signal it and exit

            SingleInstance = new DeOpsMutex(this, args);

            if (!SingleInstance.First)
            {
                return;
            }

            // open windows firewall
            //Win32.AuthorizeApplication("DeOps", Application.ExecutablePath,
            //    NetFwTypeLib.NET_FW_SCOPE_.NET_FW_SCOPE_ALL, NetFwTypeLib.NET_FW_IP_VERSION_.NET_FW_IP_VERSION_ANY);

            //CheckForUpdates();

            // register file types
            //RegisterType();

            // upgrade properties if we need to
            Settings = AppSettings.Load(Path.Combine(Application.StartupPath, "app.xml"));

            FastTimer.Interval = 250;
            FastTimer.Tick    += new EventHandler(FastTimer_Tick);
            FastTimer.Enabled  = true;

            Context                    = new DeOpsContext(Application.StartupPath, InterfaceRes.deops);
            Context.ShowLogin         += ShowLogin;
            Context.NotifyUpdateReady += NotifyUpdateReady;

            if (Context.CanUpdate() && NotifyUpdateReady(Context.LookupConfig))
            {
                return;
            }

            // display login form
            ShowLogin(args);

            StartSuccess = true;
        }
Ejemplo n.º 2
0
        //string UpdatePath; // news page used to alert users of non-autoupdates
        public AppContext(string[] args)
        {
            // if instance already running, signal it and exit

            SingleInstance = new DeOpsMutex(this, args);

            if (!SingleInstance.First)
                return;

            // open windows firewall
            //Win32.AuthorizeApplication("DeOps", Application.ExecutablePath,
            //    NetFwTypeLib.NET_FW_SCOPE_.NET_FW_SCOPE_ALL, NetFwTypeLib.NET_FW_IP_VERSION_.NET_FW_IP_VERSION_ANY);

            //CheckForUpdates();

            // register file types
            //RegisterType();

            // upgrade properties if we need to
            Settings = AppSettings.Load(Path.Combine(Application.StartupPath, "app.xml"));

            FastTimer.Interval = 250;
            FastTimer.Tick += new EventHandler(FastTimer_Tick);
            FastTimer.Enabled = true;

            Context = new DeOpsContext(Application.StartupPath, InterfaceRes.deops);
            Context.ShowLogin += ShowLogin;
            Context.NotifyUpdateReady += NotifyUpdateReady;

            if (Context.CanUpdate() && NotifyUpdateReady(Context.LookupConfig))
                return;

            // display login form
            ShowLogin(args);

            StartSuccess = true;
        }