예제 #1
0
 private void buttonParametersSettings_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         MassParameterWindow paramWindow = new MassParameterWindow(m_app, massConfig);
         if ((bool)paramWindow.ShowDialog())
         {
             massConfig = paramWindow.MassConfig;
             if (massConfig.UpdateType == ParameterUpdateType.FromHostToMass)
             {
                 expanderParameter.Header = "Linked Parameters - (Floors to Masses)";
             }
             else if (massConfig.UpdateType == ParameterUpdateType.FromMassToHost)
             {
                 expanderParameter.Header = "Linked Parameters - (Masses to Floors)";
             }
             dataGridParameters.ItemsSource = null;
             dataGridParameters.ItemsSource = massConfig.MassParameters;
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("Failed to set linked parameters.\n" + ex.Message, "Linked Parameters", MessageBoxButton.OK, MessageBoxImage.Warning);
     }
 }
예제 #2
0
        private void buttonParametersSettings_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var paramWindow = new MassParameterWindow(app, massConfig);
                if (!(bool)paramWindow.ShowDialog())
                {
                    return;
                }

                massConfig = paramWindow.MassConfig;
                if (massConfig.UpdateType == ParameterUpdateType.FromHostToMass)
                {
                    expanderParameter.Header = "Linked Parameters - (Areas to Masses)";
                }
                else if (massConfig.UpdateType == ParameterUpdateType.FromMassToHost)
                {
                    expanderParameter.Header = "Linked Parameters - (Masses to Areas)";
                }
                dataGridParameters.ItemsSource = null;
                dataGridParameters.ItemsSource = massConfig.MassParameters;
            }
            catch (Exception ex)
            {
                Log.AppendLog(LogMessageType.EXCEPTION, ex.Message);
                MessageBox.Show("Failed to set linked parameters.\n" + ex.Message, "Linked Parameters", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }