gInk.Root.StopInk C# (CSharp) Method

StopInk() public method

public StopInk ( ) : void
return void
		public void StopInk()
		{
			FormCollection.Close();
			FormDisplay.Close();
			FormButtonHitter.Close();
			//FormCollection.Dispose();
			//FormDisplay.Dispose();
			GC.Collect();
			FormCollection = null;
			FormDisplay = null;
		}

Usage Example

Esempio n. 1
0
        private void tiSlide_Tick(object sender, EventArgs e)
        {
            // ignore the first tick
            if (LastTickTime.Year == 1987)
            {
                LastTickTime = DateTime.Now;
                return;
            }

            int primwidth  = Screen.PrimaryScreen.WorkingArea.Width;
            int primheight = Screen.PrimaryScreen.WorkingArea.Height;
            int primright  = Screen.PrimaryScreen.WorkingArea.Right;
            int primbottom = Screen.PrimaryScreen.WorkingArea.Bottom;

            int aimedleft = gpButtonsLeft;

            if (ButtonsEntering == 0)
            {
                if (Root.Docked)
                {
                    aimedleft = gpButtonsLeft + gpButtons.Width - btDock.Right;
                }
                else
                {
                    aimedleft = gpButtonsLeft;
                }
            }
            else if (ButtonsEntering == -1)
            {
                aimedleft = gpButtonsLeft + gpButtons.Width;
            }

            if (gpButtons.Left > aimedleft)
            {
                float dleft = gpButtons.Left - aimedleft;
                dleft /= 70;
                if (dleft > 8)
                {
                    dleft = 8;
                }
                dleft *= (float)(DateTime.Now - LastTickTime).TotalMilliseconds;
                if (dleft > 120)
                {
                    dleft = 230;
                }
                if (dleft < 1)
                {
                    dleft = 1;
                }
                gpButtons.Left -= (int)dleft;
                LastTickTime    = DateTime.Now;
                if (gpButtons.Left < aimedleft)
                {
                    gpButtons.Left = aimedleft;
                }
                Root.UponButtonsUpdate |= 0x1;
            }
            else if (gpButtons.Left < aimedleft)
            {
                float dleft = aimedleft - gpButtons.Left;
                dleft /= 70;
                if (dleft > 8)
                {
                    dleft = 8;
                }
                // fast exiting when not docked
                if (ButtonsEntering == -1 && !Root.Docked)
                {
                    dleft = 8;
                }
                dleft *= (float)(DateTime.Now - LastTickTime).TotalMilliseconds;
                if (dleft > 120)
                {
                    dleft = 120;
                }
                if (dleft < 1)
                {
                    dleft = 1;
                }
                // fast exiting when docked
                if (ButtonsEntering == -1 && dleft == 1)
                {
                    dleft = 2;
                }
                gpButtons.Left += (int)dleft;
                LastTickTime    = DateTime.Now;
                if (gpButtons.Left > aimedleft)
                {
                    gpButtons.Left = aimedleft;
                }
                Root.UponButtonsUpdate |= 0x1;
            }

            if (ButtonsEntering == -1 && gpButtons.Left == aimedleft)
            {
                tiSlide.Enabled = false;
                Root.StopInk();
                return;
            }

            short retVal = GetKeyState(27);

            if ((retVal & 0x8000) == 0x8000)
            {
                RetreatAndExit();
            }
        }
All Usage Examples Of gInk.Root::StopInk