Example #1
0
        // load panel from active designer item, clear it if none selected
        partial void OnClickEvent(NSObject sender)
        {
            var clickedButton = sender as NSButton;
            var mockedButton  = clickedButton?.Cell as IMockedControl;

            SetInitialValuesAsync(mockedButton as MockedSampleControlButton).Wait();

            var inspectedObject = (mockedButton == null || mockedButton.MockedControl == null)
                                ? (object)sender : mockedButton.MockedControl;

            if (this.addToSelection)
            {
                if (PropertyPanel.SelectedItems.Contains(inspectedObject))
                {
                    PropertyPanel.SelectedItems.Remove(inspectedObject);
                }
                else
                {
                    PropertyPanel.SelectedItems.Add(inspectedObject);
                }
            }
            else
            {
                PropertyPanel.Select(new[] { inspectedObject });
            }
        }
 private void ContextMenu_Properties_Click(object sender, EventArgs e)
 {
     if (Selected)
     {
         PropertyPanel.ShowProperties(this.Location, this.Size);
     }
 }
 private void SimpleFigures_LocationChanged(object sender, EventArgs e)
 {
     if (PropertyPanel != null)
     {
         PropertyPanel.UpdateLocation(this.Location);
     }
 }
        /// <summary>
        /// Initializes controls
        /// </summary>
        /// <param name="e"></param>
        protected override void OnInit(EventArgs e)
        {
            base.OnLoad(e);
            PropertyPanel allowedPropertyPanel = new PropertyPanel();

            allowedPropertyPanel.Text = "Allowed Macros";
            allowedPropertyPanel.Controls.Add(_macroList);
            Controls.Add(allowedPropertyPanel);

            PropertyPanel numberPropertyPanel = new PropertyPanel();

            numberPropertyPanel.Text = "Max Number";
            _txtMaxNumber            = new TextBox();
            _txtMaxNumber.ID         = "maxnumber";
            numberPropertyPanel.Controls.Add(_txtMaxNumber);
            Controls.Add(numberPropertyPanel);

            PropertyPanel widthPropertyPanel = new PropertyPanel();

            widthPropertyPanel.Text = "Prefered width";
            _txtPreferedWidth       = new TextBox();
            _txtPreferedWidth.ID    = "prefwidth";
            widthPropertyPanel.Controls.Add(_txtPreferedWidth);
            Controls.Add(widthPropertyPanel);

            PropertyPanel heightPropertyPanel = new PropertyPanel();

            heightPropertyPanel.Text = "Prefered height";
            _txtPreferedHeight       = new TextBox();
            _txtPreferedHeight.ID    = "prefheight";
            heightPropertyPanel.Controls.Add(_txtPreferedHeight);
            Controls.Add(heightPropertyPanel);
        }
Example #5
0
        public AsmToArm(IStatusProvider statusProvider, ILogProvider logProvider, PropertyPanel propertyPanel)
            : base(statusProvider, logProvider)
        {
            InitializeComponent();

            _saveSelectionProvider = new UISaveSelectionProvider();
            _telemetryProvider     = new AsmToArmTelemetryProvider();
            _appSettingsProvider   = new AppSettingsProvider();
            _PropertyPanel         = propertyPanel;

            _AzureContextSourceASM = new AzureContext(LogProvider, StatusProvider, _appSettingsProvider);
            _AzureContextSourceASM.AzureEnvironmentChanged       += _AzureContextSourceASM_AzureEnvironmentChanged;
            _AzureContextSourceASM.UserAuthenticated             += _AzureContextSourceASM_UserAuthenticated;
            _AzureContextSourceASM.BeforeAzureSubscriptionChange += _AzureContextSourceASM_BeforeAzureSubscriptionChange;
            _AzureContextSourceASM.AfterAzureSubscriptionChange  += _AzureContextSourceASM_AfterAzureSubscriptionChange;
            _AzureContextSourceASM.BeforeUserSignOut             += _AzureContextSourceASM_BeforeUserSignOut;
            _AzureContextSourceASM.AfterUserSignOut       += _AzureContextSourceASM_AfterUserSignOut;
            _AzureContextSourceASM.AfterAzureTenantChange += _AzureContextSourceASM_AfterAzureTenantChange;

            _AzureContextTargetARM = new AzureContext(LogProvider, StatusProvider, _appSettingsProvider);

            _TargetResourceGroup = new ResourceGroup(this.AzureContextSourceASM, "Target Resource Group");

            azureLoginContextViewerASM.Bind(_AzureContextSourceASM);
            azureLoginContextViewerARM.Bind(_AzureContextTargetARM);

            this.TemplateGenerator = new AsmToArmGenerator(_AzureContextSourceASM.AzureSubscription, _AzureContextTargetARM.AzureSubscription, _TargetResourceGroup, LogProvider, StatusProvider, _telemetryProvider, _appSettingsProvider);
        }
Example #6
0
        public AwsToArm(IStatusProvider statusProvider, ILogProvider logProvider, PropertyPanel propertyPanel)
            : base(statusProvider, logProvider)
        {
            InitializeComponent();

            _PropertyPanel = propertyPanel;
        }
            public void InstantiateIn(Control container)
            {
                HiddenField hdfLanguageId = new HiddenField();

                hdfLanguageId.ID = "HdfLanguageId";
                container.Controls.Add(hdfLanguageId);

                PropertyPanel ppnlSettingHeader = new PropertyPanel();

                ppnlSettingHeader.ID   = "PPNLSettingHeader";
                ppnlSettingHeader.Text = PaymentProviderTerms.Key;
                container.Controls.Add(ppnlSettingHeader);

                Label lblValueHeader = new Label();

                lblValueHeader.ID        = "LblValueHeader";
                lblValueHeader.Text      = PaymentProviderTerms.Value;
                lblValueHeader.Font.Bold = true;
                ppnlSettingHeader.Controls.Add(lblValueHeader);

                PlaceHolder itemPlaceHolder = new PlaceHolder()
                {
                    ID = "itemPlaceHolder"
                };

                container.Controls.Add(itemPlaceHolder);
            }
