Example #1
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);
            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);
            headerText = new Literal();
            header.Controls.Add(headerText);
            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);
            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            // tabstrip.EnableViewState = false;  // ComponentArt ComboBox does not yet work with ViewState off!
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            // multipage.EnableViewState = false; // ComponentArt ComboBox does not yet work with ViewState off!
            content.Controls.Add(multipage);

            #endregion

            #region Child Controls for Default Folder

            ComponentArt.Web.UI.PageView DefaultView = new ComponentArt.Web.UI.PageView();
            DefaultView.CssClass = "PageContent";
            multipage.PageViews.Add(DefaultView);

            TabStripTab DefaultTab = new TabStripTab();
            DefaultTab.Text       = "Default";
            DefaultTab.PageViewId = DefaultView.ID;
            tabstrip.Tabs.Add(DefaultTab);

            tbName    = new TextBox();
            tbName.ID = "tbName";
            tbName.EnableViewState = false;
            registerControl(DefaultView, "Name", tbName);

            tbDescription    = new TextBox();
            tbDescription.ID = "tbDescription";
            tbDescription.EnableViewState = false;
            registerControl(DefaultView, "Description", tbDescription);

            tbOrderNum    = new TextBox();
            tbOrderNum.ID = "tbOrderNum";
            tbOrderNum.EnableViewState = false;
            reqOrderNum    = new RequiredFieldValidator();
            reqOrderNum.ID = "reqOrderNum";
            reqOrderNum.ControlToValidate = tbOrderNum.ID;
            reqOrderNum.ErrorMessage      = "*";
            reqOrderNum.Display           = ValidatorDisplay.Dynamic;
            rngOrderNum    = new RangeValidator();
            rngOrderNum.ID = "rngOrderNum";
            rngOrderNum.ControlToValidate = tbOrderNum.ID;
            rngOrderNum.ErrorMessage      = "*";
            rngOrderNum.Display           = ValidatorDisplay.Dynamic;
            rngOrderNum.Type         = ValidationDataType.Integer;
            rngOrderNum.MinimumValue = "-2147483648";
            rngOrderNum.MaximumValue = "2147483647";
            registerControl(DefaultView, "OrderNum", tbOrderNum, reqOrderNum, rngOrderNum);

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                  = new Button();
            btCancel.Text             = "Cancel";
            btCancel.Width            = Unit.Pixel(72);
            btCancel.EnableViewState  = false;
            btCancel.CausesValidation = false;
            btCancel.Click           += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();
            ChildControlsCreated = true;
        }
Example #2
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);
            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);
            headerText = new Literal();
            header.Controls.Add(headerText);
            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);
            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #endregion

            #region Child Controls for Default Folder

            DefaultView          = new ComponentArt.Web.UI.PageView();
            DefaultView.CssClass = "PageContent";
            multipage.PageViews.Add(DefaultView);

            TabStripTab DefaultTab = new TabStripTab();
            DefaultTab.Text       = "Default";
            DefaultTab.PageViewId = DefaultView.ID;
            tabstrip.Tabs.Add(DefaultTab);

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Class Name</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbName = new TextBox();
            tbName.EnableViewState = false;
            DefaultView.Controls.Add(tbName);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Instructor</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboInstructor                      = new ComponentArt.Web.UI.ComboBox();
            comboInstructor.CssClass             = "comboBox";
            comboInstructor.HoverCssClass        = "comboBoxHover";
            comboInstructor.FocusedCssClass      = "comboBoxHover";
            comboInstructor.TextBoxCssClass      = "comboTextBox";
            comboInstructor.DropDownCssClass     = "comboDropDown";
            comboInstructor.ItemCssClass         = "comboItem";
            comboInstructor.ItemHoverCssClass    = "comboItemHover";
            comboInstructor.SelectedItemCssClass = "comboItemHover";
            comboInstructor.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboInstructor.DropImageUrl         = "combobox_images/drop.gif";
            comboInstructor.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboInstructor);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">ParentSeminar</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboParentSeminar                      = new ComponentArt.Web.UI.ComboBox();
            comboParentSeminar.CssClass             = "comboBox";
            comboParentSeminar.HoverCssClass        = "comboBoxHover";
            comboParentSeminar.FocusedCssClass      = "comboBoxHover";
            comboParentSeminar.TextBoxCssClass      = "comboTextBox";
            comboParentSeminar.DropDownCssClass     = "comboDropDown";
            comboParentSeminar.ItemCssClass         = "comboItem";
            comboParentSeminar.ItemHoverCssClass    = "comboItemHover";
            comboParentSeminar.SelectedItemCssClass = "comboItemHover";
            comboParentSeminar.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboParentSeminar.DropImageUrl         = "combobox_images/drop.gif";
            comboParentSeminar.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboParentSeminar);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">ParentDefinition</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboParentDefinition                      = new ComponentArt.Web.UI.ComboBox();
            comboParentDefinition.CssClass             = "comboBox";
            comboParentDefinition.HoverCssClass        = "comboBoxHover";
            comboParentDefinition.FocusedCssClass      = "comboBoxHover";
            comboParentDefinition.TextBoxCssClass      = "comboTextBox";
            comboParentDefinition.DropDownCssClass     = "comboDropDown";
            comboParentDefinition.ItemCssClass         = "comboItem";
            comboParentDefinition.ItemHoverCssClass    = "comboItemHover";
            comboParentDefinition.SelectedItemCssClass = "comboItemHover";
            comboParentDefinition.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboParentDefinition.DropImageUrl         = "combobox_images/drop.gif";
            comboParentDefinition.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboParentDefinition);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Location</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboLocation                      = new ComponentArt.Web.UI.ComboBox();
            comboLocation.CssClass             = "comboBox";
            comboLocation.HoverCssClass        = "comboBoxHover";
            comboLocation.FocusedCssClass      = "comboBoxHover";
            comboLocation.TextBoxCssClass      = "comboTextBox";
            comboLocation.DropDownCssClass     = "comboDropDown";
            comboLocation.ItemCssClass         = "comboItem";
            comboLocation.ItemHoverCssClass    = "comboItemHover";
            comboLocation.SelectedItemCssClass = "comboItemHover";
            comboLocation.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboLocation.DropImageUrl         = "combobox_images/drop.gif";
            comboLocation.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboLocation);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">AccessControlGroup</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboAccessControlGroup                      = new ComponentArt.Web.UI.ComboBox();
            comboAccessControlGroup.CssClass             = "comboBox";
            comboAccessControlGroup.HoverCssClass        = "comboBoxHover";
            comboAccessControlGroup.FocusedCssClass      = "comboBoxHover";
            comboAccessControlGroup.TextBoxCssClass      = "comboTextBox";
            comboAccessControlGroup.DropDownCssClass     = "comboDropDown";
            comboAccessControlGroup.ItemCssClass         = "comboItem";
            comboAccessControlGroup.ItemHoverCssClass    = "comboItemHover";
            comboAccessControlGroup.SelectedItemCssClass = "comboItemHover";
            comboAccessControlGroup.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboAccessControlGroup.DropImageUrl         = "combobox_images/drop.gif";
            comboAccessControlGroup.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboAccessControlGroup);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Child Controls for Occupancy Folder

            OccupancyView          = new ComponentArt.Web.UI.PageView();
            OccupancyView.CssClass = "PageContent";
            multipage.PageViews.Add(OccupancyView);

            TabStripTab OccupancyTab = new TabStripTab();
            OccupancyTab.Text       = "Occupancy";
            OccupancyTab.PageViewId = OccupancyView.ID;
            tabstrip.Tabs.Add(OccupancyTab);

            OccupancyView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            OccupancyView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">OccupancyMax</span>"));
            OccupancyView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbOccupancyMax    = new TextBox();
            tbOccupancyMax.ID = this.ID + "_OccupancyMax";
            tbOccupancyMax.EnableViewState = false;
            OccupancyView.Controls.Add(tbOccupancyMax);
            revOccupancyMax = new RegularExpressionValidator();
            revOccupancyMax.ControlToValidate    = tbOccupancyMax.ID;
            revOccupancyMax.ValidationExpression = "^(\\+|-)?\\d+$";
            revOccupancyMax.ErrorMessage         = "*";
            revOccupancyMax.Display         = ValidatorDisplay.Dynamic;
            revOccupancyMax.EnableViewState = false;
            OccupancyView.Controls.Add(revOccupancyMax);
            OccupancyView.Controls.Add(new LiteralControl("</span></div>"));

            OccupancyView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            OccupancyView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">OccupancyTarget</span>"));
            OccupancyView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbOccupancyTarget    = new TextBox();
            tbOccupancyTarget.ID = this.ID + "_OccupancyTarget";
            tbOccupancyTarget.EnableViewState = false;
            OccupancyView.Controls.Add(tbOccupancyTarget);
            revOccupancyTarget = new RegularExpressionValidator();
            revOccupancyTarget.ControlToValidate    = tbOccupancyTarget.ID;
            revOccupancyTarget.ValidationExpression = "^(\\+|-)?\\d+$";
            revOccupancyTarget.ErrorMessage         = "*";
            revOccupancyTarget.Display         = ValidatorDisplay.Dynamic;
            revOccupancyTarget.EnableViewState = false;
            OccupancyView.Controls.Add(revOccupancyTarget);
            OccupancyView.Controls.Add(new LiteralControl("</span></div>"));

            OccupancyView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            OccupancyView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">OccupancyCurrent</span>"));
            OccupancyView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbOccupancyCurrent    = new TextBox();
            tbOccupancyCurrent.ID = this.ID + "_OccupancyCurrent";
            tbOccupancyCurrent.EnableViewState = false;
            OccupancyView.Controls.Add(tbOccupancyCurrent);
            revOccupancyCurrent = new RegularExpressionValidator();
            revOccupancyCurrent.ControlToValidate    = tbOccupancyCurrent.ID;
            revOccupancyCurrent.ValidationExpression = "^(\\+|-)?\\d+$";
            revOccupancyCurrent.ErrorMessage         = "*";
            revOccupancyCurrent.Display         = ValidatorDisplay.Dynamic;
            revOccupancyCurrent.EnableViewState = false;
            OccupancyView.Controls.Add(revOccupancyCurrent);
            OccupancyView.Controls.Add(new LiteralControl("</span></div>"));

            OccupancyView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            OccupancyView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">OccupancyCheckDate</span>"));
            OccupancyView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbOccupancyCheckDate = new TextBox();
            tbOccupancyCheckDate.EnableViewState = false;
            OccupancyView.Controls.Add(tbOccupancyCheckDate);
            OccupancyView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Child Controls for Schedule Folder

            ScheduleView          = new ComponentArt.Web.UI.PageView();
            ScheduleView.CssClass = "PageContent";
            multipage.PageViews.Add(ScheduleView);

            TabStripTab ScheduleTab = new TabStripTab();
            ScheduleTab.Text       = "Schedule";
            ScheduleTab.PageViewId = ScheduleView.ID;
            tabstrip.Tabs.Add(ScheduleTab);

            ScheduleView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            ScheduleView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Signin Start</span>"));
            ScheduleView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbSigninStart = new TextBox();
            tbSigninStart.EnableViewState = false;
            ScheduleView.Controls.Add(tbSigninStart);
            ScheduleView.Controls.Add(new LiteralControl("</span></div>"));

            ScheduleView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            ScheduleView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Signin End</span>"));
            ScheduleView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbSigninEnd = new TextBox();
            tbSigninEnd.EnableViewState = false;
            ScheduleView.Controls.Add(tbSigninEnd);
            ScheduleView.Controls.Add(new LiteralControl("</span></div>"));

            ScheduleView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            ScheduleView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Class Start</span>"));
            ScheduleView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbClassStart = new TextBox();
            tbClassStart.EnableViewState = false;
            ScheduleView.Controls.Add(tbClassStart);
            ScheduleView.Controls.Add(new LiteralControl("</span></div>"));

            ScheduleView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            ScheduleView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Class End</span>"));
            ScheduleView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbClassEnd = new TextBox();
            tbClassEnd.EnableViewState = false;
            ScheduleView.Controls.Add(tbClassEnd);
            ScheduleView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = Localization.Strings.OK;
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                  = new Button();
            btCancel.Text             = Localization.Strings.Cancel;
            btCancel.Width            = Unit.Pixel(72);
            btCancel.EnableViewState  = false;
            btCancel.CausesValidation = false;
            btCancel.Click           += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = Localization.Strings.Delete;
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();
            ChildControlsCreated = true;
        }
