예제 #1
0
 private void TaskFunction(object obj)
 {
     this._dbMediaId          = -1;
     this._fFileAlreadyExists = false;
     this._fAddSuccessful     = false;
     if (!string.IsNullOrEmpty(this._filePath))
     {
         this._fAddSuccessful = ZuneApplication.AddTransientMedia(this._filePath, this._mediaType, out this._dbMediaId, out this._fFileAlreadyExists);
     }
     if (this._event == null)
     {
         return;
     }
     this._event.Set();
 }
예제 #2
0
        private void DeferredUpdatePosition(object arg)
        {
            object[] objArray = (object[])arg;
            int      num1     = (int)objArray[0];
            int      num2     = (int)objArray[1];
            RECT     lpRect;

            if (!GetWindowRect(ZuneApplication.GetRenderWindow(), out lpRect))
            {
                lpRect.Left   = 0;
                lpRect.Top    = 0;
                lpRect.Right  = 1;
                lpRect.Bottom = 1;
            }
            int num3 = num1 < lpRect.Left ? lpRect.Left : num1;
            int num4 = num3 >= lpRect.Right ? lpRect.Right - 1 : num3;
            int num5 = num2 < lpRect.Top ? lpRect.Top : num2;
            int num6 = num5 >= lpRect.Bottom ? lpRect.Bottom - 1 : num5;

            this.X = num4 - lpRect.Left;
            this.Y = num6 - lpRect.Top;
            this._invokeOutstanding = false;
        }
예제 #3
0
 /// <summary>
 /// Start the Zune application.
 /// </summary>
 private void ZuneThreadStarter()
 {
     ZuneApplication.Launch(null, IntPtr.Zero);
 }