Beispiel #1
0
        public ActScriptEditPage(GingerCore.Actions.ActScript Act)
        {
            InitializeComponent();
            this.f = Act;
            App.FillComboFromEnumVal(ScriptActComboBox, Act.ScriptCommand);
            App.FillComboFromEnumVal(ScriptInterpreterComboBox, Act.ScriptInterpreterType);
            App.ObjFieldBinding(ScriptActComboBox, ComboBox.TextProperty, Act, ActScript.Fields.ScriptCommand);
            App.ObjFieldBinding(ScriptInterpreterComboBox, ComboBox.TextProperty, Act, ActScript.Fields.ScriptInterpreterType);
            App.ObjFieldBinding(ScriptNameComboBox, ComboBox.TextProperty, Act, ActScript.Fields.ScriptName);

            ScriptInterPreter.FileExtensions.Add(".exe");
            ScriptInterPreter.Init(Act, ActScript.Fields.ScriptInterpreter, true);
            f.ScriptPath = SHFilesPath;
        }
        public ActScriptEditPage(GingerCore.Actions.ActScript Act)
        {
            InitializeComponent();
            this.f = Act;
            GingerCore.General.FillComboFromEnumObj(ScriptActComboBox, Act.ScriptCommand);
            GingerCore.General.FillComboFromEnumObj(ScriptInterpreterComboBox, Act.ScriptInterpreterType);

            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ScriptInterpreterComboBox, ComboBox.SelectedValueProperty, Act, ActScript.Fields.ScriptInterpreterType);
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ScriptActComboBox, ComboBox.SelectedValueProperty, Act, ActScript.Fields.ScriptCommand);
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ScriptNameComboBox, ComboBox.SelectedValueProperty, Act, ActScript.Fields.ScriptName);

            ScriptNameComboBox.SelectionChanged += ScriptNameComboBox_SelectionChanged;

            ScriptInterPreter.FileExtensions.Add(".exe");
            ScriptInterPreter.Init(Act, ActScript.Fields.ScriptInterpreter, true);
            f.ScriptPath = SHFilesPath;
        }
        public ActScriptEditPage(GingerCore.Actions.ActScript Act)
        {
            InitializeComponent();
            this.f = Act;
            GingerCore.General.FillComboFromEnumObj(ScriptActComboBox, Act.ScriptCommand);
            GingerCore.General.FillComboFromEnumObj(ScriptInterpreterComboBox, Act.ScriptInterpreterType);

            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ScriptInterpreterComboBox, ComboBox.SelectedValueProperty, Act, ActScript.Fields.ScriptInterpreterType);
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ScriptActComboBox, ComboBox.SelectedValueProperty, Act, ActScript.Fields.ScriptCommand);
            GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ScriptNameComboBox, ComboBox.SelectedValueProperty, Act, ActScript.Fields.ScriptName);

            ScriptNameComboBox.SelectionChanged += ScriptNameComboBox_SelectionChanged;

            ScriptInterPreter.FileExtensions.Add(".exe");
            ScriptInterPreter.Init(Act, ActScript.Fields.ScriptInterpreter, true);
            f.ScriptPath = SHFilesPath;

            var comboEnumItem = ScriptInterpreterComboBox.Items.Cast <GingerCore.GeneralLib.ComboEnumItem>().Where(x => x.text == ActScript.eScriptInterpreterType.JS.ToString()).FirstOrDefault();

            ScriptInterpreterComboBox.Items.Remove(comboEnumItem);//Removed JS from UI
        }