Example #3
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            Panel container = new Panel();
            container.CssClass = this.CssClass;
            Controls.Add(container);
            Panel header = new Panel();
            header.CssClass = "pHead";
            container.Controls.Add(header);
            headerText = new Literal();
            header.Controls.Add(headerText);
            Panel content = new Panel();
            content.CssClass = "pContent";
            container.Controls.Add(content);
            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId = "DefaultTabLook";
            defaultTabLook.CssClass = "DefaultTab";
            defaultTabLook.HoverCssClass = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth = Unit.Parse("3");
            defaultTabLook.LeftIconHeight = Unit.Parse("21");
            defaultTabLook.RightIconWidth = Unit.Parse("3");
            defaultTabLook.RightIconHeight = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId = "SelectedTabLook";
            selectedTabLook.CssClass = "SelectedTab";
            selectedTabLook.LabelPaddingLeft = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth = Unit.Parse("3");
            selectedTabLook.LeftIconHeight = Unit.Parse("21");
            selectedTabLook.RightIconWidth = Unit.Parse("3");
            selectedTabLook.RightIconHeight = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID = this.ID + "_TabStrip";
            tabstrip.CssClass = "TopGroup";
            tabstrip.DefaultItemLookId = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing = 1;
            tabstrip.ImagesBaseUrl = "tabstrip_images/";
            tabstrip.MultiPageId = this.ID + "_MultiPage";
            tabstrip.EnableViewState = false;
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage = new ComponentArt.Web.UI.MultiPage();
            multipage.ID = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            multipage.EnableViewState = false;
            content.Controls.Add(multipage);

            #endregion

            #region Child Controls for Default Folder

            ComponentArt.Web.UI.PageView DefaultView = new ComponentArt.Web.UI.PageView();
            DefaultView.CssClass = "PageContent";
            multipage.PageViews.Add(DefaultView);

            TabStripTab DefaultTab = new TabStripTab();
            DefaultTab.Text = "Default";
            DefaultTab.PageViewId = DefaultView.ID;
            tabstrip.Tabs.Add(DefaultTab);

            tbName = new TextBox();
            tbName.ID = "tbName";
            tbName.EnableViewState = false;
            registerControl(DefaultView, "Name", tbName);

            tbPromotionTimeInRank = new TextBox();
            tbPromotionTimeInRank.ID = "tbPromotionTimeInRank";
            tbPromotionTimeInRank.EnableViewState = false;
            revPromotionTimeInRank = new RegularExpressionValidator();
            revPromotionTimeInRank.ID = "RevPromotionTimeInRank";
            revPromotionTimeInRank.ControlToValidate = tbPromotionTimeInRank.ID;
            revPromotionTimeInRank.ValidationExpression = @"^\s*-?(\d{0,7}|10[0-5]\d{0,5}|106[0-6]\d{0,4}|1067[0-4]\d{0,3}|10675[0-1]\d{0,2}|((\d{0,7}|10[0-5]\d{0,5}|106[0-6]\d{0,4}|1067[0-4]\d{0,3}|10675[0-1]\d{0,2})\.)?([0-1]?[0-9]|2[0-3]):[0-5]?[0-9](:[0-5]?[0-9](\.\d{1,7})?)?)\s*$";
            revPromotionTimeInRank.ErrorMessage = "*";
            revPromotionTimeInRank.Display = ValidatorDisplay.Dynamic;
            revPromotionTimeInRank.SetFocusOnError = true;
            reqPromotionTimeInRank = new RequiredFieldValidator();
            reqPromotionTimeInRank.ID = "reqPromotionTimeInRank";
            reqPromotionTimeInRank.ControlToValidate = tbPromotionTimeInRank.ID;
            reqPromotionTimeInRank.ErrorMessage = "*";
            reqPromotionTimeInRank.Display = ValidatorDisplay.Dynamic;
            registerControl(DefaultView, "Promotion Time In Rank", tbPromotionTimeInRank, revPromotionTimeInRank, reqPromotionTimeInRank);

            tbPromotionTimeFromLastTest = new TextBox();
            tbPromotionTimeFromLastTest.ID = "tbPromotionTimeFromLastTest";
            tbPromotionTimeFromLastTest.EnableViewState = false;
            revPromotionTimeFromLastTest = new RegularExpressionValidator();
            revPromotionTimeFromLastTest.ID = "RevPromotionTimeFromLastTest";
            revPromotionTimeFromLastTest.ControlToValidate = tbPromotionTimeFromLastTest.ID;
            revPromotionTimeFromLastTest.ValidationExpression = @"^\s*-?(\d{0,7}|10[0-5]\d{0,5}|106[0-6]\d{0,4}|1067[0-4]\d{0,3}|10675[0-1]\d{0,2}|((\d{0,7}|10[0-5]\d{0,5}|106[0-6]\d{0,4}|1067[0-4]\d{0,3}|10675[0-1]\d{0,2})\.)?([0-1]?[0-9]|2[0-3]):[0-5]?[0-9](:[0-5]?[0-9](\.\d{1,7})?)?)\s*$";
            revPromotionTimeFromLastTest.ErrorMessage = "*";
            revPromotionTimeFromLastTest.Display = ValidatorDisplay.Dynamic;
            revPromotionTimeFromLastTest.SetFocusOnError = true;
            reqPromotionTimeFromLastTest = new RequiredFieldValidator();
            reqPromotionTimeFromLastTest.ID = "reqPromotionTimeFromLastTest";
            reqPromotionTimeFromLastTest.ControlToValidate = tbPromotionTimeFromLastTest.ID;
            reqPromotionTimeFromLastTest.ErrorMessage = "*";
            reqPromotionTimeFromLastTest.Display = ValidatorDisplay.Dynamic;
            registerControl(DefaultView, "Promotion Time From Last Test", tbPromotionTimeFromLastTest, revPromotionTimeFromLastTest, reqPromotionTimeFromLastTest);

            tbPromotionRequirements = new TextBox();
            tbPromotionRequirements.ID = "tbPromotionRequirements";
            tbPromotionRequirements.EnableViewState = false;
            registerControl(DefaultView, "Promotion Requirements", tbPromotionRequirements);

            tbPromotionFee = new TextBox();
            tbPromotionFee.ID = "tbPromotionFee";
            tbPromotionFee.EnableViewState = false;
            reqPromotionFee = new RequiredFieldValidator();
            reqPromotionFee.ID = "reqPromotionFee";
            reqPromotionFee.ControlToValidate = tbPromotionFee.ID;
            reqPromotionFee.ErrorMessage = "*";
            reqPromotionFee.Display = ValidatorDisplay.Dynamic;
            rngPromotionFee = new RangeValidator();
            rngPromotionFee.ID = "rngPromotionFee";
            rngPromotionFee.ControlToValidate = tbPromotionFee.ID;
            rngPromotionFee.ErrorMessage = "*";
            rngPromotionFee.Display = ValidatorDisplay.Dynamic;
            rngPromotionFee.Type = ValidationDataType.Double;
            rngPromotionFee.MinimumValue = "0";
            rngPromotionFee.MaximumValue = "79228162514264337593543950335";
            registerControl(DefaultView, "Promotion Fee", tbPromotionFee, reqPromotionFee, rngPromotionFee);

            ddPromotionRank = new DropDownList();
            ddPromotionRank.ID = "ddPromotionRank";
            ddPromotionRank.EnableViewState = false;
            registerControl(DefaultView, "PromotionRank", ddPromotionRank);

            cbPromotionResetIP = new CheckBox();
            cbPromotionResetIP.ID = "cbPromotionResetIP";
            cbPromotionResetIP.EnableViewState = false;
            registerControl(DefaultView, "PromotionResetIP", cbPromotionResetIP);

            tbOrderNum = new TextBox();
            tbOrderNum.ID = "tbOrderNum";
            tbOrderNum.EnableViewState = false;
            reqOrderNum = new RequiredFieldValidator();
            reqOrderNum.ID = "reqOrderNum";
            reqOrderNum.ControlToValidate = tbOrderNum.ID;
            reqOrderNum.ErrorMessage = "*";
            reqOrderNum.Display = ValidatorDisplay.Dynamic;
            rngOrderNum = new RangeValidator();
            rngOrderNum.ID = "rngOrderNum";
            rngOrderNum.ControlToValidate = tbOrderNum.ID;
            rngOrderNum.ErrorMessage = "*";
            rngOrderNum.Display = ValidatorDisplay.Dynamic;
            rngOrderNum.Type = ValidationDataType.Integer;
            rngOrderNum.MinimumValue = "-2147483648";
            rngOrderNum.MaximumValue = "2147483647";
            registerControl(DefaultView, "OrderNum", tbOrderNum, reqOrderNum, rngOrderNum);

            tbDescription = new TextBox();
            tbDescription.ID = "tbDescription";
            tbDescription.EnableViewState = false;
            registerControl(DefaultView, "Description", tbDescription);

            #endregion

            #region Child Controls for Rappahanock Folder

            ComponentArt.Web.UI.PageView RappahanockView = new ComponentArt.Web.UI.PageView();
            RappahanockView.CssClass = "PageContent";
            multipage.PageViews.Add(RappahanockView);

            TabStripTab RappahanockTab = new TabStripTab();
            RappahanockTab.Text = "Rappahanock";
            RappahanockTab.PageViewId = RappahanockView.ID;
            tabstrip.Tabs.Add(RappahanockTab);

            ddItem = new DropDownList();
            ddItem.ID = "ddItem";
            ddItem.EnableViewState = false;
            registerControl(RappahanockView, "Item", ddItem);

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk = new Button();
            btOk.Text = "OK";
            btOk.Width = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel = new Button();
            btCancel.Text = "Cancel";
            btCancel.Width = Unit.Pixel(72);
            btCancel.EnableViewState = false;
            btCancel.CausesValidation = false;
            btCancel.Click += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete = new Button();
            btDelete.Text = "Delete";
            btDelete.Width = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();
            ChildControlsCreated = true;
        }
