コード例 #1
0
ファイル: CASDresserSheetEx.cs プロジェクト: yakoder/NRaas
        public static void UpdateGlideEffects(Window newWindow)
        {
            CASDresserSheet ths = CASDresserSheet.gSingleton;

            if (ths == null)
            {
                return;
            }

            foreach (object effect in newWindow.EffectList)
            {
                ths.mGlideEffect = effect as GlideEffect;
                if (ths.mGlideEffect != null)
                {
                    ths.mGlideTime = ths.mGlideEffect.Duration;
                    break;
                }
            }

            foreach (object effect in ths.EffectList)
            {
                ths.mMainGlideEffect = effect as GlideEffect;
                if (ths.mMainGlideEffect != null)
                {
                    ths.mMainGlideOffset = ths.mMainGlideEffect.Offset.x;
                    break;
                }
            }
        }
コード例 #2
0
ファイル: CASDresserSheetEx.cs プロジェクト: yakoder/NRaas
        public static bool GetWindows(out Window newWindow, out Window oldWindow)
        {
            CASDresserSheet ths = CASDresserSheet.gSingleton;

            if (ths == null)
            {
                newWindow = null;
                oldWindow = null;
                return(false);
            }

            CASDresserSheet.ControlIDs newDS, oldDS;
            if (StringTable.GetLocale() != "en-us")
            {
                newDS = CASDresserSheet.ControlIDs.BackPanelBigLong;
                oldDS = CASDresserSheet.ControlIDs.BackPanelBig;
            }
            else
            {
                newDS = CASDresserSheet.ControlIDs.BackPanelSmallLong;
                oldDS = CASDresserSheet.ControlIDs.BackPanelSmall;
            }

            newWindow = ths.GetChildByID((uint)newDS, true) as Window;
            oldWindow = ths.GetChildByID((uint)oldDS, true) as Window;
            return(true);
        }
コード例 #3
0
ファイル: CASDresserSheetEx.cs プロジェクト: yakoder/NRaas
        /*
         * public static void OnNavigationButtonClick(WindowBase sender, UIButtonClickEventArgs eventArgs)
         * {
         *  try
         *  {
         *      CASDresserSheet ths = CASDresserSheet.gSingleton;
         *      if (ths == null) return;
         *
         *      Window newWindow, oldWindow;
         *      CASDresserSheetEx.GetWindows(out newWindow, out oldWindow);
         *
         *      CASDresserSheetEx.UpdateGlideEffects(newWindow);
         *
         *      CASDresserSheetEx.UpdatePanelGlide(newWindow);
         *
         *      ths.OnNavigationButtonClick(sender, eventArgs);
         *  }
         *  catch (Exception e)
         *  {
         *      Common.Exception("OnNavigationButtonClick", e);
         *  }
         * }
         */
        public static void UpdatePanelGlide(Window newWindow)
        {
            CASDresserSheet ths = CASDresserSheet.gSingleton;

            if (ths == null)
            {
                return;
            }

            newWindow.EffectFinished -= ths.OnPanelGlideFinished;
            newWindow.EffectFinished += ths.OnPanelGlideFinished;
        }