/// <summary> /// Changes cancelled, restore state /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void CancelButton_Click(object sender, EventArgs e) { V = (BarChartMsx)VisualMsx.Deserialize(OriginalChartState, Analysis); //if (SVM.ConfigureCount != OriginalConfigureCount) // reconfigure if config changed // SVM.ConfigureRenderingControl(); //else if (SVM.RefreshCount != OriginalRefreshCount) // refresh if other change // SVM.Refresh(); DialogResult = DialogResult.Cancel; return; }
/// <summary> /// Get active visual properties /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void GetVisPropsButton_Click(object sender, EventArgs e) { Stopwatch sw = Stopwatch.StartNew(); string serializedVisual = Api.GetVisualProperties("<activeVisual>"); if (Lex.IsUndefined(serializedVisual)) { return; } VisualMsx vixualMsx = VisualMsx.Deserialize(serializedVisual, Analysis); long ms = sw.ElapsedMilliseconds; StatusTextBox.Text += "Response: " + serializedVisual + "\r\nTime: " + ms + " ms."; return; }