Example #4
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);
            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);
            headerText = new Literal();
            header.Controls.Add(headerText);
            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);
            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            // tabstrip.EnableViewState = false;  // ComponentArt ComboBox does not yet work with ViewState off!
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            // multipage.EnableViewState = false; // ComponentArt ComboBox does not yet work with ViewState off!
            content.Controls.Add(multipage);

            #endregion

            #region Child Controls for Default Folder

            ComponentArt.Web.UI.PageView DefaultView = new ComponentArt.Web.UI.PageView();
            DefaultView.CssClass = "PageContent";
            multipage.PageViews.Add(DefaultView);

            TabStripTab DefaultTab = new TabStripTab();
            DefaultTab.Text       = "Default";
            DefaultTab.PageViewId = DefaultView.ID;
            tabstrip.Tabs.Add(DefaultTab);

            tbName    = new TextBox();
            tbName.ID = "tbName";
            tbName.EnableViewState = false;
            registerControl(DefaultView, "Name", tbName);

            tbDescription    = new TextBox();
            tbDescription.ID = "tbDescription";
            tbDescription.EnableViewState = false;
            registerControl(DefaultView, "Description", tbDescription);

            tbTestDate    = new TextBox();
            tbTestDate.ID = "tbTestDate";
            tbTestDate.EnableViewState = false;
            reqTestDate    = new RequiredFieldValidator();
            reqTestDate.ID = "reqTestDate";
            reqTestDate.ControlToValidate = tbTestDate.ID;
            reqTestDate.ErrorMessage      = "*";
            reqTestDate.Display           = ValidatorDisplay.Dynamic;
            revTestDate    = new RegularExpressionValidator();
            revTestDate.ID = "revTestDate";
            revTestDate.ControlToValidate    = tbTestDate.ID;
            revTestDate.ErrorMessage         = "*";
            revTestDate.Display              = ValidatorDisplay.Dynamic;
            revTestDate.ValidationExpression = @"^(?=\d)(?:(?:31(?!.(?:0?[2469]|11))|(?:30|29)(?!.0?2)|29(?=.0?2.(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00)))(?:\x20|$))|(?:2[0-8]|1\d|0?[1-9]))([-./])(?:1[012]|0?[1-9])\1(?:1[6-9]|[2-9]\d)?\d\d(?:(?=\x20\d)\x20|$))?(((0?[1-9]|1[012])(:[0-5]\d){0,2}(\x20[AP]M))|([01]\d|2[0-3])(:[0-5]\d){1,2})?$";
            registerControl(DefaultView, "Test Date", tbTestDate, reqTestDate, revTestDate);

            comboLocation                      = new ComponentArt.Web.UI.ComboBox();
            comboLocation.ID                   = "comboLocation";
            comboLocation.CssClass             = "comboBox";
            comboLocation.HoverCssClass        = "comboBoxHover";
            comboLocation.FocusedCssClass      = "comboBoxHover";
            comboLocation.TextBoxCssClass      = "comboTextBox";
            comboLocation.DropDownCssClass     = "comboDropDown";
            comboLocation.ItemCssClass         = "comboItem";
            comboLocation.ItemHoverCssClass    = "comboItemHover";
            comboLocation.SelectedItemCssClass = "comboItemHover";
            comboLocation.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboLocation.DropImageUrl         = "combobox_images/drop.gif";
            comboLocation.Width                = Unit.Pixel(300);
            // comboLocation.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(DefaultView, "Location", comboLocation);

            #endregion

            #region Child Controls for List Generator Folder

            ComponentArt.Web.UI.PageView List_GeneratorView = new ComponentArt.Web.UI.PageView();
            List_GeneratorView.CssClass = "PageContent";
            multipage.PageViews.Add(List_GeneratorView);

            TabStripTab List_GeneratorTab = new TabStripTab();
            List_GeneratorTab.Text       = "List Generator";
            List_GeneratorTab.PageViewId = List_GeneratorView.ID;
            tabstrip.Tabs.Add(List_GeneratorTab);

            comboListMemberType1                      = new ComponentArt.Web.UI.ComboBox();
            comboListMemberType1.ID                   = "comboListMemberType1";
            comboListMemberType1.CssClass             = "comboBox";
            comboListMemberType1.HoverCssClass        = "comboBoxHover";
            comboListMemberType1.FocusedCssClass      = "comboBoxHover";
            comboListMemberType1.TextBoxCssClass      = "comboTextBox";
            comboListMemberType1.DropDownCssClass     = "comboDropDown";
            comboListMemberType1.ItemCssClass         = "comboItem";
            comboListMemberType1.ItemHoverCssClass    = "comboItemHover";
            comboListMemberType1.SelectedItemCssClass = "comboItemHover";
            comboListMemberType1.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboListMemberType1.DropImageUrl         = "combobox_images/drop.gif";
            comboListMemberType1.Width                = Unit.Pixel(300);
            // comboListMemberType1.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(List_GeneratorView, "ListMemberType1", comboListMemberType1);

            comboListMemberType2                      = new ComponentArt.Web.UI.ComboBox();
            comboListMemberType2.ID                   = "comboListMemberType2";
            comboListMemberType2.CssClass             = "comboBox";
            comboListMemberType2.HoverCssClass        = "comboBoxHover";
            comboListMemberType2.FocusedCssClass      = "comboBoxHover";
            comboListMemberType2.TextBoxCssClass      = "comboTextBox";
            comboListMemberType2.DropDownCssClass     = "comboDropDown";
            comboListMemberType2.ItemCssClass         = "comboItem";
            comboListMemberType2.ItemHoverCssClass    = "comboItemHover";
            comboListMemberType2.SelectedItemCssClass = "comboItemHover";
            comboListMemberType2.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboListMemberType2.DropImageUrl         = "combobox_images/drop.gif";
            comboListMemberType2.Width                = Unit.Pixel(300);
            // comboListMemberType2.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(List_GeneratorView, "ListMemberType2", comboListMemberType2);

            comboListMemberType3                      = new ComponentArt.Web.UI.ComboBox();
            comboListMemberType3.ID                   = "comboListMemberType3";
            comboListMemberType3.CssClass             = "comboBox";
            comboListMemberType3.HoverCssClass        = "comboBoxHover";
            comboListMemberType3.FocusedCssClass      = "comboBoxHover";
            comboListMemberType3.TextBoxCssClass      = "comboTextBox";
            comboListMemberType3.DropDownCssClass     = "comboDropDown";
            comboListMemberType3.ItemCssClass         = "comboItem";
            comboListMemberType3.ItemHoverCssClass    = "comboItemHover";
            comboListMemberType3.SelectedItemCssClass = "comboItemHover";
            comboListMemberType3.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboListMemberType3.DropImageUrl         = "combobox_images/drop.gif";
            comboListMemberType3.Width                = Unit.Pixel(300);
            // comboListMemberType3.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(List_GeneratorView, "ListMemberType3", comboListMemberType3);

            #endregion

            #region Child Controls for Administration Folder

            ComponentArt.Web.UI.PageView AdministrationView = new ComponentArt.Web.UI.PageView();
            AdministrationView.CssClass = "PageContent";
            multipage.PageViews.Add(AdministrationView);

            TabStripTab AdministrationTab = new TabStripTab();
            AdministrationTab.Text       = "Administration";
            AdministrationTab.PageViewId = AdministrationView.ID;
            tabstrip.Tabs.Add(AdministrationTab);

            ddPanelChief    = new DropDownList();
            ddPanelChief.ID = "ddPanelChief";
            ddPanelChief.EnableViewState = false;
            registerControl(AdministrationView, "PanelChief", ddPanelChief);

            tbPanelMembers    = new TextBox();
            tbPanelMembers.ID = "tbPanelMembers";
            tbPanelMembers.EnableViewState = false;
            tbPanelMembers.Rows            = 10;
            tbPanelMembers.MaxLength       = 1500;
            tbPanelMembers.TextMode        = TextBoxMode.MultiLine;
            tbPanelMembers.Width           = Unit.Pixel(350);
            registerControl(AdministrationView, "PanelMembers", tbPanelMembers);
            Panel PanelMembersPanel = new Panel();
            PanelMembersPanel.Controls.Add(new LiteralControl("<div style=\"float:left\">"));
            comboPanelMembers                      = new ComponentArt.Web.UI.ComboBox();
            comboPanelMembers.ID                   = "comboPanelMembers";
            comboPanelMembers.CssClass             = "comboBox";
            comboPanelMembers.HoverCssClass        = "comboBoxHover";
            comboPanelMembers.FocusedCssClass      = "comboBoxHover";
            comboPanelMembers.TextBoxCssClass      = "comboTextBox";
            comboPanelMembers.DropDownCssClass     = "comboDropDown";
            comboPanelMembers.ItemCssClass         = "comboItem";
            comboPanelMembers.ItemHoverCssClass    = "comboItemHover";
            comboPanelMembers.SelectedItemCssClass = "comboItemHover";
            comboPanelMembers.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboPanelMembers.DropImageUrl         = "combobox_images/drop.gif";
            comboPanelMembers.Width                = Unit.Pixel(300);
            // comboPanelMembers.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            PanelMembersPanel.Controls.Add(comboPanelMembers);
            PanelMembersPanel.Controls.Add(new LiteralControl("</div><div><input type=\"button\" value=\"Add\" " +
                                                              "align=\"right\" onClick=\"" +
                                                              tbPanelMembers.ClientID + ".value += (" + tbPanelMembers.ClientID + ".value != '' ? '\\r\\n' : '') + " +
                                                              comboPanelMembers.ClientObjectId + ".getSelectedItem().Text;\"></div>"));
            registerControl(AdministrationView, "&nbsp;", PanelMembersPanel);
            registerControl(AdministrationView, "&nbsp;", new LiteralControl("Select the members that are serving on the panel. These members can vote on candidates."));

            #endregion

            #region Child Controls for System Folder

            ComponentArt.Web.UI.PageView SystemView = new ComponentArt.Web.UI.PageView();
            SystemView.CssClass = "PageContent";
            multipage.PageViews.Add(SystemView);

            TabStripTab SystemTab = new TabStripTab();
            SystemTab.Text       = "System";
            SystemTab.PageViewId = SystemView.ID;
            tabstrip.Tabs.Add(SystemTab);

            comboStatus                      = new ComponentArt.Web.UI.ComboBox();
            comboStatus.ID                   = "comboStatus";
            comboStatus.CssClass             = "comboBox";
            comboStatus.HoverCssClass        = "comboBoxHover";
            comboStatus.FocusedCssClass      = "comboBoxHover";
            comboStatus.TextBoxCssClass      = "comboTextBox";
            comboStatus.DropDownCssClass     = "comboDropDown";
            comboStatus.ItemCssClass         = "comboItem";
            comboStatus.ItemHoverCssClass    = "comboItemHover";
            comboStatus.SelectedItemCssClass = "comboItemHover";
            comboStatus.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboStatus.DropImageUrl         = "combobox_images/drop.gif";
            comboStatus.Width                = Unit.Pixel(300);
            // comboStatus.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(SystemView, "Status", comboStatus);

            ddActiveTestList    = new DropDownList();
            ddActiveTestList.ID = "ddActiveTestList";
            ddActiveTestList.EnableViewState = false;
            registerControl(SystemView, "ActiveTestList", ddActiveTestList);

            #endregion

            #region Child Controls for Rappahanock Folder

            ComponentArt.Web.UI.PageView RappahanockView = new ComponentArt.Web.UI.PageView();
            RappahanockView.CssClass = "PageContent";
            multipage.PageViews.Add(RappahanockView);

            TabStripTab RappahanockTab = new TabStripTab();
            RappahanockTab.Text       = "Rappahanock";
            RappahanockTab.PageViewId = RappahanockView.ID;
            tabstrip.Tabs.Add(RappahanockTab);

            comboItem                      = new ComponentArt.Web.UI.ComboBox();
            comboItem.ID                   = "comboItem";
            comboItem.CssClass             = "comboBox";
            comboItem.HoverCssClass        = "comboBoxHover";
            comboItem.FocusedCssClass      = "comboBoxHover";
            comboItem.TextBoxCssClass      = "comboTextBox";
            comboItem.DropDownCssClass     = "comboDropDown";
            comboItem.ItemCssClass         = "comboItem";
            comboItem.ItemHoverCssClass    = "comboItemHover";
            comboItem.SelectedItemCssClass = "comboItemHover";
            comboItem.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboItem.DropImageUrl         = "combobox_images/drop.gif";
            comboItem.Width                = Unit.Pixel(300);
            // comboItem.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(RappahanockView, "Item", comboItem);

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                  = new Button();
            btCancel.Text             = "Cancel";
            btCancel.Width            = Unit.Pixel(72);
            btCancel.EnableViewState  = false;
            btCancel.CausesValidation = false;
            btCancel.Click           += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();
            ChildControlsCreated = true;
        }
Example #5
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);
            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);
            headerText = new Literal();
            header.Controls.Add(headerText);
            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);
            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            // tabstrip.EnableViewState = false;  // ComponentArt ComboBox does not yet work with ViewState off!
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            // multipage.EnableViewState = false; // ComponentArt ComboBox does not yet work with ViewState off!
            content.Controls.Add(multipage);

            #endregion

            #region Child Controls for General Folder

            ComponentArt.Web.UI.PageView GeneralView = new ComponentArt.Web.UI.PageView();
            GeneralView.CssClass = "PageContent";
            multipage.PageViews.Add(GeneralView);

            TabStripTab GeneralTab = new TabStripTab();
            GeneralTab.Text       = "General";
            GeneralTab.PageViewId = GeneralView.ID;
            tabstrip.Tabs.Add(GeneralTab);

            comboMember                      = new ComponentArt.Web.UI.ComboBox();
            comboMember.ID                   = "comboMember";
            comboMember.CssClass             = "comboBox";
            comboMember.HoverCssClass        = "comboBoxHover";
            comboMember.FocusedCssClass      = "comboBoxHover";
            comboMember.TextBoxCssClass      = "comboTextBox";
            comboMember.DropDownCssClass     = "comboDropDown";
            comboMember.ItemCssClass         = "comboItem";
            comboMember.ItemHoverCssClass    = "comboItemHover";
            comboMember.SelectedItemCssClass = "comboItemHover";
            comboMember.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboMember.DropImageUrl         = "combobox_images/drop.gif";
            comboMember.Width                = Unit.Pixel(300);
            // comboMember.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(GeneralView, "Member", comboMember);

            deStartDate                 = new DateEditor();
            deStartDate.ID              = this.ID + "_de";
            deStartDate.AutoAdjust      = true;
            deStartDate.EnableViewState = false;
            registerControl(GeneralView, "StartDate", deStartDate);

            deEndDate                 = new DateEditor();
            deStartDate.ID            = this.ID + "_de";
            deStartDate.AutoAdjust    = true;
            deEndDate.EnableViewState = false;
            registerControl(GeneralView, "EndDate", deEndDate);

            comboOrganization                      = new ComponentArt.Web.UI.ComboBox();
            comboOrganization.ID                   = "comboOrganization";
            comboOrganization.CssClass             = "comboBox";
            comboOrganization.HoverCssClass        = "comboBoxHover";
            comboOrganization.FocusedCssClass      = "comboBoxHover";
            comboOrganization.TextBoxCssClass      = "comboTextBox";
            comboOrganization.DropDownCssClass     = "comboDropDown";
            comboOrganization.ItemCssClass         = "comboItem";
            comboOrganization.ItemHoverCssClass    = "comboItemHover";
            comboOrganization.SelectedItemCssClass = "comboItemHover";
            comboOrganization.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboOrganization.DropImageUrl         = "combobox_images/drop.gif";
            comboOrganization.Width                = Unit.Pixel(300);
            // comboOrganization.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(GeneralView, "Organization", comboOrganization);

            tbOrganizationMemberID    = new TextBox();
            tbOrganizationMemberID.ID = "tbOrganizationMemberID";
            tbOrganizationMemberID.EnableViewState = false;
            registerControl(GeneralView, "OrganizationMemberID", tbOrganizationMemberID);

            ddParent    = new DropDownList();
            ddParent.ID = "ddParent";
            ddParent.EnableViewState = false;
            registerControl(GeneralView, "Parent Membership", ddParent);

            comboMemberTypeTemplate                      = new ComponentArt.Web.UI.ComboBox();
            comboMemberTypeTemplate.ID                   = "comboMemberTypeTemplate";
            comboMemberTypeTemplate.CssClass             = "comboBox";
            comboMemberTypeTemplate.HoverCssClass        = "comboBoxHover";
            comboMemberTypeTemplate.FocusedCssClass      = "comboBoxHover";
            comboMemberTypeTemplate.TextBoxCssClass      = "comboTextBox";
            comboMemberTypeTemplate.DropDownCssClass     = "comboDropDown";
            comboMemberTypeTemplate.ItemCssClass         = "comboItem";
            comboMemberTypeTemplate.ItemHoverCssClass    = "comboItemHover";
            comboMemberTypeTemplate.SelectedItemCssClass = "comboItemHover";
            comboMemberTypeTemplate.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboMemberTypeTemplate.DropImageUrl         = "combobox_images/drop.gif";
            comboMemberTypeTemplate.Width                = Unit.Pixel(300);
            // comboMemberTypeTemplate.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(GeneralView, "Parent Template Group", comboMemberTypeTemplate);

            comboMembershipTemplate                      = new ComponentArt.Web.UI.ComboBox();
            comboMembershipTemplate.ID                   = "comboMembershipTemplate";
            comboMembershipTemplate.CssClass             = "comboBox";
            comboMembershipTemplate.HoverCssClass        = "comboBoxHover";
            comboMembershipTemplate.FocusedCssClass      = "comboBoxHover";
            comboMembershipTemplate.TextBoxCssClass      = "comboTextBox";
            comboMembershipTemplate.DropDownCssClass     = "comboDropDown";
            comboMembershipTemplate.ItemCssClass         = "comboItem";
            comboMembershipTemplate.ItemHoverCssClass    = "comboItemHover";
            comboMembershipTemplate.SelectedItemCssClass = "comboItemHover";
            comboMembershipTemplate.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboMembershipTemplate.DropImageUrl         = "combobox_images/drop.gif";
            comboMembershipTemplate.Width                = Unit.Pixel(300);
            // comboMembershipTemplate.EnableViewState = false;      // This is not  yet possible, ComponentArt's ComboBox Requires ViewState!!!
            registerControl(GeneralView, "Parent Template", comboMembershipTemplate);

            ltSessionID = new Literal();
            registerControl(GeneralView, "SessionID", ltSessionID);

            tbFee    = new TextBox();
            tbFee.ID = "tbFee";
            tbFee.EnableViewState = false;
            reqFee    = new RequiredFieldValidator();
            reqFee.ID = "reqFee";
            reqFee.ControlToValidate = tbFee.ID;
            reqFee.ErrorMessage      = "*";
            reqFee.Display           = ValidatorDisplay.Dynamic;
            rngFee    = new RangeValidator();
            rngFee.ID = "rngFee";
            rngFee.ControlToValidate = tbFee.ID;
            rngFee.ErrorMessage      = "*";
            rngFee.Display           = ValidatorDisplay.Dynamic;
            rngFee.Type         = ValidationDataType.Double;
            rngFee.MinimumValue = "0";
            rngFee.MaximumValue = "79228162514264337593543950335";
            registerControl(GeneralView, "Fee", tbFee, reqFee, rngFee);

            ltPriorMembership = new Literal();
            registerControl(GeneralView, "PriorMembership", ltPriorMembership);

            tbPaymentAmount    = new TextBox();
            tbPaymentAmount.ID = "tbPaymentAmount";
            tbPaymentAmount.EnableViewState = false;
            reqPaymentAmount    = new RequiredFieldValidator();
            reqPaymentAmount.ID = "reqPaymentAmount";
            reqPaymentAmount.ControlToValidate = tbPaymentAmount.ID;
            reqPaymentAmount.ErrorMessage      = "*";
            reqPaymentAmount.Display           = ValidatorDisplay.Dynamic;
            rngPaymentAmount    = new RangeValidator();
            rngPaymentAmount.ID = "rngPaymentAmount";
            rngPaymentAmount.ControlToValidate = tbPaymentAmount.ID;
            rngPaymentAmount.ErrorMessage      = "*";
            rngPaymentAmount.Display           = ValidatorDisplay.Dynamic;
            rngPaymentAmount.Type         = ValidationDataType.Double;
            rngPaymentAmount.MinimumValue = "0";
            rngPaymentAmount.MaximumValue = "79228162514264337593543950335";
            registerControl(GeneralView, "PaymentAmount", tbPaymentAmount, reqPaymentAmount, rngPaymentAmount);

            cbIsProRated    = new CheckBox();
            cbIsProRated.ID = "cbIsProRated";
            cbIsProRated.EnableViewState = false;
            registerControl(GeneralView, "IsProRated", cbIsProRated);

            #endregion

            #region Child Controls for Rappahanock Folder

            ComponentArt.Web.UI.PageView RappahanockView = new ComponentArt.Web.UI.PageView();
            RappahanockView.CssClass = "PageContent";
            multipage.PageViews.Add(RappahanockView);

            TabStripTab RappahanockTab = new TabStripTab();
            RappahanockTab.Text       = "Rappahanock";
            RappahanockTab.PageViewId = RappahanockView.ID;
            tabstrip.Tabs.Add(RappahanockTab);

            ddInvoiceLine    = new DropDownList();
            ddInvoiceLine.ID = "ddInvoiceLine";
            ddInvoiceLine.EnableViewState = false;
            registerControl(RappahanockView, "InvoiceLine", ddInvoiceLine);

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                  = new Button();
            btCancel.Text             = "Cancel";
            btCancel.Width            = Unit.Pixel(72);
            btCancel.EnableViewState  = false;
            btCancel.CausesValidation = false;
            btCancel.Click           += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();
            ChildControlsCreated = true;
        }
Example #6
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);

            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);

            headerText = new Literal();
            header.Controls.Add(headerText);

            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);

            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            tabstrip.EnableViewState           = false;
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #endregion

            #region General Folder

            GeneralView          = new ComponentArt.Web.UI.PageView();
            GeneralView.CssClass = "PageContent";
            multipage.PageViews.Add(GeneralView);

            TabStripTab GeneralTab = new TabStripTab();
            GeneralTab.Text       = Localization.PeopleStrings.GeneralTab;
            GeneralTab.PageViewId = GeneralView.ID;
            tabstrip.Tabs.Add(GeneralTab);

            tbName                       = new TextBox();
            tbName.ID                    = this.ID + "_Name";
            tbName.MaxLength             = 255;
            tbName.Width                 = Unit.Pixel(250);
            tbName.ToolTip               = Localization.SecurityStrings.Role_NameTooltip;
            tbName.EnableViewState       = false;
            cbIsDisabled                 = new CheckBox();
            cbIsDisabled.ID              = this.ID + "_IsDisabled";
            cbIsDisabled.ToolTip         = Localization.SecurityStrings.Role_DisabledTooltip;
            cbIsDisabled.EnableViewState = false;
            cbIsDisabled.Text            = Localization.Strings.Disabled;
            registerControl(GeneralView, Localization.PeopleStrings.Name, tbName, cbIsDisabled);

            tbDescription                 = new TextBox();
            tbDescription.ID              = this.ID + "_Description";
            tbDescription.Rows            = 3;
            tbDescription.MaxLength       = 255;
            tbDescription.TextMode        = TextBoxMode.MultiLine;
            tbDescription.Width           = Unit.Pixel(350);
            tbDescription.ToolTip         = Localization.SecurityStrings.Role_DescriptionTooltip;
            tbDescription.EnableViewState = false;
            registerControl(GeneralView, Localization.Strings.Description, tbDescription);

            #endregion

            #region Buttons

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.ID              = this.ID + "_Ok";
            btOk.Text            = Localization.Strings.OK;
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                  = new Button();
            btCancel.ID               = this.ID + "_Cancel";
            btCancel.Text             = Localization.Strings.Cancel;
            btCancel.Width            = Unit.Pixel(72);
            btCancel.EnableViewState  = false;
            btCancel.CausesValidation = false;
            btCancel.Click           += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.ID              = this.ID + "_Delete";
            btDelete.Text            = Localization.Strings.Delete;
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            #endregion

            ChildControlsCreated = true;
        }
