示例#1
0
        public void ToolkitStateChanged(int state)
        {
            IToolkitEventSink co = this.mControlWeakRef.Target as IToolkitEventSink;

            if (null != co)
            {
                co.ToolkitStateChanged(state);
            }
        }
示例#2
0
        // Process a change in window state from Xsharp.
        private void WindowStateChanged()
        {
            int state;

            if (IsIconic)
            {
                state = 1;                                      // FormWindowState.Minimized.
            }
            else if (IsMaximized)
            {
                state = 2;                                      // FormWindowState.Maximized.
            }
            else
            {
                state = 0;                                      // FormWindowState.Normal.
            }
            if (sink != null)
            {
                sink.ToolkitStateChanged(state);
            }
        }