public override void ShowHideConfigPanel() { Popup = new DashboardPopup(); Popup.Parent = ((this.Parent as DragCanvas).Parent as ScrollViewer).Parent as Grid; properties = new Controls.GadgetProperties.AberrationDetectionChartProperties(this.DashboardHelper, this, (AberrationDetectionChartParameters)Parameters, StrataGridList); if (DashboardHelper.ResizedWidth != 0 & DashboardHelper.ResizedHeight != 0) { double i_StandardHeight = System.Windows.SystemParameters.PrimaryScreenHeight; //Developer Desktop Width Where the Form is Designed double i_StandardWidth = System.Windows.SystemParameters.PrimaryScreenWidth; ////Developer Desktop Height Where the Form is Designed float f_HeightRatio = new float(); float f_WidthRatio = new float(); f_HeightRatio = (float)((float)DashboardHelper.ResizedHeight / (float)i_StandardHeight); f_WidthRatio = (float)((float)DashboardHelper.ResizedWidth / (float)i_StandardWidth); properties.Height = (Convert.ToInt32(i_StandardHeight * f_HeightRatio)) / 1.07; properties.Width = (Convert.ToInt32(i_StandardWidth * f_WidthRatio)) / 1.07; } else { properties.Width = (System.Windows.SystemParameters.PrimaryScreenWidth / 1.07); properties.Height = (System.Windows.SystemParameters.PrimaryScreenHeight / 1.15); } properties.Cancelled += new EventHandler(properties_Cancelled); properties.ChangesAccepted += new EventHandler(properties_ChangesAccepted); Popup.Content = properties; Popup.Show(); }
private void properties_ChangesAccepted(object sender, EventArgs e) { Controls.GadgetProperties.AberrationDetectionChartProperties properties = Popup.Content as Controls.GadgetProperties.AberrationDetectionChartProperties; this.Parameters = properties.Parameters; this.DataFilters = properties.DataFilters; this.CustomOutputHeading = Parameters.GadgetTitle; this.CustomOutputDescription = Parameters.GadgetDescription; Popup.Close(); if (properties.HasSelectedFields) { RefreshResults(); } }
public override void GadgetBase_SizeChanged(double width, double height) { double i_StandardHeight = System.Windows.SystemParameters.PrimaryScreenHeight; //Developer Desktop Width Where the Form is Designed double i_StandardWidth = System.Windows.SystemParameters.PrimaryScreenWidth; ////Developer Desktop Height Where the Form is Designed float f_HeightRatio = new float(); float f_WidthRatio = new float(); f_HeightRatio = (float)((float)height / (float)i_StandardHeight); f_WidthRatio = (float)((float)width / (float)i_StandardWidth); if (properties == null) { properties = new Controls.GadgetProperties.AberrationDetectionChartProperties(this.DashboardHelper, this, (AberrationDetectionChartParameters)Parameters, StrataGridList); } properties.Height = (Convert.ToInt32(i_StandardHeight * f_HeightRatio)) / 1.07; properties.Width = (Convert.ToInt32(i_StandardWidth * f_WidthRatio)) / 1.07; }