Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the LocaleManager class.
        /// </summary>
        /// <param name="system">The MiyagiSystem.</param>
        protected internal LocaleManager(MiyagiSystem system)
        {
            this.MiyagiSystem = system;

            // fallback to English
            this.internalNeutralLocale = new XmlDocument();
            this.internalNeutralLocale.Load(GetInternalStream(CultureInfo.GetCultureInfo("en")));

            this.localeFolderDict = new Dictionary <CultureInfo, string>();
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the InputManager class.
        /// </summary>
        /// <param name="system">The MiyagiSystem.</param>
        protected internal InputManager(MiyagiSystem system)
        {
            this.MiyagiSystem              = system;
            this.MouseSelectButton         = MouseButton.Left;
            this.MouseGesturesButton       = MouseButton.Right;
            this.MouseDoubleClickSpeed     = TimeSpan.FromMilliseconds(500);
            this.MouseGestureSegmentsAngle = 120;
            this.MouseGestureMinDistance   = 8;
            this.CaptureOnUpdate           = true;

            this.pressedMouseButtons = new Dictionary <MouseButton, bool>();
            foreach (MouseButton mb in Enum.GetValues(typeof(MouseButton)))
            {
                this.pressedMouseButtons[mb] = false;
            }
        }
Beispiel #3
0
        /// <summary>
        /// Releases the unmanaged resources used by the InputManager.
        /// </summary>
        public void Dispose()
        {
            if (this.IsDisposed)
            {
                return;
            }

            if (this.Disposing != null)
            {
                this.Disposing(this, EventArgs.Empty);
            }

            this.Dispose(true);
            GC.SuppressFinalize(this);
            this.IsDisposed = true;
            this.MiyagiSystem.UnregisterManager(this);
            this.MiyagiSystem = null;
        }