Example #7
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);

            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);

            headerText = new Literal();
            header.Controls.Add(headerText);

            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);

            #region TabStrip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Pixel(10);
            defaultTabLook.LabelPaddingRight  = Unit.Pixel(10);
            defaultTabLook.LabelPaddingTop    = Unit.Pixel(5);
            defaultTabLook.LabelPaddingBottom = Unit.Pixel(4);
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Pixel(3);
            defaultTabLook.LeftIconHeight     = Unit.Pixel(21);
            defaultTabLook.RightIconWidth     = Unit.Pixel(3);
            defaultTabLook.RightIconHeight    = Unit.Pixel(21);
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Pixel(10);
            selectedTabLook.LabelPaddingRight  = Unit.Pixel(10);
            selectedTabLook.LabelPaddingTop    = Unit.Pixel(5);
            selectedTabLook.LabelPaddingBottom = Unit.Pixel(4);
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Pixel(3);
            selectedTabLook.LeftIconHeight     = Unit.Pixel(21);
            selectedTabLook.RightIconWidth     = Unit.Pixel(3);
            selectedTabLook.RightIconHeight    = Unit.Pixel(21);
            tabstrip.ItemLooks.Add(selectedTabLook);

            ComponentArt.Web.UI.ItemLook scrollItemLook = new ItemLook();
            scrollItemLook.LookId             = "ScrollItem";
            scrollItemLook.CssClass           = "ScrollItem";
            scrollItemLook.HoverCssClass      = "ScrollItemHover";
            scrollItemLook.LabelPaddingLeft   = Unit.Pixel(5);
            scrollItemLook.LabelPaddingRight  = Unit.Pixel(5);
            scrollItemLook.LabelPaddingTop    = Unit.Pixel(0);
            scrollItemLook.LabelPaddingBottom = Unit.Pixel(0);
            tabstrip.ItemLooks.Add(scrollItemLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            tabstrip.ScrollingEnabled          = true;
            tabstrip.ScrollLeftLookId          = "ScrollItem";
            tabstrip.ScrollRightLookId         = "ScrollItem";
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #endregion

            #region General

            generalView          = new ComponentArt.Web.UI.PageView();
            generalView.CssClass = "PageContent";
            multipage.PageViews.Add(generalView);

            TabStripTab generalTab = new TabStripTab();
            generalTab.Text       = "General";
            generalTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(generalTab);

            tbName = new TextBox();
            tbName.EnableViewState = false;
            tbName.Width           = Unit.Pixel(350);
            registerControl(generalView, "Name", tbName);

            tbDescription = new TextBox();
            tbDescription.EnableViewState = false;
            tbDescription.Rows            = 3;
            tbDescription.TextMode        = TextBoxMode.MultiLine;
            tbDescription.Width           = Unit.Pixel(350);
            registerControl(generalView, "Description", tbDescription);

            PlaceHolder phStartDate = new PlaceHolder();
            generalView.Controls.Add(phStartDate);
            CalendarHelper.RegisterCalendarPair(phStartDate, "calStartDate",
                                                DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)),
                                                out calStartP, out calStartB, out calStartC, true);
            registerControl(generalView, "First Day", phStartDate);

            PlaceHolder phEndDate = new PlaceHolder();
            generalView.Controls.Add(phEndDate);
            CalendarHelper.RegisterCalendarPair(phEndDate, "calEndDate",
                                                DateTime.Now.Subtract(TimeSpan.FromDays(365 * 20)),
                                                out calEndP, out calEndB, out calEndC, true);
            registerControl(generalView, "Last Day", phEndDate);

            cbIsLocal = new CheckBox();
            cbIsLocal.EnableViewState = false;
            cbIsLocal.Text            = "Yes";
            registerControl(generalView, "Local Seminar", cbIsLocal);

            comboLocation                      = new ComponentArt.Web.UI.ComboBox();
            comboLocation.CssClass             = "comboBox";
            comboLocation.HoverCssClass        = "comboBoxHover";
            comboLocation.FocusedCssClass      = "comboBoxHover";
            comboLocation.TextBoxCssClass      = "comboTextBox";
            comboLocation.DropDownCssClass     = "comboDropDown";
            comboLocation.ItemCssClass         = "comboItem";
            comboLocation.ItemHoverCssClass    = "comboItemHover";
            comboLocation.SelectedItemCssClass = "comboItemHover";
            comboLocation.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboLocation.DropImageUrl         = "combobox_images/drop.gif";
            comboLocation.Width                = Unit.Pixel(300);
            registerControl(generalView, "Location", comboLocation);

            #endregion

            #region Registration

            registrationView          = new ComponentArt.Web.UI.PageView();
            registrationView.CssClass = "PageContent";
            multipage.PageViews.Add(registrationView);

            TabStripTab registrationTab = new TabStripTab();
            registrationTab.Text       = "Registration";
            registrationTab.PageViewId = registrationView.ID;
            tabstrip.Tabs.Add(registrationTab);

            tbBaseRegistrationFee = new TextBox();
            tbBaseRegistrationFee.EnableViewState = false;
            tbBaseRegistrationFee.Width           = Unit.Pixel(50);
            registerControl(registrationView, "Base Fee",
                            tbBaseRegistrationFee);

            PlaceHolder phClassUnitFee = new PlaceHolder();
            registrationView.Controls.Add(phClassUnitFee);
            tbClassUnitFee = new TextBox();
            tbClassUnitFee.EnableViewState = false;
            tbClassUnitFee.Width           = Unit.Pixel(50);
            phClassUnitFee.Controls.Add(tbClassUnitFee);
            phClassUnitFee.Controls.Add(new LiteralControl(" per "));
            ddClassUnitType = new DropDownList();
            phClassUnitFee.Controls.Add(ddClassUnitType);
            registerControl(registrationView, "Class Unit Fee", phClassUnitFee);

            cbRegistrationEnabled = new CheckBox();
            cbRegistrationEnabled.EnableViewState = false;
            cbRegistrationEnabled.Text            = "Yes";
            registerControl(registrationView, "Enable Registration",
                            cbRegistrationEnabled);

            PlaceHolder phRegStart = new PlaceHolder();
            registrationView.Controls.Add(phRegStart);
            CalendarHelper.RegisterCalendarPair(phRegStart,
                                                "calRegStart", DateTime.Now,
                                                out calRegStartP, out calRegStartB, out calRegStartC, true);
            registerControl(registrationView, "Registration Starts", phRegStart);

            tbFullEarlyRegistrationFee = new TextBox();
            tbFullEarlyRegistrationFee.EnableViewState = false;
            tbFullEarlyRegistrationFee.Width           = Unit.Pixel(50);
            registerControl(registrationView, "Full Early Reg. Fee",
                            tbFullEarlyRegistrationFee);

            PlaceHolder phEarlyEnd = new PlaceHolder();
            registrationView.Controls.Add(phEarlyEnd);
            CalendarHelper.RegisterCalendarPair(phEarlyEnd,
                                                "calEarlyEnd", DateTime.Now,
                                                out calEarlyEndP, out calEarlyEndB, out calEarlyEndC, true);
            registerControl(registrationView, "Early Registration Ends", phEarlyEnd);

            tbFullRegistrationFee = new TextBox();
            tbFullRegistrationFee.EnableViewState = false;
            tbFullRegistrationFee.Width           = Unit.Pixel(50);
            registerControl(registrationView, "Full Reg. Fee",
                            tbFullRegistrationFee);

            PlaceHolder phLateStart = new PlaceHolder();
            registrationView.Controls.Add(phLateStart);
            CalendarHelper.RegisterCalendarPair(phLateStart,
                                                "calLateStart", DateTime.Now,
                                                out calLateStartP, out calLateStartB, out calLateStartC, true);
            registerControl(registrationView, "Late Reg. Starts", phLateStart);

            tbFullLateRegistrationFee = new TextBox();
            tbFullLateRegistrationFee.EnableViewState = false;
            tbFullLateRegistrationFee.Width           = Unit.Pixel(50);
            registerControl(registrationView, "Full Late Reg. Fee",
                            tbFullLateRegistrationFee);

            PlaceHolder phRegEnd = new PlaceHolder();
            registrationView.Controls.Add(phRegEnd);
            CalendarHelper.RegisterCalendarPair(phRegEnd,
                                                "calRegEnd", DateTime.Now,
                                                out calRegEndP, out calRegEndB, out calRegEndC, true);
            registerControl(registrationView, "Registration Ends", phRegEnd);

            comboRappahanockItem                      = new ComponentArt.Web.UI.ComboBox();
            comboRappahanockItem.CssClass             = "comboBox";
            comboRappahanockItem.HoverCssClass        = "comboBoxHover";
            comboRappahanockItem.FocusedCssClass      = "comboBoxHover";
            comboRappahanockItem.TextBoxCssClass      = "comboTextBox";
            comboRappahanockItem.DropDownCssClass     = "comboDropDown";
            comboRappahanockItem.ItemCssClass         = "comboItem";
            comboRappahanockItem.ItemHoverCssClass    = "comboItemHover";
            comboRappahanockItem.SelectedItemCssClass = "comboItemHover";
            comboRappahanockItem.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboRappahanockItem.DropImageUrl         = "combobox_images/drop.gif";
            comboRappahanockItem.Width                = Unit.Pixel(300);
            registerControl(registrationView, "Rappahanock Item", comboRappahanockItem);

            #endregion

            #region Options

            optionsView          = new ComponentArt.Web.UI.PageView();
            optionsView.CssClass = "PageContent";
            multipage.PageViews.Add(optionsView);

            TabStripTab optionsTab = new TabStripTab();
            optionsTab.Text       = "Options";
            optionsTab.PageViewId = optionsView.ID;
            tabstrip.Tabs.Add(optionsTab);

            msOptions      = new MultiSelectBox();
            msOptions.Mode = MultiSelectBoxMode.CheckBoxList;
            registerControl(optionsView, "Options", msOptions);

            #endregion

            #region Details

            detailsView          = new ComponentArt.Web.UI.PageView();
            detailsView.CssClass = "PageContent";
            multipage.PageViews.Add(detailsView);

            TabStripTab detailsTab = new TabStripTab();
            detailsTab.Text       = "Details";
            detailsTab.PageViewId = detailsView.ID;
            tabstrip.Tabs.Add(detailsTab);

            tbDetails                 = new TextBox();
            tbDetails.TextMode        = TextBoxMode.MultiLine;
            tbDetails.Rows            = 20;
            tbDetails.Width           = Unit.Percentage(100);
            tbDetails.EnableViewState = false;
            registerControl(detailsView, "Details", tbDetails);

            tbDetailsOverrideUrl = new TextBox();
            tbDetailsOverrideUrl.EnableViewState = false;
            tbDetailsOverrideUrl.Width           = Unit.Pixel(350);
            registerControl(detailsView, "Details Override URL", tbDetailsOverrideUrl);

            tbPdfUrl = new TextBox();
            tbPdfUrl.EnableViewState = false;
            tbPdfUrl.Width           = Unit.Pixel(350);
            registerControl(detailsView, "PDF Link URL", tbPdfUrl);

            #endregion

            #region Buttons

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                 = new Button();
            btCancel.Text            = "Cancel";
            btCancel.Width           = Unit.Pixel(72);
            btCancel.EnableViewState = false;
            btCancel.Click          += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            #endregion

            bind();

            ChildControlsCreated = true;
        }
Example #8
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);
            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);
            headerText = new Literal();
            header.Controls.Add(headerText);
            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);
            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #endregion

            #region Child Controls for Default Folder

            DefaultView          = new ComponentArt.Web.UI.PageView();
            DefaultView.CssClass = "PageContent";
            multipage.PageViews.Add(DefaultView);

            TabStripTab DefaultTab = new TabStripTab();
            DefaultTab.Text       = "Default";
            DefaultTab.PageViewId = DefaultView.ID;
            tabstrip.Tabs.Add(DefaultTab);

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Quantity</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbQuantity    = new TextBox();
            tbQuantity.ID = this.ID + "_Quantity";
            tbQuantity.EnableViewState = false;
            DefaultView.Controls.Add(tbQuantity);
            revQuantity = new RegularExpressionValidator();
            revQuantity.ControlToValidate    = tbQuantity.ID;
            revQuantity.ValidationExpression = "^(\\+|-)?\\d+$";
            revQuantity.ErrorMessage         = "*";
            revQuantity.Display         = ValidatorDisplay.Dynamic;
            revQuantity.EnableViewState = false;
            DefaultView.Controls.Add(revQuantity);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">TotalFee</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbTotalFee = new TextBox();
            tbTotalFee.EnableViewState = false;
            DefaultView.Controls.Add(tbTotalFee);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">CostPerItem</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbCostPerItem = new TextBox();
            tbCostPerItem.EnableViewState = false;
            DefaultView.Controls.Add(tbCostPerItem);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">ParentOption</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboParentOption                      = new ComponentArt.Web.UI.ComboBox();
            comboParentOption.CssClass             = "comboBox";
            comboParentOption.HoverCssClass        = "comboBoxHover";
            comboParentOption.FocusedCssClass      = "comboBoxHover";
            comboParentOption.TextBoxCssClass      = "comboTextBox";
            comboParentOption.DropDownCssClass     = "comboDropDown";
            comboParentOption.ItemCssClass         = "comboItem";
            comboParentOption.ItemHoverCssClass    = "comboItemHover";
            comboParentOption.SelectedItemCssClass = "comboItemHover";
            comboParentOption.DropHoverImageUrl    = "images/drop_hover.gif";
            comboParentOption.DropImageUrl         = "images/drop.gif";
            comboParentOption.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboParentOption);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">ParentRegistration</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboParentRegistration                      = new ComponentArt.Web.UI.ComboBox();
            comboParentRegistration.CssClass             = "comboBox";
            comboParentRegistration.HoverCssClass        = "comboBoxHover";
            comboParentRegistration.FocusedCssClass      = "comboBoxHover";
            comboParentRegistration.TextBoxCssClass      = "comboTextBox";
            comboParentRegistration.DropDownCssClass     = "comboDropDown";
            comboParentRegistration.ItemCssClass         = "comboItem";
            comboParentRegistration.ItemHoverCssClass    = "comboItemHover";
            comboParentRegistration.SelectedItemCssClass = "comboItemHover";
            comboParentRegistration.DropHoverImageUrl    = "images/drop_hover.gif";
            comboParentRegistration.DropImageUrl         = "images/drop.gif";
            comboParentRegistration.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboParentRegistration);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                  = new Button();
            btCancel.Text             = "Cancel";
            btCancel.Width            = Unit.Pixel(72);
            btCancel.EnableViewState  = false;
            btCancel.CausesValidation = false;
            btCancel.Click           += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();
            ChildControlsCreated = true;
        }
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);
            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);
            headerText = new Literal();
            header.Controls.Add(headerText);
            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);
            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #endregion

            #region Child Controls for Default Folder

            DefaultView          = new ComponentArt.Web.UI.PageView();
            DefaultView.CssClass = "PageContent";
            multipage.PageViews.Add(DefaultView);

            TabStripTab DefaultTab = new TabStripTab();
            DefaultTab.Text       = "Default";
            DefaultTab.PageViewId = DefaultView.ID;
            tabstrip.Tabs.Add(DefaultTab);

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Signin Time</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbSigninTime = new TextBox();
            tbSigninTime.EnableViewState = false;
            DefaultView.Controls.Add(tbSigninTime);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Signout Time</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbSignoutTime = new TextBox();
            tbSignoutTime.EnableViewState = false;
            DefaultView.Controls.Add(tbSignoutTime);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Class</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboClass                      = new ComponentArt.Web.UI.ComboBox();
            comboClass.CssClass             = "comboBox";
            comboClass.HoverCssClass        = "comboBoxHover";
            comboClass.FocusedCssClass      = "comboBoxHover";
            comboClass.TextBoxCssClass      = "comboTextBox";
            comboClass.DropDownCssClass     = "comboDropDown";
            comboClass.ItemCssClass         = "comboItem";
            comboClass.ItemHoverCssClass    = "comboItemHover";
            comboClass.SelectedItemCssClass = "comboItemHover";
            comboClass.DropHoverImageUrl    = "images/drop_hover.gif";
            comboClass.DropImageUrl         = "images/drop.gif";
            comboClass.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboClass);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Member</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboMember                      = new ComponentArt.Web.UI.ComboBox();
            comboMember.CssClass             = "comboBox";
            comboMember.HoverCssClass        = "comboBoxHover";
            comboMember.FocusedCssClass      = "comboBoxHover";
            comboMember.TextBoxCssClass      = "comboTextBox";
            comboMember.DropDownCssClass     = "comboDropDown";
            comboMember.ItemCssClass         = "comboItem";
            comboMember.ItemHoverCssClass    = "comboItemHover";
            comboMember.SelectedItemCssClass = "comboItemHover";
            comboMember.DropHoverImageUrl    = "images/drop_hover.gif";
            comboMember.DropImageUrl         = "images/drop.gif";
            comboMember.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboMember);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            DefaultView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Rank</span>"));
            DefaultView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboRank                      = new ComponentArt.Web.UI.ComboBox();
            comboRank.CssClass             = "comboBox";
            comboRank.HoverCssClass        = "comboBoxHover";
            comboRank.FocusedCssClass      = "comboBoxHover";
            comboRank.TextBoxCssClass      = "comboTextBox";
            comboRank.DropDownCssClass     = "comboDropDown";
            comboRank.ItemCssClass         = "comboItem";
            comboRank.ItemHoverCssClass    = "comboItemHover";
            comboRank.SelectedItemCssClass = "comboItemHover";
            comboRank.DropHoverImageUrl    = "images/drop_hover.gif";
            comboRank.DropImageUrl         = "images/drop.gif";
            comboRank.Width                = Unit.Pixel(300);
            DefaultView.Controls.Add(comboRank);
            DefaultView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                  = new Button();
            btCancel.Text             = "Cancel";
            btCancel.Width            = Unit.Pixel(72);
            btCancel.EnableViewState  = false;
            btCancel.CausesValidation = false;
            btCancel.Click           += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();
            ChildControlsCreated = true;
        }
