Exemplo n.º 1
0
 public Control_OverrideLookupTable(OverrideLookupTable context, Profiles.Application application)
 {
     InitializeComponent();
     Table       = context;
     Application = application;
     DataContext = this;
 }
 /// <summary>
 /// Creates a new numeric binary operation holder control.
 /// </summary>
 public Control_BinaryOperationHolder(Profiles.Application application, EvaluatableType evalType)
 {
     InitializeComponent();
     Application = application;
     EvalType    = evalType;
     DataContext = this;
 }
Exemplo n.º 3
0
 public Control_ConditionNot(BooleanNot context, Profiles.Application application)
 {
     InitializeComponent();
     ParentExpr  = context;
     Application = application;
     ((FrameworkElement)Content).DataContext = this;
 }
Exemplo n.º 4
0
        public static void FocusedProfileChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            Control_LayerManager self = source as Control_LayerManager;

            if (e.OldValue != null)
            {
                Profiles.Application prof = ((Profiles.Application)e.OldValue);
                prof.ProfileChanged -= self.UpdateLayers;
                prof.SaveProfiles();

                if (self.LastSelectedLayer.ContainsKey(prof))
                {
                    self.LastSelectedLayer.Remove(prof);
                }

                self.LastSelectedLayer.Add(prof, self.lstLayers.SelectedItem as Layers.Layer);
            }
            self.UpdateLayers();
            if (e.NewValue != null)
            {
                Profiles.Application profile = ((Profiles.Application)e.NewValue);

                profile.ProfileChanged += self.UpdateLayers;

                if (self.LastSelectedLayer.ContainsKey(profile))
                {
                    self.lstLayers.SelectedItem = self.LastSelectedLayer[profile];
                }
            }
        }
Exemplo n.º 5
0
 public Control_SubconditionHolder(IHasSubConditons parent, Profiles.Application app, string description = "")
 {
     InitializeComponent();
     ParentExpr  = parent;
     Application = app;
     Description = description;
     ((FrameworkElement)Content).DataContext = this;
 }
Exemplo n.º 6
0
        internal void SetProfile(Profiles.Application profile)
        {
            if (profile != null && !profileset)
            {
                var var_types_numerical = profile.ParameterLookup?.Where(kvp => Utils.TypeUtils.IsNumericType(kvp.Value.Item1));

                profileset = true;
            }
            settingsset = false;
            this.SetSettings();
        }
 internal void SetProfile(Profiles.Application profile)
 {
     if (profile != null && !profileset)
     {
         this.profile = profile;
         UpdatePathCombobox();
         profileset = true;
     }
     settingsset = false;
     SetSettings();
 }
Exemplo n.º 8
0
 internal void SetProfile(Profiles.Application profile)
 {
     if (profile != null && !profileset)
     {
         this.profile = profile;
         AttachedApplication.SetApplication(triggerEvaluatable, profile);
         UpdatePathCombobox();
         profileset = true;
     }
     settingsset = false;
     SetSettings();
 }
Exemplo n.º 9
0
        public virtual void SetApplication(Profiles.Application app)
        {
            foreach (Layer l in Layers)
            {
                l.SetProfile(app);
            }

            foreach (Layer l in OverlayLayers)
            {
                l.SetProfile(app);
            }
        }
Exemplo n.º 10
0
 public Control_OverrideDynamicValue(OverrideDynamicValue context, Profiles.Application application)
 {
     InitializeComponent();
     Context     = context;
     Application = application;
     // Get a list that contains the label (string), the type of evaluatable (to restrict the list box), the evaluatable itself and the description.
     Parameters = context.ConstructorParameters.Select(kvp => new Tuple <string, EvaluatableType, IEvaluatable, string>(
                                                           kvp.Key,
                                                           OverrideDynamicValue.typeDynamicDefMap[context.VarType].constructorParameters.First(p => p.name == kvp.Key).type,
                                                           kvp.Value,
                                                           OverrideDynamicValue.typeDynamicDefMap[context.VarType].constructorParameters.First(p => p.name == kvp.Key).description
                                                           )).ToList();
     DataContext = this;
 }
