コード例 #1
0
ファイル: Form1.cs プロジェクト: hangmiao/DBLike
        /*
        delegate bool Wait();

        public bool initiateWait()
        {
            if (!this.IsHandleCreated)
            {
                this.CreateHandle();
            }
            Wait w = new Wait(Waiting);
            return (bool)this.Invoke(w);
        }
        public bool Waiting()
        {
            if (shuttingDownComplete)
            {
                return false;
            }
            return true;
        }
        */
        public void addtoConsole(string str)
        {
            try
            {
                if (!this.IsHandleCreated)
                {
                    this.CreateHandle();
                }
                addToConsole app = new addToConsole(Appendconsole);
                this.Invoke(app, (object)str);
            }
            catch(Exception e)
            {
                //Application.Exit();
            }
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: hangmiao/DBLike
 public void addtoConsole(string str)
 {
     if (!this.IsHandleCreated)
     {
         this.CreateHandle();
     }
     addToConsole app = new addToConsole(Appendconsole);
     this.Invoke(app,(object)str);
 }