/// <summary>
        /// Constructor taking optional params
        /// </summary>
        /// <param name="InType"></param>
        /// <param name="InPlatform"></param>
        /// <param name="InConfiguration"></param>
        /// <param name="InCommandLine"></param>
        /// <param name="InOptions"></param>
        public UnrealSessionRole(UnrealTargetRole InType, UnrealTargetPlatform InPlatform, UnrealTargetConfiguration InConfiguration, string InCommandLine = null, IConfigOption <UnrealAppConfig> InOptions = null)
        {
            RoleType = InType;

            Platform      = InPlatform;
            Configuration = InConfiguration;

            if (string.IsNullOrEmpty(InCommandLine))
            {
                CommandLine = "";
            }
            else
            {
                CommandLine = InCommandLine;
            }

            RequiredBuildFlags = BuildFlags.None;

            if (Globals.Params.ParseParam("dev") && !RoleType.UsesEditor())
            {
                RequiredBuildFlags |= BuildFlags.CanReplaceExecutable;
            }

            if (Globals.Params.ParseParam("bulk") && InPlatform == UnrealTargetPlatform.Android)
            {
                RequiredBuildFlags |= BuildFlags.Bulk;
            }

            Options      = InOptions;
            FilesToCopy  = new List <UnrealFileToCopy>();
            RoleModifier = ERoleModifier.None;
        }
        /// <summary>
        /// Constructor taking optional params
        /// </summary>
        /// <param name="InType"></param>
        /// <param name="InPlatform"></param>
        /// <param name="InConfiguration"></param>
        /// <param name="InCommandLine"></param>
        /// <param name="InOptions"></param>
        public UnrealSessionRole(UnrealTargetRole InType, UnrealTargetPlatform?InPlatform, UnrealTargetConfiguration InConfiguration, string InCommandLine = null, IConfigOption <UnrealAppConfig> InOptions = null)
        {
            RoleType = InType;

            Platform      = InPlatform;
            Configuration = InConfiguration;
            MapOverride   = string.Empty;

            if (string.IsNullOrEmpty(InCommandLine))
            {
                CommandLine = string.Empty;
            }
            else
            {
                CommandLine = InCommandLine;
            }

            RequiredBuildFlags = BuildFlags.None;

            if (Globals.Params.ParseParam("dev") && !RoleType.UsesEditor())
            {
                RequiredBuildFlags |= BuildFlags.CanReplaceExecutable;
            }

            //@todo: for bulk/packaged builds, we should mark the platform as capable of these as we're catching global and not test specific flags
            // where we may be running parallel tests on multiple platforms
            if (InPlatform == UnrealTargetPlatform.Android || InPlatform == UnrealTargetPlatform.IOS)
            {
                if (Globals.Params.ParseParam("bulk"))
                {
                    RequiredBuildFlags |= BuildFlags.Bulk;
                }
                else
                {
                    RequiredBuildFlags |= BuildFlags.NotBulk;
                }
            }

            if (Globals.Params.ParseParam("packaged") && (InPlatform == UnrealTargetPlatform.Switch || InPlatform == UnrealTargetPlatform.XboxOne || InPlatform == UnrealTargetPlatform.PS4))
            {
                RequiredBuildFlags |= BuildFlags.Packaged;
            }


            Options           = InOptions;
            FilesToCopy       = new List <UnrealFileToCopy>();
            CommandLineParams = new GauntletCommandLine();
            RoleModifier      = ERoleModifier.None;
        }
Beispiel #3
0
 /// <summary>
 /// Constructor taking limited params
 /// </summary>
 /// <param name="InType"></param>
 /// <param name="InPlatform"></param>
 /// <param name="InConfiguration"></param>
 /// <param name="InOptions"></param>
 public UnrealSessionRole(UnrealTargetRole InType, UnrealTargetPlatform?InPlatform, UnrealTargetConfiguration InConfiguration, IConfigOption <UnrealAppConfig> InOptions)
     : this(InType, InPlatform, InConfiguration, null, InOptions)
 {
 }
Beispiel #4
0
        private void listBoxControl1_SelectedIndexChanged()
        {
            try
            {
                btnSave.Visible = true;
                btnDong.Visible = true;

                string value = listBoxControl1.SelectedValue.ToString();
                DataRow[] dr = dt.Select("CLASS_NAME='" + value + "'");
                //Chỉ thực hiện trên cùng 1 Assembly thôi
                //object instance = Activator.CreateInstance(Type.GetType(value));
                object instance = HelpObject.CreateInstance(value);
                Control control = (Control)instance;
                if (instance is IConfigOption)
                {
                    actionControl = (IConfigOption)instance;
                    ((IConfigOption)instance).runAfterShowControl(this);
                }
                else
                {
                    btnSave.Visible = false;
                }

                if (activeControl != null && control != null)
                {
                    activeControl.Visible = false;
                    if (pcContent.Contains(control))
                    {
                        control.Visible = true;
                    }
                    else
                    {
                        pcContent.Controls.Add(control);
                    }
                    activeControl = control;
                    lblTitle.Text = dr[0]["TITLE"].ToString();
                }
                else
                {
                    pcContent.Controls.Add(control);
                    activeControl = control;
                }

                if (control != null)
                {
                    control.Dock = DockStyle.Fill;
                    control.Focus();
                }

            }
            catch (Exception ex){
                PLException.AddException(ex);
            }
        }