Example #10
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);
            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);
            headerText = new Literal();
            header.Controls.Add(headerText);
            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);

            #region Tab Strip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #endregion

            #region Child Controls for Default Folder

            DefaultView          = new ComponentArt.Web.UI.PageView();
            DefaultView.CssClass = "PageContent";
            multipage.PageViews.Add(DefaultView);

            TabStripTab DefaultTab = new TabStripTab();
            DefaultTab.Text       = "Default";
            DefaultTab.PageViewId = DefaultView.ID;
            tabstrip.Tabs.Add(DefaultTab);

            tbName = new TextBox();
            tbName.EnableViewState       = false;
            cbIsDisabled                 = new CheckBox();
            cbIsDisabled.EnableViewState = false;
            cbIsDisabled.Text            = Localization.Strings.Disabled;
            registerControl(DefaultView,
                            Localization.PeopleStrings.Name, tbName, cbIsDisabled);

            tbDescription = new TextBox();
            tbDescription.EnableViewState = false;
            registerControl(DefaultView,
                            Localization.Strings.Description, tbDescription);

            tbOccupancyAvg    = new TextBox();
            tbOccupancyAvg.ID = this.ID + "_OccupancyAvg";
            tbOccupancyAvg.EnableViewState = false;
            DefaultView.Controls.Add(tbOccupancyAvg);
            revOccupancyAvg = new RegularExpressionValidator();
            revOccupancyAvg.ControlToValidate    = tbOccupancyAvg.ID;
            revOccupancyAvg.ValidationExpression = "^(\\+|-)?\\d+$";
            revOccupancyAvg.ErrorMessage         = "*";
            revOccupancyAvg.Display         = ValidatorDisplay.Dynamic;
            revOccupancyAvg.EnableViewState = false;
            registerControl(DefaultView,
                            "OccupancyAvg", tbOccupancyAvg, revOccupancyAvg);

            tbOccupancyAvgDate = new TextBox();
            tbOccupancyAvgDate.EnableViewState = false;
            DefaultView.Controls.Add(tbOccupancyAvgDate);
            registerControl(DefaultView,
                            "OccupancyAvgDate", tbOccupancyAvgDate);

            #endregion

            #region Child Controls for Access Control Folder

            Access_ControlView          = new ComponentArt.Web.UI.PageView();
            Access_ControlView.CssClass = "PageContent";
            multipage.PageViews.Add(Access_ControlView);

            TabStripTab Access_ControlTab = new TabStripTab();
            Access_ControlTab.Text       = "Access Control";
            Access_ControlTab.PageViewId = Access_ControlView.ID;
            tabstrip.Tabs.Add(Access_ControlTab);

            Access_ControlView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            Access_ControlView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">AccessControlGroup</span>"));
            Access_ControlView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboAccessControlGroup                      = new ComponentArt.Web.UI.ComboBox();
            comboAccessControlGroup.CssClass             = "comboBox";
            comboAccessControlGroup.HoverCssClass        = "comboBoxHover";
            comboAccessControlGroup.FocusedCssClass      = "comboBoxHover";
            comboAccessControlGroup.TextBoxCssClass      = "comboTextBox";
            comboAccessControlGroup.DropDownCssClass     = "comboDropDown";
            comboAccessControlGroup.ItemCssClass         = "comboItem";
            comboAccessControlGroup.ItemHoverCssClass    = "comboItemHover";
            comboAccessControlGroup.SelectedItemCssClass = "comboItemHover";
            comboAccessControlGroup.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboAccessControlGroup.DropImageUrl         = "combobox_images/drop.gif";
            comboAccessControlGroup.Width                = Unit.Pixel(300);
            Access_ControlView.Controls.Add(comboAccessControlGroup);
            Access_ControlView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Child Controls for Recurrency Folder

            RecurrencyView          = new ComponentArt.Web.UI.PageView();
            RecurrencyView.CssClass = "PageContent";
            multipage.PageViews.Add(RecurrencyView);

            TabStripTab RecurrencyTab = new TabStripTab();
            RecurrencyTab.Text       = "Recurrency";
            RecurrencyTab.PageViewId = RecurrencyView.ID;
            tabstrip.Tabs.Add(RecurrencyTab);

            RecurrencyView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            RecurrencyView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">The recurrence type for scheduling.</span>"));
            RecurrencyView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbRecurrenceType = new TextBox();
            tbRecurrenceType.EnableViewState = false;
            RecurrencyView.Controls.Add(tbRecurrenceType);
            RecurrencyView.Controls.Add(new LiteralControl("</span></div>"));

            RecurrencyView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            RecurrencyView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">The remaining count for recurrences.</span>"));
            RecurrencyView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbRecurrenceCount    = new TextBox();
            tbRecurrenceCount.ID = this.ID + "_RecurrenceCount";
            tbRecurrenceCount.EnableViewState = false;
            RecurrencyView.Controls.Add(tbRecurrenceCount);
            revRecurrenceCount = new RegularExpressionValidator();
            revRecurrenceCount.ControlToValidate    = tbRecurrenceCount.ID;
            revRecurrenceCount.ValidationExpression = "^(\\+|-)?\\d+$";
            revRecurrenceCount.ErrorMessage         = "*";
            revRecurrenceCount.Display         = ValidatorDisplay.Dynamic;
            revRecurrenceCount.EnableViewState = false;
            RecurrencyView.Controls.Add(revRecurrenceCount);
            RecurrencyView.Controls.Add(new LiteralControl("</span></div>"));

            RecurrencyView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            RecurrencyView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Date to end class definition.</span>"));
            RecurrencyView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbRecurrenceEnd = new TextBox();
            tbRecurrenceEnd.EnableViewState = false;
            RecurrencyView.Controls.Add(tbRecurrenceEnd);
            RecurrencyView.Controls.Add(new LiteralControl("</span></div>"));

            RecurrencyView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            RecurrencyView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Time span to calculate recurring classes.</span>"));
            RecurrencyView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbRecurrenceSpan = new TextBox();
            tbRecurrenceSpan.EnableViewState = false;
            RecurrencyView.Controls.Add(tbRecurrenceSpan);
            RecurrencyView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Child Controls for Next Class Folder

            Next_ClassView          = new ComponentArt.Web.UI.PageView();
            Next_ClassView.CssClass = "PageContent";
            multipage.PageViews.Add(Next_ClassView);

            TabStripTab Next_ClassTab = new TabStripTab();
            Next_ClassTab.Text       = "Next Class";
            Next_ClassTab.PageViewId = Next_ClassView.ID;
            tabstrip.Tabs.Add(Next_ClassTab);

            Next_ClassView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Next Signin Start</span>"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbNextSigninStart = new TextBox();
            tbNextSigninStart.EnableViewState = false;
            Next_ClassView.Controls.Add(tbNextSigninStart);
            Next_ClassView.Controls.Add(new LiteralControl("</span></div>"));

            Next_ClassView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Next Signin End</span>"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbNextSigninEnd = new TextBox();
            tbNextSigninEnd.EnableViewState = false;
            Next_ClassView.Controls.Add(tbNextSigninEnd);
            Next_ClassView.Controls.Add(new LiteralControl("</span></div>"));

            Next_ClassView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Next Class Start</span>"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbNextClassStart = new TextBox();
            tbNextClassStart.EnableViewState = false;
            Next_ClassView.Controls.Add(tbNextClassStart);
            Next_ClassView.Controls.Add(new LiteralControl("</span></div>"));

            Next_ClassView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Next Class End</span>"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbNextClassEnd = new TextBox();
            tbNextClassEnd.EnableViewState = false;
            Next_ClassView.Controls.Add(tbNextClassEnd);
            Next_ClassView.Controls.Add(new LiteralControl("</span></div>"));

            Next_ClassView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Instructor</span>"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboInstructor                      = new ComponentArt.Web.UI.ComboBox();
            comboInstructor.CssClass             = "comboBox";
            comboInstructor.HoverCssClass        = "comboBoxHover";
            comboInstructor.FocusedCssClass      = "comboBoxHover";
            comboInstructor.TextBoxCssClass      = "comboTextBox";
            comboInstructor.DropDownCssClass     = "comboDropDown";
            comboInstructor.ItemCssClass         = "comboItem";
            comboInstructor.ItemHoverCssClass    = "comboItemHover";
            comboInstructor.SelectedItemCssClass = "comboItemHover";
            comboInstructor.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboInstructor.DropImageUrl         = "combobox_images/drop.gif";
            comboInstructor.Width                = Unit.Pixel(300);
            Next_ClassView.Controls.Add(comboInstructor);
            Next_ClassView.Controls.Add(new LiteralControl("</span></div>"));

            Next_ClassView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Location</span>"));
            Next_ClassView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            comboLocation                      = new ComponentArt.Web.UI.ComboBox();
            comboLocation.CssClass             = "comboBox";
            comboLocation.HoverCssClass        = "comboBoxHover";
            comboLocation.FocusedCssClass      = "comboBoxHover";
            comboLocation.TextBoxCssClass      = "comboTextBox";
            comboLocation.DropDownCssClass     = "comboDropDown";
            comboLocation.ItemCssClass         = "comboItem";
            comboLocation.ItemHoverCssClass    = "comboItemHover";
            comboLocation.SelectedItemCssClass = "comboItemHover";
            comboLocation.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboLocation.DropImageUrl         = "combobox_images/drop.gif";
            comboLocation.Width                = Unit.Pixel(300);
            Next_ClassView.Controls.Add(comboLocation);
            Next_ClassView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = Localization.Strings.OK;
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                  = new Button();
            btCancel.Text             = Localization.Strings.Cancel;
            btCancel.Width            = Unit.Pixel(72);
            btCancel.EnableViewState  = false;
            btCancel.CausesValidation = false;
            btCancel.Click           += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = Localization.Strings.Delete;
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();
            ChildControlsCreated = true;
        }