Example #8
0
        public AwsToArm(IStatusProvider statusProvider, ILogProvider logProvider, PropertyPanel propertyPanel)
            : base(statusProvider, logProvider)
        {
            InitializeComponent();

            _PropertyPanel         = propertyPanel;
            _saveSelectionProvider = new AwsToArmSaveSelectionProvider();
            _telemetryProvider     = new AwsToArmSaveSelectionProvider();

            _AzureContextTargetARM = new AzureContext(LogProvider, StatusProvider, null); // _appSettingsProvider);
            _AzureContextTargetARM.AfterAzureSubscriptionChange += _AzureContextTargetARM_AfterAzureSubscriptionChange;

            azureLoginContextViewer21.Bind(_AzureContextTargetARM);

            this.TemplateGenerator = new AwsGenerator(LogProvider, StatusProvider);

            this.treeTargetARM.LogProvider    = this.LogProvider;
            this.treeTargetARM.StatusProvider = this.StatusProvider;

            if (_AzureContextTargetARM != null && _AzureContextTargetARM.SettingsProvider != null)
            {
                this.treeTargetARM.SettingsProvider = _AzureContextTargetARM.SettingsProvider;
            }

            this._PropertyPanel.LogProvider      = this.LogProvider;
            this._PropertyPanel.StatusProvider   = this.StatusProvider;
            this._PropertyPanel.AzureContext     = _AzureContextTargetARM;
            this._PropertyPanel.TargetTreeView   = treeTargetARM;
            this._PropertyPanel.PropertyChanged += _PropertyPanel_PropertyChanged;
        }
Example #9
0
        void MainFrm_Load(object sender, EventArgs e)
        {
            GlobalService.UserId = System.Configuration.ConfigurationManager.AppSettings["CoreId"];

            string path = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "DockPanel.config");

            if (File.Exists(path))
            {
                try
                {
                    this.m_workspace.LoadFromXml(path, this.m_deserializeDockContent);
                }
                catch (Exception ex)
                {
                }
            }
            else
            {
                this.m_errorPanel    = new ErrorPanel();
                this.m_prjPanel      = new ProjectPanel();
                this.m_propertyPanel = new PropertyPanel();
                //this.m_tabsPanel = new TabsPanel();

                m_prjPanel.Show(this.m_workspace, WeifenLuo.WinFormsUI.Docking.DockState.DockLeft);
                m_errorPanel.Show(this.m_workspace, DockState.DockBottom);
                m_propertyPanel.Show(this.m_workspace, DockState.DockRight);
                //var f = new FileTabPanel();
                //f.TabText = "1.dm";
                //f.Show(this.m_workspace, DockState.Document);
            }

            this.Init();
        }
        //--------------------------------------------------------------------------------------------------

        public override void Start()
        {
            _Panel = PropertyPanel.CreatePanel <CircularArrayPropertyPanel>(Entity);
            InteractiveContext.Current.PropertyPanelManager?.AddPanel(_Panel, PropertyPanelSortingKey.Shapes);

            Entity.PropertyChanged += _Entity_PropertyChanged;

            _UpdateHints();
        }
Example #11
0
        //--------------------------------------------------------------------------------------------------

        public void RemovePanel(PropertyPanel panel)
        {
            var index = _PropertyPanels.IndexOfFirst(p => p.Panel == panel);

            if (index >= 0)
            {
                _PropertyPanels.RemoveAt(index);
                panel.Cleanup();
            }
        }
Example #12
0
        //--------------------------------------------------------------------------------------------------

        public void AddPanel(PropertyPanel panel, int sortingKey)
        {
            var index = _PropertyPanels.IndexOfFirst(p => p.SortingKey > sortingKey);

            if (index >= 0)
            {
                _PropertyPanels.Insert(index, new PropertyPanelItem(sortingKey, panel));
                return;
            }
            _PropertyPanels.Add(new PropertyPanelItem(sortingKey, panel));
        }
Example #13
0
        //--------------------------------------------------------------------------------------------------

        public override void Start()
        {
            _Panel = PropertyPanel.CreatePanel <PipePropertyPanel>(Entity);
            InteractiveContext.Current.PropertyPanelManager?.AddPanel(_Panel, PropertyPanelSortingKey.Shapes);

            if (Entity.Predecessor is Sketch sketch)
            {
                _SketchPanel = PropertyPanel.CreatePanel <SketchPropertyPanel>(sketch);
                InteractiveContext.Current.PropertyPanelManager?.AddPanel(_SketchPanel, _Panel);
            }
        }
Example #14
0
        //--------------------------------------------------------------------------------------------------

        public override void Start()
        {
            _Panel = PropertyPanel.CreatePanel <ImprintPropertyPanel>(Entity);
            InteractiveContext.Current.PropertyPanelManager?.AddPanel(_Panel, PropertyPanelSortingKey.Shapes);

            if (Entity.Sketch != null)
            {
                _SketchPanel = PropertyPanel.CreatePanel <SketchPropertyPanel>(Entity.Sketch);
                InteractiveContext.Current.PropertyPanelManager?.AddPanel(_SketchPanel, _Panel);
            }
        }
Example #15
0
        //--------------------------------------------------------------------------------------------------

        public void AddPanel(PropertyPanel panel, PropertyPanel insertAfter)
        {
            var index = _PropertyPanels.IndexOfFirst(p => p.Panel == insertAfter);

            if (index >= 0)
            {
                _PropertyPanels.Insert(index + 1, new PropertyPanelItem(_PropertyPanels[index].SortingKey, panel));
                return;
            }

            _PropertyPanels.Add(new PropertyPanelItem(int.MaxValue, panel));
        }
 private void pictureBox_SizeChanged(object sender, EventArgs e)
 {
     DrawFigure(data.Type);
     foreach (FigureResize item in this.Controls.OfType <FigureResize>())
     {
         item.PositionSetUp();
     }
     pictureBox.Invalidate();
     if (PropertyPanel != null)
     {
         PropertyPanel.UpdateSize(this.Size);
     }
 }
Example #17
0
    public void SetInformation(Property prop, PropertyPanel panel)
    {
        Informations info = prop.GetInfo();

        this.propertyPanel  = panel;
        this.property       = prop;
        this.icon.sprite    = info.sprite;
        this.title.text     = TranslationManager.GameLanguage == Language.Portuguese ? prop.portugueseTitle : prop.englishTitle;
        this.food.text      = info.Food.ToString();
        this.gold.text      = info.Gold.ToString();
        this.building.text  = info.Building.ToString();
        this.happiness.text = info.happiness.ToString();
        this.soldier.text   = info.Soldiers.ToString();
    }