Exemplo n.º 11
0
        internal void SetProfile(Profiles.Application profile)
        {
            if (profile != null && !profileset)
            {
                var var_types_boolean = profile.ParameterLookup?.Where(kvp => Type.GetTypeCode(kvp.Value.Item1) == TypeCode.Boolean);
                conditionPath.Items.Clear();
                foreach (var item in var_types_boolean)
                {
                    conditionPath.Items.Add(item.Key);
                }

                profileset = true;
            }
            settingsset = false;
            this.SetSettings();
        }
Exemplo n.º 12
0
        internal void SetProfile(Profiles.Application profile)
        {
            if (profile != null && !profileset)
            {
                var var_types_numerical = profile.ParameterLookup?.Where(kvp => Utils.TypeUtils.IsNumericType(kvp.Value.Item1));
                operand1Path.Items.Clear();
                operand2Path.Items.Clear();
                foreach (var item in var_types_numerical)
                {
                    operand1Path.Items.Add(item.Key);
                    operand2Path.Items.Add(item.Key);
                }

                profileset = true;
            }
            settingsset = false;
            this.SetSettings();
        }
Exemplo n.º 13
0
 public void SetProfile(Profiles.Application application)
 {
     this.cboScripts.ItemsSource = application.EffectScripts.Keys;
     this.cboScripts.IsEnabled   = application.EffectScripts.Keys.Count > 0;
     this.Application            = application;
 }
 public void SetApplication(Profiles.Application application)
 {
     Application = application;
 }
 /// <summary>
 /// Creates a new numeric binary operation holder control using the values of the specified enum as the operators item source.
 /// </summary>
 public Control_BinaryOperationHolder(Profiles.Application application, EvaluatableType evalType, Type enumType) : this(application, evalType)
 {
     operatorSelection.ItemsSource = Utils.EnumUtils.GetEnumItemsSource(enumType);
 }
Exemplo n.º 16
0
 internal void SetProfile(Profiles.Application profile)
 {
 }
Exemplo n.º 17
0
 internal void SetProfile(Profiles.Application profile)
 {
     settingsset = false;
     this.SetSettings();
 }
 /// <summary>Creates a new unary opeartion control using the given string as the name of the operator, disallowing the user to choose an option.</summary>
 public Control_NumericUnaryOpHolder(Profiles.Application application, string operatorName) : this(application) {
     StaticOperator = operatorName;
 }
 /// <summary>Creates a new unary operation control using the given Enum type as a source for the possible operators to choose from.</summary>
 public Control_NumericUnaryOpHolder(Profiles.Application application, Type enumType) : this(application) {
     OperatorList = Utils.EnumUtils.GetEnumItemsSource(enumType).ToDictionary(kvp => kvp.Key, kvp => kvp.Value);
 }
 /// <summary>Base constructor for the unary operation holder.</summary>
 public Control_NumericUnaryOpHolder(Profiles.Application application)
 {
     InitializeComponent();
     Application = application;
     DataContext = this;
 }
Exemplo n.º 21
0
 internal void SetProfile(Profiles.Application profile)
 {
     variablePicker.Application = maxVariablePicker.Application = profile;
 }
 public void SetApplication(Profiles.Application app)
 {
     varPathPicker.Application = app;
 }
Exemplo n.º 23
0
 internal void SetApplication(Profiles.Application profile)
 {
     VariablePath.Application = MaxVariablePath.Application = profile;
 }
Exemplo n.º 24
0
 public void SetApplication(Profiles.Application app)
 {
     valuePath.ItemsSource = app.ParameterLookup?.Where(kvp => Utils.TypeUtils.IsNumericType(kvp.Value.Item1)).Select(kvp => kvp.Key);
 }
Exemplo n.º 25
0
 /// <summary>Updates the application providing data to this evaluatable context. Updates the dropdowns.</summary>
 public void SetApplication(Profiles.Application application)
 {
     this.application    = application;
     GSIPath.ItemsSource = application?.ParameterLookup?.Where(kvp => kvp.Value.Item1.IsEnum).Select(x => x.Key);
     UpdateEnumDropDown();
 }