Example #11
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);

            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);

            headerText = new Literal();
            header.Controls.Add(headerText);

            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);

            #region TabStrip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Parse("10");
            defaultTabLook.LabelPaddingRight  = Unit.Parse("10");
            defaultTabLook.LabelPaddingTop    = Unit.Parse("5");
            defaultTabLook.LabelPaddingBottom = Unit.Parse("4");
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Parse("3");
            defaultTabLook.LeftIconHeight     = Unit.Parse("21");
            defaultTabLook.RightIconWidth     = Unit.Parse("3");
            defaultTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Parse("10");
            selectedTabLook.LabelPaddingRight  = Unit.Parse("10");
            selectedTabLook.LabelPaddingTop    = Unit.Parse("5");
            selectedTabLook.LabelPaddingBottom = Unit.Parse("4");
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Parse("3");
            selectedTabLook.LeftIconHeight     = Unit.Parse("21");
            selectedTabLook.RightIconWidth     = Unit.Parse("3");
            selectedTabLook.RightIconHeight    = Unit.Parse("21");
            tabstrip.ItemLooks.Add(selectedTabLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            content.Controls.Add(tabstrip);

            #endregion

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #region General Folder

            generalView = new ComponentArt.Web.UI.PageView();

            generalView.CssClass = "PageContent";
            multipage.PageViews.Add(generalView);

            TabStripTab generalTab = new TabStripTab();
            generalTab.Text       = "General";
            generalTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(generalTab);

            generalView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Title</span>"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbTitle = new TextBox();
            tbTitle.EnableViewState = false;
            tbTitle.Rows            = 2;
            tbTitle.MaxLength       = 255;
            tbTitle.TextMode        = TextBoxMode.MultiLine;
            tbTitle.Width           = Unit.Pixel(350);
            tbTitle.ToolTip         = "Title of content.";
            generalView.Controls.Add(tbTitle);
            generalView.Controls.Add(new LiteralControl("</span></div>"));

            generalView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Description</span>"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbDescription = new TextBox();
            tbDescription.EnableViewState = false;
            tbDescription.Rows            = 5;
            tbDescription.MaxLength       = 255;
            tbDescription.TextMode        = TextBoxMode.MultiLine;
            tbDescription.Width           = Unit.Pixel(350);
            tbDescription.ToolTip         = "Description for search engines, directories and summaries.";
            generalView.Controls.Add(tbDescription);
            generalView.Controls.Add(new LiteralControl("</span></div>"));

            generalView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Override URL</span>"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbOverrideUrl = new TextBox();
            tbOverrideUrl.EnableViewState = false;
            tbOverrideUrl.Width           = Unit.Pixel(350);
            tbOverrideUrl.ToolTip         = "Overrides the body with a URL.";
            generalView.Controls.Add(tbOverrideUrl);
            generalView.Controls.Add(new LiteralControl("</span></div>"));

            generalView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Icon</span>"));
            generalView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbIcon = new TextBox();
            tbIcon.EnableViewState = false;
            tbIcon.Width           = Unit.Pixel(300);
            generalView.Controls.Add(tbIcon);
            generalView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Body Folder

            bodyView          = new ComponentArt.Web.UI.PageView();
            bodyView.CssClass = "PageContent";
            multipage.PageViews.Add(bodyView);

            TabStripTab bodyTab = new TabStripTab();
            bodyTab.Text       = "Body";
            bodyTab.PageViewId = bodyView.ID;
            tabstrip.Tabs.Add(bodyTab);

            //userEditor = Page.LoadControl(_editorUserControlUrl);
            ////bodyView.Controls.Add(userEditor);
            //caEditor = ((IEditor)userEditor).Editor;
            //((IEditor)userEditor).SkinPath = userEditor.TemplateSourceDirectory;
            //((IEditor)userEditor).Editor.DesignCssClass = DesignModeCss;

            bodyView.Controls.Add(new LiteralControl("<div>WSYWIG editing is available through a new interface, " +
                                                     "please use the link provided to access the HTML editor.</div>"));

            tbBody                 = new TextBox();
            tbBody.Rows            = 40;
            tbBody.TextMode        = TextBoxMode.MultiLine;
            tbBody.Width           = Unit.Pixel(450);
            tbBody.EnableViewState = false;
            tbBody.Style.Add("font-family", "courier");
            bodyView.Controls.Add(tbBody);

            #endregion

            #region Index Folder

            indexView = new ComponentArt.Web.UI.PageView();

            indexView.CssClass = "PageContent";
            multipage.PageViews.Add(indexView);

            TabStripTab indexTab = new TabStripTab();
            indexTab.Text       = "Indexing";
            indexTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(indexTab);

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Keywords</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbKeywords = new TextBox();
            tbKeywords.EnableViewState = false;
            tbKeywords.Width           = Unit.Pixel(350);
            tbKeywords.ToolTip         = "Metadata keywords for search engines.";
            indexView.Controls.Add(tbKeywords);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">References</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbReferences    = new TextBox();
            tbReferences.ID = this.ID + "_ref";
            tbReferences.EnableViewState = false;
            tbReferences.Rows            = 5;
            tbReferences.MaxLength       = 1500;
            tbReferences.TextMode        = TextBoxMode.MultiLine;
            tbReferences.Width           = Unit.Pixel(350);
            tbReferences.ToolTip         = "Referenced clips. Separate references with a carriage return.";
            indexView.Controls.Add(tbReferences);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">&nbsp;</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\"><div style=\"float:left\">"));
            referenceComboBox                      = new ComponentArt.Web.UI.ComboBox();
            referenceComboBox.ID                   = this.ID + "_rcb";
            referenceComboBox.CssClass             = "comboBox";
            referenceComboBox.HoverCssClass        = "comboBoxHover";
            referenceComboBox.FocusedCssClass      = "comboBoxHover";
            referenceComboBox.TextBoxCssClass      = "comboTextBox";
            referenceComboBox.DropDownCssClass     = "comboDropDown";
            referenceComboBox.ItemCssClass         = "comboItem";
            referenceComboBox.ItemHoverCssClass    = "comboItemHover";
            referenceComboBox.SelectedItemCssClass = "comboItemHover";
            referenceComboBox.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            referenceComboBox.DropImageUrl         = "combobox_images/drop.gif";
            referenceComboBox.Width                = Unit.Pixel(250);
            referenceComboBox.EnableViewState      = false;
            indexView.Controls.Add(referenceComboBox);
            indexView.Controls.Add(new LiteralControl("</div><div><input type=\"button\" value=\"Add\" " +
                                                      "align=\"right\" onClick=\"" +
                                                      tbReferences.ClientID + ".value += (" + tbReferences.ClientID + ".value != '' ? '\\r\\n' : '') + " +
                                                      referenceComboBox.ClientObjectId + ".getSelectedItem().Text;\"></div>"));
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Rating</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            ratingComboBox                      = new ComponentArt.Web.UI.ComboBox();
            ratingComboBox.ID                   = this.ID + "_rating";
            ratingComboBox.CssClass             = "comboBox";
            ratingComboBox.HoverCssClass        = "comboBoxHover";
            ratingComboBox.FocusedCssClass      = "comboBoxHover";
            ratingComboBox.TextBoxCssClass      = "comboTextBox";
            ratingComboBox.DropDownCssClass     = "comboDropDown";
            ratingComboBox.ItemCssClass         = "comboItem";
            ratingComboBox.ItemHoverCssClass    = "comboItemHover";
            ratingComboBox.SelectedItemCssClass = "comboItemHover";
            ratingComboBox.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            ratingComboBox.DropImageUrl         = "combobox_images/drop.gif";
            ratingComboBox.Width                = Unit.Pixel(250);
            indexView.Controls.Add(ratingComboBox);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Status</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            msStatus      = new MultiSelectBox();
            msStatus.Mode = MultiSelectBoxMode.DropDownList;
            indexView.Controls.Add(msStatus);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Priority</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbPriority = new TextBox();
            tbPriority.EnableViewState = false;
            indexView.Controls.Add(tbPriority);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            indexView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Sort Order</span>"));
            indexView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbSortOrder = new TextBox();
            tbSortOrder.EnableViewState = false;
            indexView.Controls.Add(tbSortOrder);
            indexView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Publishing Folder

            publishingView          = new ComponentArt.Web.UI.PageView();
            publishingView.CssClass = "PageContent";
            multipage.PageViews.Add(publishingView);

            TabStripTab publishingTab = new TabStripTab();
            publishingTab.Text       = "Publishing";
            publishingTab.PageViewId = publishingView.ID;
            tabstrip.Tabs.Add(publishingTab);

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Clip ID</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            publishingView.Controls.Add(new LiteralControl(this.dbContentClipID.ToString()));
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Create Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            ltCreateDate = new Literal();
            ltCreateDate.EnableViewState = false;
            publishingView.Controls.Add(ltCreateDate);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Modify Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            ltModifyDate = new Literal();
            ltModifyDate.EnableViewState = false;
            publishingView.Controls.Add(ltModifyDate);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Parent Catalog</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            msParentCatalog                 = new MultiSelectBox();
            msParentCatalog.Mode            = MultiSelectBoxMode.DropDownList;
            msParentCatalog.EnableViewState = false;
            publishingView.Controls.Add(msParentCatalog);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Publish Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            PlaceHolder phPublishDate = new PlaceHolder();
            publishingView.Controls.Add(phPublishDate);
            CalendarHelper.RegisterCalendarPair(phPublishDate, "calPublishDate",
                                                out calPublishDateP, out calPublishDateB, out calPublishDateC, true);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Expiration Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            PlaceHolder phExpirationDate = new PlaceHolder();
            publishingView.Controls.Add(phExpirationDate);
            CalendarHelper.RegisterCalendarPair(phExpirationDate, "calExpirationDate",
                                                out calExpirationDateP, out calExpirationDateB, out calExpirationDateC, true);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Archive Date</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            PlaceHolder phArchiveDate = new PlaceHolder();
            publishingView.Controls.Add(phArchiveDate);
            CalendarHelper.RegisterCalendarPair(phArchiveDate, "calArchiveDate",
                                                out calArchiveDateP, out calArchiveDateB, out calArchiveDateC, true);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Comments Enabled</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            cbCommentsEnabled = new CheckBox();
            cbCommentsEnabled.EnableViewState = false;
            publishingView.Controls.Add(cbCommentsEnabled);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            publishingView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Comments Notification</span>"));
            publishingView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            cbNotifyOnComments = new CheckBox();
            cbNotifyOnComments.EnableViewState = false;
            publishingView.Controls.Add(cbNotifyOnComments);
            publishingView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Contributors Folder

            contributorView          = new ComponentArt.Web.UI.PageView();
            contributorView.CssClass = "PageContent";
            multipage.PageViews.Add(contributorView);

            TabStripTab contributorTab = new TabStripTab();
            contributorTab.Text       = "Contributors";
            contributorTab.PageViewId = contributorView.ID;
            tabstrip.Tabs.Add(contributorTab);

            contributorView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            contributorView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Authors</span>"));
            contributorView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbAuthors = new TextBox();
            contributorView.Controls.Add(tbAuthors);
            contributorView.Controls.Add(new LiteralControl("</span></div>"));

            contributorView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            contributorView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Editors</span>"));
            contributorView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbEditors = new TextBox();
            contributorView.Controls.Add(tbEditors);
            contributorView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            #region Menu Folder

            menuView          = new ComponentArt.Web.UI.PageView();
            menuView.CssClass = "PageContent";
            multipage.PageViews.Add(menuView);

            TabStripTab menuTab = new TabStripTab();
            menuTab.Text       = "Menu";
            menuTab.PageViewId = menuView.ID;
            tabstrip.Tabs.Add(menuTab);

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Label</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuLabel = new TextBox();
            tbMenuLabel.EnableViewState = false;
            tbMenuLabel.Width           = Unit.Pixel(250);
            tbMenuLabel.ToolTip         = "Label displayed on menu.";
            menuView.Controls.Add(tbMenuLabel);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Tooltip</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuTooltip = new TextBox();
            tbMenuTooltip.EnableViewState = false;
            tbMenuTooltip.Width           = Unit.Pixel(250);
            tbMenuTooltip.ToolTip         = "Tooltip displayed when hovering over item.";
            menuView.Controls.Add(tbMenuTooltip);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Enabled</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            cbMenuEnabled = new CheckBox();
            cbMenuEnabled.EnableViewState = false;
            menuView.Controls.Add(cbMenuEnabled);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Order</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuOrder = new TextBox();
            tbMenuOrder.EnableViewState = false;
            menuView.Controls.Add(tbMenuOrder);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Left Icon</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuLeftIcon = new TextBox();
            tbMenuLeftIcon.EnableViewState = false;
            menuView.Controls.Add(tbMenuLeftIcon);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Left Icon Over</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuLeftIconOver = new TextBox();
            tbMenuLeftIconOver.EnableViewState = false;
            menuView.Controls.Add(tbMenuLeftIconOver);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Right Icon</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuRightIcon = new TextBox();
            tbMenuRightIcon.EnableViewState = false;
            menuView.Controls.Add(tbMenuRightIcon);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Right Icon Over</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            tbMenuRightIconOver = new TextBox();
            tbMenuRightIconOver.EnableViewState = false;
            menuView.Controls.Add(tbMenuRightIconOver);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            menuView.Controls.Add(new LiteralControl("<div class=\"inputrow\">"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputlabel\">Menu Break</span>"));
            menuView.Controls.Add(new LiteralControl("<span class=\"inputfield\">"));
            cbMenuBreak = new CheckBox();
            cbMenuBreak.EnableViewState = false;
            menuView.Controls.Add(cbMenuBreak);
            menuView.Controls.Add(new LiteralControl("</span></div>"));

            #endregion

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = "OK";
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                 = new Button();
            btCancel.Text            = "Cancel";
            btCancel.Width           = Unit.Pixel(72);
            btCancel.EnableViewState = false;
            btCancel.Click          += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            btDelete                 = new Button();
            btDelete.Text            = "Delete";
            btDelete.Width           = Unit.Pixel(72);
            btDelete.EnableViewState = false;
            btDelete.Click          += new EventHandler(delete_Click);
            buttons.Controls.Add(btDelete);

            bind();

            ChildControlsCreated = true;
        }