Example #18
0
        //--------------------------------------------------------------------------------------------------

        public override void Start()
        {
            _Panel = PropertyPanel.CreatePanel <BodyPropertyPanel>(Entity);
            InteractiveContext.Current.PropertyPanelManager?.AddPanel(_Panel, PropertyPanelSortingKey.Body);

            _ShapePanel = PropertyPanel.CreatePanel <BodyShapePropertyPanel>(Entity);
            InteractiveContext.Current.PropertyPanelManager?.AddPanel(_ShapePanel, PropertyPanelSortingKey.BodyShape);

            _UpdateComponents();

            Entity.PropertyChanged          += _Body_PropertyChanged;
            InteractiveEntity.VisualChanged += _InteractiveEntity_VisualChanged;

            _UpdateGhost();
        }
Example #19
0
		public MwxScene(Viewport viewport) : base(viewport)
		{
			Name = "Mwx";
			
			var mwxDemo = new MwxDemo() {
				Name = "Object Name",
				Description = "This is the description"
			};
			
			
			var propPanel = new PropertyPanel(mwxDemo);
			var pane = new OverlayPane(propPanel);
			RenderList.AddOverlay(pane);
			pane.Origin = new MonoWorks.Base.Coord(200, 200);
		}
Example #20
0
        //--------------------------------------------------------------------------------------------------

        void _InitInteractions()
        {
            if (_Panel == null)
            {
                _Panel = PropertyPanel.CreatePanel <SliceContourPropertyPanel>(this);
                InteractiveContext.Current.PropertyPanelManager?.AddPanel(_Panel, PropertyPanelSortingKey.Tools);
                InteractiveContext.Current.PropertyPanelManager?.HidePanels(PropertyPanelSortingKey.BodyShape, PropertyPanelSortingKey.Tools - 1);

                _SelectionContext = InteractiveContext.Current.WorkspaceController.Selection.OpenContext();

                _Component.PropertyChanged      += _Component_OnPropertyChanged;
                InteractiveEntity.VisualChanged += _InteractiveEntity_OnVisualChanged;
            }

            _UpdateReconstructed();
        }
Example #21
0
        public ArmToArm(IStatusProvider statusProvider, ILogProvider logProvider, PropertyPanel propertyPanel)
            : base(statusProvider, logProvider)
        {
            InitializeComponent();

            _saveSelectionProvider = new MigAz.Forms.ARM.Providers.UISaveSelectionProvider();
            _telemetryProvider     = new ArmToArmTelemetryProvider();
            _appSettingsProvider   = new AppSettingsProvider();
            _PropertyPanel         = propertyPanel;

            _AzureContextARM = new AzureContext(LogProvider, StatusProvider, _appSettingsProvider);
            _AzureContextARM.AfterAzureSubscriptionChange += _AzureContextARM_AfterAzureSubscriptionChange;
            azureLoginContextViewer1.Bind(_AzureContextARM);

            _TargetResourceGroup = new ResourceGroup(this._AzureContextARM, "Target Resource Group");

            this.TemplateGenerator = new ArmToArmGenerator(_AzureContextARM.AzureSubscription, _AzureContextARM.AzureSubscription, _TargetResourceGroup, LogProvider, StatusProvider, _telemetryProvider, _appSettingsProvider);
        }
Example #22
0
        private Control AddPanel(XmlNode node, Control c)
        {
            LiteralControl hide = AddShowOnceLink(node);

            if (node.Attributes.GetNamedItem("addPanel") != null &&
                node.Attributes.GetNamedItem("addPanel").Value == "true")
            {
                Pane          p  = new Pane();
                PropertyPanel pp = new PropertyPanel();
                if (node.Attributes.GetNamedItem("panelCaption") != null &&
                    !String.IsNullOrEmpty(node.Attributes.GetNamedItem("panelCaption").Value))
                {
                    string panelCaption = node.Attributes.GetNamedItem("panelCaption").Value;
                    if (panelCaption.StartsWith("#"))
                    {
                        panelCaption = ui.Text(panelCaption.Substring(1));
                    }
                    pp.Text = panelCaption;
                }
                // check for hide in the future link
                if (!String.IsNullOrEmpty(hide.Text))
                {
                    pp.Controls.Add(hide);
                }
                pp.Controls.Add(c);
                p.Controls.Add(pp);
                return(p);
            }

            if (!String.IsNullOrEmpty(hide.Text))
            {
                PlaceHolder ph = new PlaceHolder();
                ph.Controls.Add(hide);
                ph.Controls.Add(c);
                return(ph);
            }
            else
            {
                return(c);
            }
        }
 internal void SetProperties(PropertyPanel panel)
 {
     //appTreeView.OBS_SwitchScreen.SetPropertyPanel(panel);
 }
Example #24
0
 public PropertyPanelItem(int sortingKey, PropertyPanel panel)
 {
     SortingKey = sortingKey;
     Panel      = panel;
 }
