コード例 #1
0
ファイル: SAApplication.cs プロジェクト: zhuangyy/Motion
        /// <summary>
        /// We inherit from the VB.NET WindowsFormApplicationBase class, which has the 
        /// single-instance functionality.
        /// </summary>
        public SAApplication(ISAApplication sa)
        {
            this.mSAapplication = sa;

            // Make this a single-instance application
            this.IsSingleInstance = true;
            this.EnableVisualStyles = true;

            // There are some other things available in the VB application model, for
            // instance the shutdown style:
            //this.ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses;

            // Add StartupNextInstance handler
            this.StartupNextInstance += new StartupNextInstanceEventHandler(this.SAApplication_StartupNextInstance);
        }
コード例 #2
0
        /// <summary>
        /// We inherit from the VB.NET WindowsFormApplicationBase class, which has the
        /// single-instance functionality.
        /// </summary>
        public SAApplication(ISAApplication sa)
        {
            this.mSAapplication = sa;

            // Make this a single-instance application
            this.IsSingleInstance   = true;
            this.EnableVisualStyles = true;

            // There are some other things available in the VB application model, for
            // instance the shutdown style:
            //this.ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses;

            // Add StartupNextInstance handler
            this.StartupNextInstance += new StartupNextInstanceEventHandler(this.SAApplication_StartupNextInstance);
        }