예제 #1
0
 private void OnActivityChanged(object sender, ActivityChangedEventArgs eventArgs)
 {
     if (ActivityChanged != null)
     {
         ActivityChanged(sender, eventArgs);
     }
 }
예제 #2
0
 private void flowsheet_ActivityChanged(Object sender, ActivityChangedEventArgs eventArgs)
 {
     if (eventArgs.FlowsheetActivity == FlowsheetActivity.Default ||
         eventArgs.FlowsheetActivity == FlowsheetActivity.AddingConnStepOne ||
         eventArgs.FlowsheetActivity == FlowsheetActivity.AddingConnStepTwo ||
         eventArgs.FlowsheetActivity == FlowsheetActivity.DeletingConnection ||
         eventArgs.FlowsheetActivity == FlowsheetActivity.SelectingSnapshot)
     {
         this.UncheckAllButtons();
     }
     else if (eventArgs.FlowsheetActivity == FlowsheetActivity.AddingSolvable)
     {
         RadioButton btn = GetRadioButton(eventArgs.SolvableType);
         if (btn != null && !btn.Checked)
         {
             btn.Checked = true;
         }
     }
 }
예제 #3
0
 private void flowsheet_ActivityChanged(Object sender, ActivityChangedEventArgs eventArgs)
 {
     if (eventArgs.FlowsheetActivity == FlowsheetActivity.Default ||
         eventArgs.FlowsheetActivity == FlowsheetActivity.AddingConnStepOne ||
         eventArgs.FlowsheetActivity == FlowsheetActivity.AddingConnStepTwo ||
         eventArgs.FlowsheetActivity == FlowsheetActivity.DeletingConnection ||
         eventArgs.FlowsheetActivity == FlowsheetActivity.SelectingSnapshot)
     {
         this.UncheckAllButtons();
     }
     else if (eventArgs.FlowsheetActivity == FlowsheetActivity.AddingSolvable)
     {
         if (eventArgs.SolvableType == typeof(DryingGasStream))
         {
             if (!this.radioButtonGasStream.Checked)
             {
                 this.radioButtonGasStream.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(SolidDryingMaterialStream))
         {
             if (!this.radioButtonSolidMaterialStream.Checked)
             {
                 this.radioButtonSolidMaterialStream.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(LiquidDryingMaterialStream))
         {
             if (!this.radioButtonLiquidMaterialStream.Checked)
             {
                 this.radioButtonLiquidMaterialStream.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Compressor))
         {
             if (!this.radioButtonCompressor.Checked)
             {
                 this.radioButtonCompressor.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(LiquidDryer))
         {
             if (!this.radioButtonDryerLiquid.Checked)
             {
                 this.radioButtonDryerLiquid.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(SolidDryer))
         {
             if (!this.radioButtonDryerSolid.Checked)
             {
                 this.radioButtonDryerSolid.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(HeatExchanger))
         {
             if (!this.radioButtonHeatExchanger.Checked)
             {
                 this.radioButtonHeatExchanger.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Cooler))
         {
             if (!this.radioButtonCooler.Checked)
             {
                 this.radioButtonCooler.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(ElectrostaticPrecipitator))
         {
             if (!this.radioButtonElectrostaticPrecipitator.Checked)
             {
                 this.radioButtonElectrostaticPrecipitator.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Cyclone))
         {
             if (!this.radioButtonCyclone.Checked)
             {
                 this.radioButtonCyclone.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Ejector))
         {
             if (!this.radioButtonEjector.Checked)
             {
                 this.radioButtonEjector.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(WetScrubber))
         {
             if (!this.radioButtonWetScrubber.Checked)
             {
                 this.radioButtonWetScrubber.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(ScrubberCondenser))
         {
             if (!this.radioButtonScrubberCondenser.Checked)
             {
                 this.radioButtonScrubberCondenser.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Mixer))
         {
             if (!this.radioButtonMixer.Checked)
             {
                 this.radioButtonMixer.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Tee))
         {
             if (!this.radioButtonTee.Checked)
             {
                 this.radioButtonTee.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(FlashTank))
         {
             if (!this.radioButtonFlashTank.Checked)
             {
                 this.radioButtonFlashTank.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Fan))
         {
             if (!this.radioButtonFan.Checked)
             {
                 this.radioButtonFan.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Valve))
         {
             if (!this.radioButtonValve.Checked)
             {
                 this.radioButtonValve.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(BagFilter))
         {
             if (!this.radioButtonBagFilter.Checked)
             {
                 this.radioButtonBagFilter.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(AirFilter))
         {
             if (!this.radioButtonAirFilter.Checked)
             {
                 this.radioButtonAirFilter.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Pump))
         {
             if (!this.radioButtonPump.Checked)
             {
                 this.radioButtonPump.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Recycle))
         {
             if (!this.radioButtonRecycle.Checked)
             {
                 this.radioButtonRecycle.Checked = true;
             }
         }
         else if (eventArgs.SolvableType == typeof(Heater))
         {
             if (!this.radioButtonHeater.Checked)
             {
                 this.radioButtonHeater.Checked = true;
             }
         }
     }
 }