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; } }
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 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; } }