Example #12
0
        protected override void CreateChildControls()
        {
            Panel container = new Panel();

            container.CssClass = this.CssClass;
            Controls.Add(container);

            Panel header = new Panel();

            header.CssClass = "pHead";
            container.Controls.Add(header);

            headerText = new Literal();
            header.Controls.Add(headerText);

            Panel content = new Panel();

            content.CssClass = "pContent";
            container.Controls.Add(content);

            #region TabStrip

            tabstrip = new ComponentArt.Web.UI.TabStrip();

            // Create the DefaultTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook defaultTabLook = new ComponentArt.Web.UI.ItemLook();
            defaultTabLook.LookId             = "DefaultTabLook";
            defaultTabLook.CssClass           = "DefaultTab";
            defaultTabLook.HoverCssClass      = "DefaultTabHover";
            defaultTabLook.LabelPaddingLeft   = Unit.Pixel(10);
            defaultTabLook.LabelPaddingRight  = Unit.Pixel(10);
            defaultTabLook.LabelPaddingTop    = Unit.Pixel(5);
            defaultTabLook.LabelPaddingBottom = Unit.Pixel(4);
            defaultTabLook.LeftIconUrl        = "tab_left_icon.gif";
            defaultTabLook.RightIconUrl       = "tab_right_icon.gif";
            defaultTabLook.HoverLeftIconUrl   = "hover_tab_left_icon.gif";
            defaultTabLook.HoverRightIconUrl  = "hover_tab_right_icon.gif";
            defaultTabLook.LeftIconWidth      = Unit.Pixel(3);
            defaultTabLook.LeftIconHeight     = Unit.Pixel(21);
            defaultTabLook.RightIconWidth     = Unit.Pixel(3);
            defaultTabLook.RightIconHeight    = Unit.Pixel(21);
            tabstrip.ItemLooks.Add(defaultTabLook);

            // Create the SelectedTabLook instance and add it to the ItemLooks collection
            ComponentArt.Web.UI.ItemLook selectedTabLook = new ComponentArt.Web.UI.ItemLook();
            selectedTabLook.LookId             = "SelectedTabLook";
            selectedTabLook.CssClass           = "SelectedTab";
            selectedTabLook.LabelPaddingLeft   = Unit.Pixel(10);
            selectedTabLook.LabelPaddingRight  = Unit.Pixel(10);
            selectedTabLook.LabelPaddingTop    = Unit.Pixel(5);
            selectedTabLook.LabelPaddingBottom = Unit.Pixel(4);
            selectedTabLook.LeftIconUrl        = "selected_tab_left_icon.gif";
            selectedTabLook.RightIconUrl       = "selected_tab_right_icon.gif";
            selectedTabLook.LeftIconWidth      = Unit.Pixel(3);
            selectedTabLook.LeftIconHeight     = Unit.Pixel(21);
            selectedTabLook.RightIconWidth     = Unit.Pixel(3);
            selectedTabLook.RightIconHeight    = Unit.Pixel(21);
            tabstrip.ItemLooks.Add(selectedTabLook);

            ComponentArt.Web.UI.ItemLook scrollItemLook = new ItemLook();
            scrollItemLook.LookId             = "ScrollItem";
            scrollItemLook.CssClass           = "ScrollItem";
            scrollItemLook.HoverCssClass      = "ScrollItemHover";
            scrollItemLook.LabelPaddingLeft   = Unit.Pixel(5);
            scrollItemLook.LabelPaddingRight  = Unit.Pixel(5);
            scrollItemLook.LabelPaddingTop    = Unit.Pixel(0);
            scrollItemLook.LabelPaddingBottom = Unit.Pixel(0);
            tabstrip.ItemLooks.Add(scrollItemLook);

            tabstrip.ID                        = this.ID + "_TabStrip";
            tabstrip.CssClass                  = "TopGroup";
            tabstrip.DefaultItemLookId         = "DefaultTabLook";
            tabstrip.DefaultSelectedItemLookId = "SelectedTabLook";
            tabstrip.DefaultGroupTabSpacing    = 1;
            tabstrip.ImagesBaseUrl             = "tabstrip_images/";
            tabstrip.MultiPageId               = this.ID + "_MultiPage";
            tabstrip.ScrollingEnabled          = true;
            tabstrip.ScrollLeftLookId          = "ScrollItem";
            tabstrip.ScrollRightLookId         = "ScrollItem";
            content.Controls.Add(tabstrip);

            #endregion

            #region MultiPage

            multipage          = new ComponentArt.Web.UI.MultiPage();
            multipage.ID       = this.ID + "_MultiPage";
            multipage.CssClass = "MultiPage";
            content.Controls.Add(multipage);

            #endregion

            #region General View

            generalView          = new ComponentArt.Web.UI.PageView();
            generalView.CssClass = "PageContent";
            multipage.PageViews.Add(generalView);

            TabStripTab generalTab = new TabStripTab();
            generalTab.Text       = Localization.PeopleStrings.GeneralTab;
            generalTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(generalTab);

            tbUserName                   = new TextBox();
            tbUserName.Width             = Unit.Pixel(175);
            tbUserName.EnableViewState   = false;
            cbIsDisabled                 = new CheckBox();
            cbIsDisabled.Width           = Unit.Pixel(175);
            cbIsDisabled.EnableViewState = false;
            cbIsDisabled.Text            = Localization.Strings.Disabled;
            registerControl(generalView,
                            Localization.SecurityStrings.Username, tbUserName, cbIsDisabled);

            tbLoginPassword                 = new TextBox();
            tbLoginPassword.Width           = Unit.Pixel(175);
            tbLoginPassword.TextMode        = TextBoxMode.Password;
            tbLoginPassword.EnableViewState = false;
            registerControl(generalView,
                            Localization.SecurityStrings.Password, tbLoginPassword);

            registerControl(generalView,
                            string.Empty, new LiteralControl("<em>" +
                                                             Localization.SecurityStrings.PasswordTextBoxNote + "</em>"));

            tbRoles    = new TextBox();
            tbRoles.ID = this.ID + "_ref";
            tbRoles.EnableViewState = false;
            tbRoles.Rows            = 10;
            tbRoles.MaxLength       = 1500;
            tbRoles.TextMode        = TextBoxMode.MultiLine;
            tbRoles.Width           = Unit.Pixel(350);
            tbRoles.ToolTip         = Localization.SecurityStrings.RolesTextBoxNote;
            registerControl(generalView,
                            Localization.SecurityStrings.Roles, tbRoles);

            Panel rolesPanel = new Panel();
            rolesPanel.Controls.Add(new LiteralControl("<div style=\"float:left\">"));
            comboRoles                      = new ComponentArt.Web.UI.ComboBox();
            comboRoles.ID                   = this.ID + "_rcb";
            comboRoles.CssClass             = "comboBox";
            comboRoles.HoverCssClass        = "comboBoxHover";
            comboRoles.FocusedCssClass      = "comboBoxHover";
            comboRoles.TextBoxCssClass      = "comboTextBox";
            comboRoles.DropDownCssClass     = "comboDropDown";
            comboRoles.ItemCssClass         = "comboItem";
            comboRoles.ItemHoverCssClass    = "comboItemHover";
            comboRoles.SelectedItemCssClass = "comboItemHover";
            comboRoles.DropHoverImageUrl    = "combobox_images/drop_hover.gif";
            comboRoles.DropImageUrl         = "combobox_images/drop.gif";
            comboRoles.Width                = Unit.Pixel(250);
            comboRoles.EnableViewState      = false;
            rolesPanel.Controls.Add(comboRoles);
            rolesPanel.Controls.Add(new LiteralControl("</div><div><input type=\"button\" value=\"" +
                                                       Localization.Strings.Add + "\" " +
                                                       "align=\"right\" onClick=\"" +
                                                       tbRoles.ClientID + ".value += (" + tbRoles.ClientID + ".value != '' ? '\\r\\n' : '') + " +
                                                       comboRoles.ClientObjectId + ".getSelectedItem().Text;\"></div>"));
            registerControl(generalView, string.Empty, rolesPanel);

            registerControl(generalView,
                            string.Empty, new LiteralControl("<em>" +
                                                             Localization.SecurityStrings.RolesTextBoxNote + "</em>"));

            #endregion

            #region Contact View

            contactView          = new ComponentArt.Web.UI.PageView();
            contactView.CssClass = "PageContent";
            multipage.PageViews.Add(contactView);

            TabStripTab contactTab = new TabStripTab();
            contactTab.Text       = Localization.PeopleStrings.ContactTab;
            contactTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(contactTab);

            tbName                 = new TextBox();
            tbName.Width           = Unit.Pixel(200);
            tbName.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.Name, tbName);

            tbAddress1                 = new TextBox();
            tbAddress1.Width           = Unit.Pixel(175);
            tbAddress1.EnableViewState = false;
            cbBadAddress               = new CheckBox();
            cbBadAddress.Text          = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.Address, tbAddress1, cbBadAddress);

            tbAddress2                 = new TextBox();
            tbAddress2.Width           = Unit.Pixel(175);
            tbAddress2.EnableViewState = false;
            registerControl(contactView, string.Empty, tbAddress2);

            tbCity                 = new TextBox();
            tbCity.Width           = Unit.Pixel(175);
            tbCity.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.City, tbCity);

            tbStateProvince                 = new TextBox();
            tbStateProvince.Width           = Unit.Pixel(175);
            tbStateProvince.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.StateProvince, tbStateProvince);

            tbPostalCode                 = new TextBox();
            tbPostalCode.Width           = Unit.Pixel(175);
            tbPostalCode.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.PostalCode, tbPostalCode);

            tbCountry                 = new TextBox();
            tbCountry.Width           = Unit.Pixel(175);
            tbCountry.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.Country, tbCountry);

            tbHomePhone                 = new TextBox();
            tbHomePhone.Width           = Unit.Pixel(175);
            tbHomePhone.EnableViewState = false;
            cbBadHomePhone              = new CheckBox();
            cbBadHomePhone.Text         = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.HomePhone, tbHomePhone, cbBadHomePhone);

            tbWorkPhone                 = new TextBox();
            tbWorkPhone.Width           = Unit.Pixel(175);
            tbWorkPhone.EnableViewState = false;
            cbBadWorkPhone              = new CheckBox();
            cbBadWorkPhone.Text         = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.WorkPhone, tbWorkPhone, cbBadWorkPhone);

            tbMobilePhone                 = new TextBox();
            tbMobilePhone.Width           = Unit.Pixel(175);
            tbMobilePhone.EnableViewState = false;
            cbBadMobilePhone              = new CheckBox();
            cbBadMobilePhone.Text         = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.MobilePhone, tbMobilePhone, cbBadMobilePhone);

            tbPager                 = new TextBox();
            tbPager.Width           = Unit.Pixel(175);
            tbPager.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.Pager, tbPager);

            tbEmail1                 = new TextBox();
            tbEmail1.Width           = Unit.Pixel(175);
            tbEmail1.EnableViewState = false;
            cbBadEmail               = new CheckBox();
            cbBadEmail.Text          = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.Email, tbEmail1, cbBadEmail);

            tbEmail2                 = new TextBox();
            tbEmail2.Width           = Unit.Pixel(175);
            tbEmail2.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.Email2, tbEmail2);

            tbUrl                 = new TextBox();
            tbUrl.Width           = Unit.Pixel(175);
            tbUrl.EnableViewState = false;
            cbBadUrl              = new CheckBox();
            cbBadUrl.Text         = Localization.PeopleStrings.Invalid;
            registerControl(contactView,
                            Localization.PeopleStrings.WebsiteUrl, tbUrl, cbBadUrl);

            tbBirthDate                 = new TextBox();
            tbBirthDate.Width           = Unit.Pixel(175);
            tbBirthDate.EnableViewState = false;
            registerControl(contactView,
                            Localization.PeopleStrings.BirthDate, tbBirthDate);

            #endregion

            #region Memo View

            memoView          = new ComponentArt.Web.UI.PageView();
            memoView.CssClass = "PageContent";
            multipage.PageViews.Add(memoView);

            TabStripTab memoTab = new TabStripTab();
            memoTab.Text       = Localization.PeopleStrings.MemoTab;
            memoTab.PageViewId = generalView.ID;
            tabstrip.Tabs.Add(memoTab);

            tbMemoText                 = new TextBox();
            tbMemoText.TextMode        = TextBoxMode.MultiLine;
            tbMemoText.Rows            = 25;
            tbMemoText.Width           = Unit.Percentage(100);
            tbMemoText.EnableViewState = false;
            registerControl(memoView,
                            Localization.PeopleStrings.Memo, tbMemoText);

            #endregion

            #region Buttons

            Panel buttons = new Panel();
            buttons.CssClass = "pButtons";
            content.Controls.Add(buttons);

            btOk                 = new Button();
            btOk.Text            = Localization.Strings.OK;
            btOk.Width           = Unit.Pixel(72);
            btOk.EnableViewState = false;
            btOk.Click          += new EventHandler(ok_Click);
            buttons.Controls.Add(btOk);

            btCancel                 = new Button();
            btCancel.Text            = Localization.Strings.Cancel;
            btCancel.Width           = Unit.Pixel(72);
            btCancel.EnableViewState = false;
            btCancel.Click          += new EventHandler(cancel_Click);
            buttons.Controls.Add(btCancel);

            #endregion

            bind();

            ChildControlsCreated = true;
        }