Example #25
0
        private void setupChildControls()
        {
            HyperLink _logoImageLink = new HyperLink();

            _logoImageLink.ImageUrl    = "/Umbraco/Api/Resource/GetEmbededPng?filename=settings-logo.png";
            _logoImageLink.NavigateUrl = "http://dejanstojanovic.net/umbraco-googlemap-editor";
            _logoImageLink.Target      = "_blank";
            _logoImageLink.ID          = "logoImage";
            PropertyPanel propertyPanel = new PropertyPanel();

            propertyPanel.Text = string.Empty;
            propertyPanel.Controls.Add(_logoImageLink);
            Controls.Add(propertyPanel);


            _txtWidth          = new TextBox();
            _txtWidth.ID       = "txtWidth";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Width & Height";
            propertyPanel.Controls.Add(_txtWidth);
            AddRequiredValidator(_txtWidth);

            propertyPanel.Controls.Add(new Literal()
            {
                Text = " x "
            });

            _txtHeight    = new TextBox();
            _txtHeight.ID = "txtHeight";
            propertyPanel.Controls.Add(_txtHeight);
            AddRequiredValidator(_txtHeight);
            Controls.Add(propertyPanel);


            _txtZoom           = new TextBox();
            _txtZoom.ID        = "txtZoom";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Zoom";
            propertyPanel.Controls.Add(_txtZoom);
            AddRequiredValidator(_txtZoom);
            Controls.Add(propertyPanel);

            _cbSingleLocation    = new CheckBox();
            _cbSingleLocation.ID = "cbSingleLocation";
            propertyPanel        = new PropertyPanel();
            propertyPanel.Text   = "Single location";
            propertyPanel.Controls.Add(_cbSingleLocation);
            Controls.Add(propertyPanel);

            _cbSearchBox       = new CheckBox();
            _cbSearchBox.ID    = "cbSearchBox";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Search box";
            propertyPanel.Controls.Add(_cbSearchBox);
            Controls.Add(propertyPanel);

            _cbRichText        = new CheckBox();
            _cbRichText.ID     = "cbRichText";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Rich text editor";
            propertyPanel.Controls.Add(_cbRichText);
            Controls.Add(propertyPanel);

            _txtCenterLatitude    = new TextBox();
            _txtCenterLatitude.ID = "txtCenterLatitude";
            propertyPanel         = new PropertyPanel();
            propertyPanel.Text    = "Center latitude & longitude";
            propertyPanel.Controls.Add(_txtCenterLatitude);
            AddRequiredValidator(_txtCenterLatitude);

            propertyPanel.Controls.Add(new Literal()
            {
                Text = " : "
            });
            _txtCenterLongitude    = new TextBox();
            _txtCenterLongitude.ID = "txtCenterLongitude";
            propertyPanel.Controls.Add(_txtCenterLongitude);
            AddRequiredValidator(_txtCenterLongitude);

            Controls.Add(propertyPanel);

            HtmlButton _htmlLocationButton = new HtmlButton();

            _htmlLocationButton.InnerText = "use my current location";
            _htmlLocationButton.ID        = "btnGetLocation";
            _htmlLocationButton.Attributes.Add("class", "current-location");
            _htmlLocationButton.Attributes.Add("type", "button");
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "&nbsp;";
            propertyPanel.Controls.Add(_htmlLocationButton);
            Controls.Add(propertyPanel);

            _cblDrawingTools    = new CheckBoxList();
            _cblDrawingTools.ID = "cblDRawingTools";

            _cblDrawingTools.Items.Add(new ListItem("Marker", "marker"));
            _cblDrawingTools.Items.Add(new ListItem("Polyline", "polyline"));
            _cblDrawingTools.Items.Add(new ListItem("Polygon", "polygon"));
            _cblDrawingTools.Items.Add(new ListItem("Circle", "circle"));
            _cblDrawingTools.Items.Add(new ListItem("Rectangle", "rectangle"));

            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Drawing tools";
            propertyPanel.Controls.Add(_cblDrawingTools);
            Controls.Add(propertyPanel);

            _cbZoomControl     = new CheckBox();
            _cbZoomControl.ID  = "cbZoomControl";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Zoom control";
            propertyPanel.Controls.Add(_cbZoomControl);
            Controls.Add(propertyPanel);

            _cbPanControl      = new CheckBox();
            _cbPanControl.ID   = "cbPanControl";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Pan control";
            propertyPanel.Controls.Add(_cbPanControl);
            Controls.Add(propertyPanel);

            _cbStreetViewControl    = new CheckBox();
            _cbStreetViewControl.ID = "cbStreetViewControl";
            propertyPanel           = new PropertyPanel();
            propertyPanel.Text      = "StreetView control";
            propertyPanel.Controls.Add(_cbStreetViewControl);
            Controls.Add(propertyPanel);

            _cbScaleControl    = new CheckBox();
            _cbScaleControl.ID = "cbScaleControl";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Scale control";
            propertyPanel.Controls.Add(_cbScaleControl);
            Controls.Add(propertyPanel);

            _ddlLanguages      = new DropDownList();
            _ddlLanguages.ID   = "ddlLanguages";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Language in map editor";
            foreach (string supportedLanguage in Extensions.CultureInfoExtensions.GoogleMapsSupportedLanguageCodes)
            {
                CultureInfo culture;
                try
                {
                    culture = new CultureInfo(supportedLanguage);
                    _ddlLanguages.Items.Add(new ListItem(culture.EnglishName, supportedLanguage));
                }
                catch
                {
                    _ddlLanguages.Items.Add(new ListItem(supportedLanguage, supportedLanguage));
                }
            }
            propertyPanel.Controls.Add(_ddlLanguages);
            Controls.Add(propertyPanel);
        }
Example #26
0
        private void setupChildControls()
        {
            HyperLink _logoImageLink = new HyperLink();

            _logoImageLink.ImageUrl    = "/Umbraco/Api/Resource/GetEmbededPng?filename=settings-logo.png";
            _logoImageLink.NavigateUrl = "http://dejanstojanovic.net/umbraco-googlemap-editor";
            _logoImageLink.Target      = "_blank";
            _logoImageLink.ID          = "logoImage";
            PropertyPanel propertyPanel = new PropertyPanel();

            propertyPanel.Text = string.Empty;
            propertyPanel.Controls.Add(_logoImageLink);
            Controls.Add(propertyPanel);


            _txtWidth          = new TextBox();
            _txtWidth.ID       = "txtWidth";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Width & Height";
            propertyPanel.Controls.Add(_txtWidth);
            propertyPanel.Controls.Add(new Literal()
            {
                Text = " x "
            });
            _txtHeight    = new TextBox();
            _txtHeight.ID = "txtHeight";
            propertyPanel.Controls.Add(_txtHeight);
            Controls.Add(propertyPanel);


            _txtZoom           = new TextBox();
            _txtZoom.ID        = "txtZoom";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Zoom";
            propertyPanel.Controls.Add(_txtZoom);
            Controls.Add(propertyPanel);

            _cbSingleLocation    = new CheckBox();
            _cbSingleLocation.ID = "cbSingleLocation";
            propertyPanel        = new PropertyPanel();
            propertyPanel.Text   = "Single location";
            propertyPanel.Controls.Add(_cbSingleLocation);
            Controls.Add(propertyPanel);

            _cbSearchBox       = new CheckBox();
            _cbSearchBox.ID    = "cbSearchBox";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Search box";
            propertyPanel.Controls.Add(_cbSearchBox);
            Controls.Add(propertyPanel);

            _cbRichText        = new CheckBox();
            _cbRichText.ID     = "cbRichText";
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Rich text editor";
            propertyPanel.Controls.Add(_cbRichText);
            Controls.Add(propertyPanel);

            _txtCenterLatitude    = new TextBox();
            _txtCenterLatitude.ID = "txtCenterLatitude";
            propertyPanel         = new PropertyPanel();
            propertyPanel.Text    = "Center latitude & longitude";
            propertyPanel.Controls.Add(_txtCenterLatitude);
            propertyPanel.Controls.Add(new Literal()
            {
                Text = " : "
            });
            _txtCenterLongitude    = new TextBox();
            _txtCenterLongitude.ID = "txtCenterLongitude";
            propertyPanel.Controls.Add(_txtCenterLongitude);

            Controls.Add(propertyPanel);

            HtmlButton _htmlLocationButton = new HtmlButton();

            _htmlLocationButton.InnerText = "use my current location";
            _htmlLocationButton.ID        = "btnGetLocation";
            _htmlLocationButton.Attributes.Add("class", "current-location");
            _htmlLocationButton.Attributes.Add("type", "button");
            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "&nbsp;";
            propertyPanel.Controls.Add(_htmlLocationButton);
            Controls.Add(propertyPanel);

            _cblDrawingTools    = new CheckBoxList();
            _cblDrawingTools.ID = "cblDRawingTools";

            _cblDrawingTools.Items.Add(new ListItem("Marker", "marker"));
            _cblDrawingTools.Items.Add(new ListItem("Polyline", "polyline"));
            _cblDrawingTools.Items.Add(new ListItem("Polygon", "polygon"));
            _cblDrawingTools.Items.Add(new ListItem("Circle", "circle"));
            _cblDrawingTools.Items.Add(new ListItem("Rectangle", "rectangle"));

            propertyPanel      = new PropertyPanel();
            propertyPanel.Text = "Drawing tools";
            propertyPanel.Controls.Add(_cblDrawingTools);
            Controls.Add(propertyPanel);
        }
