Ejemplo n.º 1
0
        protected override void WndProc(ref Message m)
        {
            switch (m.Msg)
            {
            case Messaging.WM_REGISTERME:
                _ChildHandle = new IntPtr((int)m.WParam);
                Messaging.PostMessage(_ChildHandle, Messaging.WM_REGISTERACCEPTED, 0, 0);
                break;

            case Messaging.WM_SUICIDED:
                _DisplayErrorLabel();
                break;

            case RSAppMessages.WM_GROUP:
                _GroupsOn = (int)(m.WParam) == RSAppMessages.EX_SHOW;
                break;

            case RSAppMessages.WM_ZOOM:
                _Zoom = (int)(m.LParam);
                break;

            case RSAppMessages.WM_UI:
                _Offline  = RSAppMessages.CheckFlag((uint)m.WParam, RSAppMessages.FLAG_OFFLINE);
                _Opened   = RSAppMessages.CheckFlag((uint)m.WParam, RSAppMessages.FLAG_OPENED);
                _GroupsOn = RSAppMessages.CheckFlag((uint)m.WParam, RSAppMessages.FLAG_GROUP);

                if (UIInfoGet != null)
                {
                    UIInfoGet(this);
                }
                break;

            default:
                base.WndProc(ref m);
                break;
            }
        }
Ejemplo n.º 2
0
        protected override void WndProc(ref Message m)
        {
            bool lDecTimeout = false;

            switch (m.Msg)
            {
            case Messaging.WM_REGISTERACCEPTED:
                _Timer.Enabled = true;
                break;

            case Messaging.WM_PARENTRESIZED:
                if (EmbeddedApplication != null)
                {
                    Rect lRect;
                    WindowManagement.GetClientRect(EmbeddedApplication.Handle, out lRect);
                    this.Size = new Size(lRect.Width, lRect.Height);
                }
                break;

            case RSAppMessages.WM_PRINT:
                if (opened)
                {
                    if (!_offline)
                    {
                        ctlViewer.PrintReport();
                    }
                    else
                    {
                        _pdfCtl.Print();
                    }
                }
                break;

            case RSAppMessages.WM_REFRESH:
                DoRefresh();
                break;

            case RSAppMessages.WM_MAIL:
                DoSendEmail();
                break;

            case RSAppMessages.WM_OFFLINE:
                if (_offline)
                {
                    DoOnline();
                }
                else
                {
                    DoOffline();
                }
                break;

            case RSAppMessages.WM_THUMB:
                switch ((int)(m.WParam))
                {
                case RSAppMessages.EX_FIRST: DoFirstPage(); break;

                case RSAppMessages.EX_PREV: DoPrevPage(); break;

                case RSAppMessages.EX_NEXT: DoNextPage(); break;

                case RSAppMessages.EX_LAST: DoLastPage(); break;
                }
                break;

            case RSAppMessages.WM_ZOOM:
                switch ((int)(m.WParam))
                {
                case RSAppMessages.EX_SET:
                    DoZoom((int)(m.LParam));
                    break;

                case RSAppMessages.EX_GET:
                    Messaging.PostMessage(EmbeddedApplication.Handle, RSAppMessages.WM_ZOOM, RSAppMessages.EX_SET, _Zoom);
                    break;
                }
                break;

            case RSAppMessages.WM_GROUP:
                switch ((int)(m.WParam))
                {
                case RSAppMessages.EX_SHOW:
                    DoShowGroup(true);
                    break;

                case RSAppMessages.EX_HIDE:
                    DoShowGroup(false);
                    break;

                case RSAppMessages.EX_GET:

                    Messaging.PostMessage(EmbeddedApplication.Handle, RSAppMessages.WM_GROUP, (uint)getGroupState(), 0);
                    break;
                }

                break;

            case RSAppMessages.WM_UI:
                uint aFlags = RSAppMessages.EncodeEmbedded(this);
                Messaging.PostMessage(EmbeddedApplication.Handle, RSAppMessages.WM_UI, aFlags, 0);
                break;

            case RSAppMessages.WM_EXPORT:
                switch ((int)(m.WParam))
                {
                case RSAppMessages.EX_PDF:
                    DoExportPDF();
                    break;

                case RSAppMessages.EX_XLS:
                    DoExportExcel();
                    break;

                case RSAppMessages.EX_XLS_DATAONLY:
                    DoExportToExcelDataOnly();
                    break;

                case RSAppMessages.EX_DOC:
                    DoExportWord();
                    break;

                case RSAppMessages.EX_XML:
                    DoExportXML();
                    break;

                case RSAppMessages.EX_HTM32:
                    DoExportHTML32();
                    break;

                case RSAppMessages.EX_HTM40:
                    DoExportHTML40();
                    break;
                }
                break;

            default:
                lDecTimeout = true;
                base.WndProc(ref m);
                break;
            }

            if (!lDecTimeout)
            {
                _timeout = RsViewEngine.ProfileManager.Profile.Settings.Offline.Timeout * 60;
            }
        }
Ejemplo n.º 3
0
        public void DoSendUIState()
        {
            uint aFlags = RSAppMessages.EncodeEmbedded(this);

            Messaging.PostMessage(EmbeddedApplication.Handle, RSAppMessages.WM_UI, aFlags, 0);
        }