Exemplo n.º 1
0
        protected void NDrawingView1_AsyncQueryCommandResult(object sender, EventArgs e)
        {
            NCallbackQueryCommandResultArgs args   = e as NCallbackQueryCommandResultArgs;
            NCallbackCommand         command       = args.Command;
            NAjaxXmlTransportBuilder resultBuilder = args.ResultBuilder;

            switch (command.Name)
            {
            case "queryPosition":
                //	build a custom response data section
                NEllipseShape rotatingEllipse = NDrawingView1.Document.ActiveLayer.GetChildByName("RotatingEllipse", 0) as NEllipseShape;
                if (rotatingEllipse != null)
                {
                    NAjaxXmlDataSection dataSection = new NAjaxXmlDataSection("position");
                    dataSection.Data = rotatingEllipse.Center.ToString();
                    resultBuilder.AddDataSection(dataSection);
                }
                break;

            case "changeColor":
                //	add a built-in data section that will enforce full image refresh at the client
                if (clientSideRedrawRequired && !resultBuilder.ContainsRedrawDataSection())
                {
                    resultBuilder.AddRedrawDataSection(NDrawingView1);
                }
                break;

            case "rotate10Degrees":
                if (resultBuilder.ContainsRedrawDataSection() == false)
                {
                    resultBuilder.AddRedrawDataSection(NDrawingView1);
                }
                break;
            }
        }
        protected void nChartControl1_AsyncQueryCommandResult(object sender, EventArgs e)
        {
            NCallbackQueryCommandResultArgs args   = e as NCallbackQueryCommandResultArgs;
            NCallbackCommand         command       = args.Command;
            NAjaxXmlTransportBuilder resultBuilder = args.ResultBuilder;

            switch (command.Name)
            {
            case "queryCurrentAngle":
                //	build a custom response data section
                NRootPanel rootPanel = nChartControl1.Document.RootPanel;
                NPieChart  pieChart  = nChartControl1.Charts[0] as NPieChart;

                NAjaxXmlDataSection dataSection = new NAjaxXmlDataSection("angle");
                dataSection.Data = pieChart.BeginAngle.ToString();
                resultBuilder.AddDataSection(dataSection);
                break;

            case "changeColor":
                //	add a built-in data section that will enforce full image refresh at the client
                if (clientSideRedrawRequired && !resultBuilder.ContainsRedrawDataSection())
                {
                    resultBuilder.AddRedrawDataSection(nChartControl1);
                }
                break;

            case "rotate10Degrees":
                if (!resultBuilder.ContainsRedrawDataSection())
                {
                    resultBuilder.AddRedrawDataSection(nChartControl1);
                }
                break;
            }
        }
Exemplo n.º 3
0
        protected void NDrawingView1_AsyncQueryCommandResult(object sender, EventArgs e)
        {
            NCallbackQueryCommandResultArgs args          = e as NCallbackQueryCommandResultArgs;
            NAjaxXmlTransportBuilder        resultBuilder = args.ResultBuilder;

            if (m_bClientSideRedrawRequired && !resultBuilder.ContainsRedrawDataSection())
            {
                resultBuilder.AddRedrawDataSection(NDrawingView1);
            }
        }
        protected void nChartControl2_AsyncQueryCommandResult(object sender, EventArgs e)
        {
            NCallbackQueryCommandResultArgs args = e as NCallbackQueryCommandResultArgs;

            switch (args.Command.Name)
            {
            case "displayDataWindow":
                if (!args.ResultBuilder.ContainsRedrawDataSection())
                {
                    args.ResultBuilder.AddRedrawDataSection(nChartControl2);
                }
                break;
            }
        }
        protected void nDrawingViewDocument_AsyncQueryCommandResult(object sender, EventArgs e)
        {
            NCallbackQueryCommandResultArgs args          = e as NCallbackQueryCommandResultArgs;
            NAjaxXmlTransportBuilder        resultBuilder = args.ResultBuilder;

            switch (args.Command.Name)
            {
            case "undo":
            case "redo":
            case "text":
                //	add a built-in data section that will enforce full image refresh at the client
                if (!resultBuilder.ContainsRedrawDataSection())
                {
                    resultBuilder.AddRedrawDataSection(nDrawingViewDocument);
                }
                break;
            }
        }
Exemplo n.º 6
0
        protected void NDrawingView1_AsyncQueryCommandResult(object sender, EventArgs e)
        {
            NCallbackQueryCommandResultArgs args   = e as NCallbackQueryCommandResultArgs;
            NCallbackCommand         command       = args.Command;
            NAjaxXmlTransportBuilder resultBuilder = args.ResultBuilder;

            switch (command.Name)
            {
            case "mouseClick":
                //	build a custom response data section
                NEmployee employee = NDrawingView1.Document.Tag as NEmployee;
                if (employee == null)
                {
                    return;
                }

                employee.SetAjaxData(resultBuilder);
                break;
            }
        }