Example #27
0
 public GeneralProperty(PropertyPanel parent)
 {
     Properties = new SortedDictionary <UIObject, Point>();
     Owner      = parent.Owner;
     Parent     = parent;
 }
Example #28
0
    protected override void CreateChildControls()
    {
        PropertyPanel pp;

        _codeNameControl = new TextBox();
        _codeNameControl.Text = _codename;
        _codeNameControl.Enabled = _writeAccess;
        pp = new PropertyPanel(_codeNameControl, PropertyLayout.TwoColumns, "Codename", null);
        pp.Width = Unit.Percentage(95);
        pp.ShowAdvancedFunctions = false;
        this.Controls.Add(pp);

        _valueControl = new TextBox();
        _valueControl.Text = _value.ToString();
        _valueControl.Enabled = _writeAccess;
        pp = new PropertyPanel(_valueControl, PropertyLayout.TwoColumns, "Value", null);
        pp.Width = Unit.Percentage(95);
        pp.ShowAdvancedFunctions = false;
        this.Controls.Add(pp);

        _lcidControl = new LanguageVersions();
        _lcidControl.SetData(_names, _descriptions);
        _lcidControl.Enabled = _writeAccess;
        pp = new PropertyPanel(_lcidControl, PropertyLayout.NoTitle, "Language texts:", null);
        pp.Width = Unit.Percentage(95);
        pp.ShowAdvancedFunctions = false;
        this.Controls.Add(pp);

        Literal l = new Literal();
        l.EnableViewState = false;
        l.Text = "<div style=\"float:left; width:99%; border-top:solid 1px #BBBBBB; height:7px;\"></div><div style=\"clear:both;\"></div>";
        this.Controls.Add(l);

        base.CreateChildControls();
    }
