示例#1
0
        public void Show(IWaitIndicatorAppearance appearance, double left, double top, double width, double height)
        {
            this.Left = left;
            this.Top = top;
            this.Width = width;
            this.Height = height;
            m_ViewModel.Appearance = appearance; // determine "appearance" yet before Show()

            var wih = new System.Windows.Interop.WindowInteropHelper(this);
            wih.EnsureHandle();
            Win32.User32.SetWindowLongPtr(new HandleRef(wih, wih.Handle), Win32.User32.GWL_HWNDPARENT, appearance.OwnerHwnd);

            Show();

            m_ViewModel.WaitWindowVisualState = "Active";
        }
示例#2
0
        public void Show(IWaitIndicatorAppearance appearance, double left, double top, double width, double height)
        {
            CalledShowThreadId = Thread.CurrentThread.ManagedThreadId;
            CalledShowApartmentState = Thread.CurrentThread.GetApartmentState();
            CalledShowLeft = left;
            CalledShowTop = top;
            CalledShowWidth = width;
            CalledShowHeight = height;
            CalledShow = true;

            DispatcherInstance = new System.Windows.Controls.Control().Dispatcher;
        }
示例#3
0
        public virtual void BeginWaiting(IWaitIndicatorAppearance appearance, double left, double top, double width, double height)
        {
            m_WaitIndicatorAppearance = appearance;

            m_Left = left;
            m_Top = top;
            m_Width = width;
            m_Height = height;

            m_BackgroundGuiThread = new Thread(doBackgroundGuiThreadWork);
            m_BackgroundGuiThread.Name = "Ciderx64-BackgroundGuiThread";
            m_BackgroundGuiThread.SetApartmentState(ApartmentState.STA);
            m_BackgroundGuiThread.Start();
            m_WaitWindowShownEvent.WaitOne();
        }