예제 #1
0
        private void LoadApplicationSettingsControl()
        {
            string controlName = app.SettingsControl;

            if (!String.IsNullOrEmpty(controlName))
            {
                try
                {
                    string currPath = this.AppRelativeVirtualPath;
                    currPath = currPath.Substring(0, currPath.LastIndexOf("/"));
                    string ctrlPath = currPath + "/ApplicationInstallerControls/" + controlName;

                    if (File.Exists(Server.MapPath(ctrlPath)))
                    {
                        Control ctrl = Page.LoadControl(ctrlPath);
                        settings = (IWebInstallerSettings)ctrl;
                        appSettings.Controls.Add(ctrl);
                    }
                    else
                    {
                        divSettings.Visible = false;
                    }
                }
                catch (Exception ex)
                {
                    ShowErrorMessage("APPINSTALLER_LOAD_CONTROL", ex);
                    return;
                }
            }
            else
            {
                divSettings.Visible = false;
            }
        }
        private void LoadApplicationSettingsControl()
        {
            string controlName = app.SettingsControl;
            if (!String.IsNullOrEmpty(controlName))
            {
                try
                {
                    string currPath = this.AppRelativeVirtualPath;
                    currPath = currPath.Substring(0, currPath.LastIndexOf("/"));
                    string ctrlPath = currPath + "/ApplicationInstallerControls/" + controlName;

                    if (File.Exists(Server.MapPath(ctrlPath)))
                    {
                        Control ctrl = Page.LoadControl(ctrlPath);
                        settings = (IWebInstallerSettings)ctrl;
                        appSettings.Controls.Add(ctrl);
                    }
                    else
                    {
                        divSettings.Visible = false;
                    }
                }
                catch (Exception ex)
                {
                    ShowErrorMessage("APPINSTALLER_LOAD_CONTROL", ex);
                    return;
                }
            }
            else
            {
                divSettings.Visible = false;
            }
        }