Example #29
0
    protected override void CreateChildControls()
    {
        Controls.Clear();

        PropertyPanel pp;

        if (currentDef != null) {
            // Buttons
            WAFPanel pnlButtons = new WAFPanel();
            pnlButtons.Height = Unit.Pixel(25);
            pnlButtons.Border = false;
            if (writeAccess) {
                MainButton btnSave = new MainButton();
                btnSave.Text = "Save";
                btnSave.Click += new EventHandler(btnSave_Click);
                pnlButtons.Controls.Add(btnSave);

                if (DefinitionType == DefinitionType.Local) {
                    MainButton btnDelete = new MainButton();
                    btnDelete.Confirm = true;
                    btnDelete.ConfirmQuestion = "Delete property group \"" + currentDef.Name + "\"?";
                    btnDelete.Text = "Delete property group...";
                    btnDelete.Click += new EventHandler(btnDelete_Click);
                    pnlButtons.Controls.Add(btnDelete);
                }
            }
            if (DefinitionType == DefinitionType.Native) {
                //MainButton btnNewChangePropertyGroup = new MainButton();
                //btnNewChangePropertyGroup.Text = "Change";
                //btnNewChangePropertyGroup.Click += new EventHandler(btnNewChangePropertyGroup_Click);
                //pnlButtons.Controls.Add(btnNewChangePropertyGroup);
            }
            Controls.Add(pnlButtons);

            // Code name
            txtName = new TextBox();
            txtName.Width = Unit.Percentage(100);
            txtName.Font.Size = new FontUnit(14, UnitType.Pixel);
            txtName.Text = currentDef.Name;
            txtName.Enabled = writeAccess;

            StringBuilder htmlIcon = new StringBuilder();
            htmlIcon.Append("<img style=\"float:left; margin:5px 2px; 0px 0px;\" src=\"");
            htmlIcon.Append(IconUrl + currentDef.GroupType.ToString() + ".png");
            htmlIcon.Append("\" height=\"16\" width=\"16\" />");
            PropertyPanel ppCodeName = new PropertyPanel(txtName, PropertyLayout.TwoColumns, htmlIcon.ToString(), null);
            ppCodeName.TitleWidth = Unit.Pixel(50);
            ppCodeName.Height = Unit.Pixel(45);
            ppCodeName.ShowAdvancedFunctions = false;
            Controls.Add(ppCodeName);
            ppCodeName.Border = true;
            ppCodeName.MarginTop = true;

            TabbedView tab = new TabbedView();
            this.Controls.Add(tab);
            tab.PostOnViewChange = false;
            tab.MarginTop = true;
            tab.Height = Unit.Percentage(100);
            tab.Width = Unit.Percentage(100);
            TabView general = tab.CreateAndAddView("General", "General");
            general.Height = Unit.Percentage(100);
            general.Width = Unit.Percentage(100);

            // Group type
            lstType = new RadioButtonList();
            lstType.Items.Add(new ListItem("Panel", PropertyGroupType.Panel.ToString()));
            lstType.Items.Add(new ListItem("Tab panel", PropertyGroupType.TabPanel.ToString()));
            lstType.Items.Add(new ListItem("Tab container", PropertyGroupType.TabStrip.ToString()));
            lstType.Width = Unit.Percentage(100);
            lstType.SelectedValue = currentDef.GroupType.ToString();
            pp = new PropertyPanel(lstType, PropertyLayout.TwoColumns, "Type", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(lstType);
            general.Controls.Add(pp);

            // Height
            txtHeight = new TextBox();
            txtHeight.Text = currentDef.Height.IsEmpty ? "" : currentDef.Height.ToString();
            pp = new PropertyPanel(txtHeight, PropertyLayout.TwoColumns, "Height", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(txtHeight);
            general.Controls.Add(pp);

            // Width
            txtWidth = new TextBox();
            txtWidth.Text = currentDef.Width.IsEmpty ? "" : currentDef.Width.ToString();
            pp = new PropertyPanel(txtWidth, PropertyLayout.TwoColumns, "Width", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(txtWidth);
            general.Controls.Add(pp);

            // Border
            chkBorder = new CheckBox();
            chkBorder.Checked = currentDef.Settings.Border;
            pp = new PropertyPanel(chkBorder, PropertyLayout.TwoColumns, "Border", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(chkBorder);
            general.Controls.Add(pp);

            // Show title
            chkShowTitle = new CheckBox();
            chkShowTitle.Checked = currentDef.Settings.ShowTitle;
            pp = new PropertyPanel(chkShowTitle, PropertyLayout.TwoColumns, "Show title", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(chkShowTitle);
            general.Controls.Add(pp);

            // Inline
            chkInline = new CheckBox();
            chkInline.Checked = currentDef.Settings.Inline;
            pp = new PropertyPanel(chkInline, PropertyLayout.TwoColumns, "Inline", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(chkInline);
            general.Controls.Add(pp);

            // Access group ID
            chkAccessGroupId = new TextBox();
            chkAccessGroupId.Text = currentDef.Settings.AccessGroupId.ToString();
            pp = new PropertyPanel(chkAccessGroupId, PropertyLayout.TwoColumns, "Access group id", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(chkAccessGroupId);
            general.Controls.Add(pp);

            TabView tNames = tab.CreateAndAddView("Names", "Names");
            // Language versions
            langVersions = new LanguageVersions();
            langVersions.SetData(currentDef.NameByLCID, currentDef.DescriptionByLCID);
            PropertyPanel ppLangVersion = new PropertyPanel(langVersions, PropertyLayout.NoTitle, "Friendly names and descriptions:", null);
            langVersions.Enabled = writeAccess;
            ppLangVersion.Layout = PropertyLayout.NoTitle;
            tNames.Controls.Add(ppLangVersion);

            base.CreateChildControls();

        }
    }
        private Pane AddLanguagePane(int?languageId)
        {
            string strLanguageId = languageId != null?languageId.Value.ToString() : string.Empty;

            Pane pane = new Pane();

            PropertyPanel ppnlSubject = new PropertyPanel();

            ppnlSubject.Text = CommonTerms.Subject;
            pane.Controls.Add(ppnlSubject);

            TextBox txtSubject = new TextBox();

            txtSubject.ID       = "TxtSubject" + strLanguageId;
            txtSubject.CssClass = "guiInputText guiInputStandardSize";
            ppnlSubject.Controls.Add(txtSubject);

            PropertyPanel ppnlSenderName = new PropertyPanel();

            ppnlSenderName.Text = CommonTerms.SenderName;
            pane.Controls.Add(ppnlSenderName);

            TextBox txtSenderName = new TextBox();

            txtSenderName.ID       = "TxtSenderName" + strLanguageId;
            txtSenderName.CssClass = "guiInputText guiInputStandardSize";
            ppnlSenderName.Controls.Add(txtSenderName);

            PropertyPanel ppnlSenderAddress = new PropertyPanel();

            ppnlSenderAddress.Text = CommonTerms.SenderAddress;
            pane.Controls.Add(ppnlSenderAddress);

            TextBox txtSenderAddress = new TextBox();

            txtSenderAddress.ID       = "TxtSenderAddress" + strLanguageId;
            txtSenderAddress.CssClass = "guiInputText guiInputStandardSize";
            ppnlSenderAddress.Controls.Add(txtSenderAddress);

            CustomValidator cusValSenderAddress = new CustomValidator();

            cusValSenderAddress.ID = "CusValSenderAddress" + strLanguageId;
            cusValSenderAddress.ControlToValidate = txtSenderAddress.ID;
            cusValSenderAddress.ServerValidate   += Email_ServerValidate;
            cusValSenderAddress.ErrorMessage      = "*";
            ppnlSenderAddress.Controls.Add(cusValSenderAddress);

            PropertyPanel ppnlToAddresses = new PropertyPanel();

            ppnlToAddresses.Text = CommonTerms.ToAddresses + "<br /><small>" + CommonTerms.SeparateBySemicolon + "</small>";
            pane.Controls.Add(ppnlToAddresses);

            TextBox txtToAddresses = new TextBox();

            txtToAddresses.ID       = "TxtToAddresses" + strLanguageId;
            txtToAddresses.CssClass = "guiInputText guiInputStandardSize";
            ppnlToAddresses.Controls.Add(txtToAddresses);

            CustomValidator cusValToAddresses = new CustomValidator();

            cusValToAddresses.ID = "CusValToAddresses" + strLanguageId;
            cusValToAddresses.ControlToValidate = txtToAddresses.ID;
            cusValToAddresses.ServerValidate   += Email_ServerValidate;
            cusValToAddresses.ErrorMessage      = "*";
            ppnlToAddresses.Controls.Add(cusValToAddresses);

            PropertyPanel ppnlCCAddresses = new PropertyPanel();

            ppnlCCAddresses.Text = CommonTerms.CCAddresses + "<br /><small>" + CommonTerms.SeparateBySemicolon + "</small>";
            pane.Controls.Add(ppnlCCAddresses);

            TextBox txtCCAddresses = new TextBox();

            txtCCAddresses.ID       = "TxtCCAddresses" + strLanguageId;
            txtCCAddresses.CssClass = "guiInputText guiInputStandardSize";
            ppnlCCAddresses.Controls.Add(txtCCAddresses);

            CustomValidator cusValCCAddresses = new CustomValidator();

            cusValCCAddresses.ID = "CusValCCAddresses" + strLanguageId;
            cusValCCAddresses.ControlToValidate = txtCCAddresses.ID;
            cusValCCAddresses.ServerValidate   += Email_ServerValidate;
            cusValCCAddresses.ErrorMessage      = "*";
            ppnlCCAddresses.Controls.Add(cusValCCAddresses);

            PropertyPanel ppnlBCCAddresses = new PropertyPanel();

            ppnlBCCAddresses.Text = CommonTerms.BCCAddresses + "<br /><small>" + CommonTerms.SeparateBySemicolon + "</small>";
            pane.Controls.Add(ppnlBCCAddresses);

            TextBox txtBCCAddresses = new TextBox();

            txtBCCAddresses.ID       = "TxtBCCAddresses" + strLanguageId;
            txtBCCAddresses.CssClass = "guiInputText guiInputStandardSize";
            ppnlBCCAddresses.Controls.Add(txtBCCAddresses);

            CustomValidator cusValBCCAddresses = new CustomValidator();

            cusValBCCAddresses.ID = "CusValBCCAddresses" + strLanguageId;
            cusValBCCAddresses.ControlToValidate = txtBCCAddresses.ID;
            cusValBCCAddresses.ServerValidate   += Email_ServerValidate;
            cusValBCCAddresses.ErrorMessage      = "*";
            ppnlBCCAddresses.Controls.Add(cusValBCCAddresses);

            PropertyPanel ppnlTemplate = new PropertyPanel();

            ppnlTemplate.Text = CommonTerms.TemplateFile;
            pane.Controls.Add(ppnlTemplate);

            TemplateFileSelector templateFileSelectorControl = new TemplateFileSelector();

            templateFileSelectorControl.ID = "TemplateFileSelectorControl" + strLanguageId;
            templateFileSelectorControl.InsertEmptyItem = true;
            ppnlTemplate.Controls.Add(templateFileSelectorControl);

            return(pane);
        }
Example #31
0
    protected override void CreateChildControls()
    {
        Controls.Clear();
        PropertyPanel pp;
        if (currentDef != null) {
            // Buttons
            WAFPanel pnlButtons = new WAFPanel();
            pnlButtons.Height = Unit.Pixel(25);
            pnlButtons.Border = false;
            Controls.Add(pnlButtons);

            MainButton btnSave = new MainButton();
            btnSave.Text = "Save";
            btnSave.Click += new EventHandler(btnSave_Click);
            pnlButtons.Controls.Add(btnSave);

            MainButton btnChange = new MainButton();
            btnChange.Text = "Change LCID...";
            pnlButtons.Controls.Add(btnChange);
            btnChange.WorkflowMethodCompleted += new EventHandler<WorkflowMethodArgs>(btnChange_WorkflowMethodCompleted);
            btnChange.SetWorkflowMethod<changeLCID>(this.LCID, null, true, false, true, null);

            MainButton btnChangeFlag = new MainButton();
            btnChangeFlag.Text = "Change icon...";
            pnlButtons.Controls.Add(btnChangeFlag);
            btnChangeFlag.SetWorkflowMethod<changeIcon>(new object[] { this.LCID, WAFContext.PathFromRootToFolderSkins + "Default\\Flags\\" });

            MainButton btnDelete = new MainButton();
            btnDelete.Text = "Delete...";
            btnDelete.Click += new EventHandler(btnDelete_Click);
            btnDelete.Confirm = true;
            btnDelete.ConfirmQuestion = "Permanently delete all \"" + currentDef.Name + "\" content?";
            pnlButtons.Controls.Add(btnDelete);

            // Name
            txtName = new TextBox();
            txtName.Width = Unit.Percentage(100);
            txtName.Font.Size = new FontUnit(14, UnitType.Pixel);
            txtName.Text = currentDef.Name;

            StringBuilder htmlIcon = new StringBuilder();
            htmlIcon.Append("<img style=\"float:left; margin:5px 2px; 0px 0px;\" src=\"");
            htmlIcon.Append(WAFContext.GetUrlFromHostToCultureFlag(LCID));
            htmlIcon.Append("\" height=\"11\" width=\"16\" />");
            PropertyPanel ppCodeName = new PropertyPanel(txtName, PropertyLayout.TwoColumns, htmlIcon.ToString(), null);
            ppCodeName.TitleWidth = Unit.Pixel(50);
            ppCodeName.Height = Unit.Pixel(45);
            ppCodeName.ShowAdvancedFunctions = false;
            Controls.Add(ppCodeName);
            ppCodeName.Border = true;
            ppCodeName.MarginTop = true;

            TabbedView tab = new TabbedView();
            this.Controls.Add(tab);
            tab.PostOnViewChange = false;
            tab.MarginTop = true;
            tab.Height = Unit.Percentage(100);
            tab.Width = Unit.Percentage(100);
            TabView general = tab.CreateAndAddView("General", "General");
            general.Height = Unit.Percentage(100);
            general.Width = Unit.Percentage(100);

            // LCID
            txtLCID = new TextBox();
            txtLCID.Enabled = false;
            txtLCID.Width = Unit.Pixel(100);
            txtLCID.Text = currentDef.LCID.ToString();
            txtLCID.EnableViewState = false;
            pp = new PropertyPanel(txtLCID, PropertyLayout.TwoColumns, "LCID", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(txtLCID);
            general.Controls.Add(pp);

            CultureInfo ci = null;
            try { ci = CultureInfo.GetCultureInfo(currentDef.LCID); } catch { }

            // LCID Name
            TextBox txtLCIDName = new TextBox();
            txtLCIDName.Enabled = false;
            txtLCIDName.Width = Unit.Pixel(200);
            txtLCIDName.Text = ci == null ? "(Unknown)" : ci.Name;
            txtLCIDName.EnableViewState = false;
            pp = new PropertyPanel(txtLCIDName, PropertyLayout.TwoColumns, "LCID Name", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(txtLCIDName);
            general.Controls.Add(pp);

            // LCID Native name
            TextBox txtLCIDNativeName = new TextBox();
            txtLCIDNativeName.Enabled = false;
            txtLCIDNativeName.Width = Unit.Pixel(200);
            txtLCIDNativeName.Text = ci == null ? "(Unknown)" : ci.NativeName;
            txtLCIDNativeName.EnableViewState = false;
            pp = new PropertyPanel(txtLCIDNativeName, PropertyLayout.TwoColumns, "LCID Native Name", null);
            pp.ShowAdvancedFunctions = false;
            pp.Controls.Add(txtLCIDNativeName);
            general.Controls.Add(pp);

            //// Access group ID
            //chkAccessGroupId = new TextBox();
            //chkAccessGroupId.Text = currentDef.Settings.AccessGroupId.ToString();
            //pp = new PropertyPanel(chkAccessGroupId, PropertyLayout.TwoColumns, "Access group id", null);
            //pp.ShowAdvancedFunctions = false;
            //pp.Controls.Add(chkAccessGroupId);
            //general.Controls.Add(pp);

            TabView tNames = tab.CreateAndAddView("Names", "Names");
            //// Language versions
            //langVersions = new LanguageVersions();
            //langVersions.SetData(currentDef.NameByLCID, currentDef.DescriptionByLCID);
            //PropertyPanel ppLangVersion = new PropertyPanel(langVersions, PropertyLayout.NoTitle, "Friendly names and descriptions:", null);
            //langVersions.Enabled = writeAccess;
            //ppLangVersion.Layout = PropertyLayout.NoTitle;
            //tNames.Controls.Add(ppLangVersion);

            base.CreateChildControls();

        }
    }
 public override void Start()
 {
     _Panel = PropertyPanel.CreatePanel <RevolvePropertyPanel>(Entity);
     InteractiveContext.Current.PropertyPanelManager?.AddPanel(_Panel, PropertyPanelSortingKey.Shapes);
 }
Example #33
0
    protected override void CreateChildControls()
    {
        Controls.Clear();
        if (currentDef != null) {

            // Buttons
            WAFPanel pnlButtons = new WAFPanel();
            pnlButtons.Height = Unit.Pixel(25);
            pnlButtons.Border = false;
            if (writeAccess || currentDef.IsChangeDef) {
                MainButton btnSave = new MainButton();
                btnSave.Text = "Save";
                btnSave.Click += new EventHandler(btnSave_Click);
                pnlButtons.Controls.Add(btnSave);

                MainButton btnEditAsTextFile = new MainButton();
                btnEditAsTextFile.Text = "Edit values as text table...";
                btnEditAsTextFile.Click += new EventHandler(btnEditAsTextFile_Click);
                pnlButtons.Controls.Add(btnEditAsTextFile);

                if (DefinitionType == DefinitionType.Local) {
                    MainButton btnDelete = new MainButton();
                    btnDelete.Confirm = true;
                    if (currentDef.IsChangeDef) {
                        btnDelete.Text = "Delete enumeration changes...";
                        btnDelete.ConfirmQuestion = "Delete changes to native enumeration \"" + bestDef.CodeName + "\"?";
                    } else {
                        btnDelete.ConfirmQuestion = "Delete enumeration \"" + currentDef.CodeName + "\"?";
                        btnDelete.Text = "Delete enumeration...";
                    }
                    btnDelete.Click += new EventHandler(btnDelete_Click);
                    pnlButtons.Controls.Add(btnDelete);
                }
            }
            if (DefinitionType == DefinitionType.Native) {
                //MainButton btnNewChangeEnumeration = new MainButton();
                //btnNewChangeEnumeration.Text = "Change";
                //btnNewChangeEnumeration.Click += new EventHandler(btnNewChangeEnumeration_Click);
                //pnlButtons.Controls.Add(btnNewChangeEnumeration);
            }
            Controls.Add(pnlButtons);

            // Code name
            txtCodeName = new TextBox();
            txtCodeName.Width = Unit.Percentage(100);
            txtCodeName.Font.Size = new FontUnit(14, UnitType.Pixel);
            txtCodeName.Text = bestDef.CodeName;
            txtCodeName.Enabled = !currentDef.IsChangeDef && writeAccess;

            StringBuilder htmlIcon = new StringBuilder();
            htmlIcon.Append("<img style=\"float:left; margin:5px 2px; 0px 0px;\" src=\"");
            htmlIcon.Append(IconUrl);
            htmlIcon.Append("\" height=\"16\" width=\"16\" />");
            PropertyPanel ppCodeName = new PropertyPanel(txtCodeName, PropertyLayout.TwoColumns, htmlIcon.ToString(), null);
            ppCodeName.TitleWidth = Unit.Pixel(50);
            ppCodeName.Height = Unit.Pixel(45);
            ppCodeName.ShowAdvancedFunctions = false;
            Controls.Add(ppCodeName);
            ppCodeName.Border = true;
            ppCodeName.MarginTop = true;

            TabbedView tab = new TabbedView();
            this.Controls.Add(tab);
            tab.PostOnViewChange = false;
            tab.MarginTop = true;
            tab.Height = Unit.Percentage(100);
            tab.Width = Unit.Percentage(100);
            TabView general = tab.CreateAndAddView("General", "General");

            // Namespace
            txtNameSpace = new TextBox();
            txtNameSpace.Width = Unit.Percentage(100);
            txtNameSpace.Enabled = !currentDef.IsChangeDef && writeAccess;
            txtNameSpace.Text = bestDef.Namespace;
            PropertyPanel ppNameSpace = new PropertyPanel(txtNameSpace, PropertyLayout.TwoColumns, "Namespace", null);
            ppNameSpace.ShowAdvancedFunctions = false;
            general.Controls.Add(ppNameSpace);

            TabView tNames = tab.CreateAndAddView("Names", "Names");
            // Language versions
            langVersions = new LanguageVersions();
            langVersions.SetData(currentDef.NameByLCID, currentDef.DescriptionByLCID);
            PropertyPanel ppLangVersion = new PropertyPanel(langVersions, PropertyLayout.NoTitle, "Friendly names and descriptions:", null);
            langVersions.Enabled = writeAccess;
            ppLangVersion.Layout = PropertyLayout.NoTitle;
            tNames.Controls.Add(ppLangVersion);

            TabView tValues = tab.CreateAndAddView("Values", "Values");
            WAFPanel p = new WAFPanel();
            p.Width = Unit.Percentage(100);
            p.Height = Unit.Percentage(100);
            p.Border = false;
            p.ScrollBars = ScrollBars.Auto;
            enumControls = new List<EnumerationValueControl>();
            foreach (var v in bestDef.Values.Values) {
                var c = new EnumerationValueControl();
                c.SetData(v.Value, v.CodeName, v.NameByLCID, v.DescriptionByLCID, writeAccess);
                enumControls.Add(c);
                p.Controls.Add(c);
            }
            tValues.Controls.Add(p);

            _btnAddValue = new LightButton();
            _btnAddValue.Text = "Add enumeration value";
            _btnAddValue.Enabled = writeAccess;
            if (writeAccess) _btnAddValue.Click += new EventHandler(btnAddValue_Click);
            p.Controls.Add(_btnAddValue);

            base.CreateChildControls();

        }
    }