Ejemplo n.º 1
0
 public EquityUserControl(TabbedView parentView)
 {
     InitializeComponent();
     providerClientConfig = new B3Provider.B3ProviderConfig();
     providerClient       = new B3Provider.B3ProviderClient(providerClientConfig);
     ParentView           = parentView;
 }
Ejemplo n.º 2
0
        void OnDocumentClosing(object sender, DocumentCancelEventArgs e)
        {
            BaseDocument doc  = e.Document;
            IdentKey     key  = doc.Tag as IdentKey;
            IView        view = null;

            if (key == null || !_views.TryGetValue(key, out view))
            {
                return;
            }

            if (!view.CanClose || !view.OnClosing(null))
            {
                e.Cancel = true;
            }
            else if (_documentManager.View.FloatDocuments.IndexOf(doc) == -1)
            {
                TabbedView tabbedView = _documentManager.View as TabbedView;
                //tabbedView.ReleaseDeferredLoadControl(e.Document);
                e.Cancel = true;
                doc.Form.Hide();
                doc.Form.MdiParent = null;
                tabbedView.Controller.RemoveDocument(doc);
                view.OnAfterClose();
                _views.Remove(key);
            }

            _logger.Debug("OnDocumentClosing event. " + view.ToString());
        }
Ejemplo n.º 3
0
 protected override void OnStart()
 {
     MessagingCenter.Subscribe <UsuarioModel>(this, "SucessoLogin", (usuario) =>
     {
         MainPage = new TabbedView();
     });
 }
Ejemplo n.º 4
0
        public App()
        {
#if DEBUG
            LiveReload.Init();
#endif
            InitializeComponent();

            MainPage = new TabbedView();
        }
Ejemplo n.º 5
0
 public MdiWorkspace(TabbedView tabbedView, Form ownerForm)
 {
     this._OwnerForm  = ownerForm;
     this._tabbedView = tabbedView;
     this._tabbedView.DocumentDeactivated += _tabbedView_DocumentDeactivated;
     this._tabbedView.DocumentActivated   += _tabbedView_DocumentActivated;
     this._tabbedView.DocumentClosing     += _tabbedView_DocumentClosing;
     this._tabbedView.DocumentAdded       += _tabbedView_DocumentAdded;
     this._tabbedView.DocumentClosed      += _tabbedView_DocumentClosed;
 }
Ejemplo n.º 6
0
        protected BaseDocument CreateDocument(Control control)
        {
            TabbedView   tabbedView = _documentManager.View as TabbedView;
            BaseDocument doc        = tabbedView.Controller.AddDocument(control);

            //tabbedView.AddDocument(control);
            //BaseDocument doc = tabbedView.Documents[tabbedView.Documents.Count-1];
            control.Dock = DockStyle.Fill;
            if (tabbedView.DocumentGroups.Count > 0)
            {
                tabbedView.Controller.Dock(doc as Document, tabbedView.DocumentGroups[0]);
            }
            tabbedView.ActivateDocument(doc.Control);
            return(doc);
        }
        public MainViewContainer(ControlStack controlStack, ClimateStack climateStack)
            : base(ViewContainers.Main.ToString(), null)
        {
            Children = new List <IStack>()
            {
                controlStack, climateStack
            };
            var tabbedPage = new Xamarin.Forms.TabbedPage();
            var tabbed     = new TabbedView(tabbedPage);

            NativeView = tabbed.View;

            foreach (var child in Children)
            {
                tabbed.Children.Add(child.Proxy.NativeView);
            }
        }
Ejemplo n.º 8
0
        public InspectorView(GraphView graphView) : base(graphView)
        {
            m_GraphInspectorView     = m_MainContainer.Q <TabbedView>("GraphInspectorView");
            m_GraphSettingsContainer = m_GraphInspectorView.Q <VisualElement>("GraphSettingsContainer");
            m_NodeSettingsContainer  = m_GraphInspectorView.Q <VisualElement>("NodeSettingsContainer");
            m_ContentContainer.Add(m_GraphInspectorView);

            var unregisteredPropertyDrawerTypes = TypeCache.GetTypesDerivedFrom <IPropertyDrawer>().ToList();

            foreach (var type in unregisteredPropertyDrawerTypes)
            {
                RegisterPropertyDrawer(type);
            }

            // By default at startup, show graph settings
            m_GraphInspectorView.Activate(m_GraphInspectorView.Q <TabButton>("GraphSettingsButton"));
        }
Ejemplo n.º 9
0
 void tabbedView_DocumentClosing(object sender, DocumentCancelEventArgs e)
 {
     TabbedView tabbedView = sender as TabbedView;
     AllowSwitchMessage allow = new AllowSwitchMessage(true, false);
     if (tabbedView != null)
     {                
         DBFormItemBase item = FindItemByDocument(tabbedView.ActiveDocument);
         if (item != null)
         {
             if (item.View is DBViewInterface)
             {
                 DBViewInterface view = item.View as DBViewInterface;
                 allow = view.DBInterface.GetAllowSwitch();
             }
         }
         if (allow.IsAllow)
             tabbedView.ActiveDocument.Form.Visible = false;
     }
     e.Cancel = true;
 }
Ejemplo n.º 10
0
        public InspectorView(InspectorViewModel viewModel) : base(viewModel)
        {
            m_GraphInspectorView     = m_MainContainer.Q <TabbedView>("GraphInspectorView");
            m_GraphSettingsContainer = m_GraphInspectorView.Q <VisualElement>("GraphSettingsContainer");
            m_NodeSettingsContainer  = m_GraphInspectorView.Q <VisualElement>("NodeSettingsContainer");
            m_MaxItemsMessageLabel   = m_GraphInspectorView.Q <Label>("maxItemsMessageLabel");
            m_ContentContainer.Add(m_GraphInspectorView);

            isWindowScrollable = true;
            isWindowResizable  = true;

            var unregisteredPropertyDrawerTypes = TypeCache.GetTypesDerivedFrom <IPropertyDrawer>().ToList();

            foreach (var type in unregisteredPropertyDrawerTypes)
            {
                RegisterPropertyDrawer(type);
            }

            // By default at startup, show graph settings
            m_GraphInspectorView.Activate(m_GraphInspectorView.Q <TabButton>("GraphSettingsButton"));
        }
Ejemplo n.º 11
0
        public void OpenView(IView view)
        {
            Waiting(() =>
            {
                if (view is IDockView)
                {
                    var dockPanel   = this.DockManager.AddPanel(DockingStyle.Right);
                    dockPanel.ID    = new Guid(view.ID);
                    dockPanel.Text  = view.Caption;
                    dockPanel.Image = view.Icon;
                    dockPanel.Options.ShowCloseButton           = false;
                    dockPanel.Options.AllowDockAsTabbedDocument = false;
                    dockPanel.ClosingPanel += (sender, e) =>
                    {
                        if (DialogResult != DialogResult.OK)
                        {
                            e.Cancel = true;
                        }
                    };
                    var control = view as Control;
                    dockPanel.Controls[0].Controls.Add(control);
                    control.Dock = DockStyle.Fill;

                    var dockView = view as IDockView;
                    if (!DockViews.Contains(dockView))
                    {
                        DockViews.Add(dockView);
                    }
                }
                else
                {
                    var docControl    = view as Control;
                    var tabbedDoc     = TabbedView.AddDocument(docControl);
                    tabbedDoc.Caption = view.Caption;
                    tabbedDoc.Image   = view.Icon;
                }
            }, "正在打开文档");
        }
Ejemplo n.º 12
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();

        }
    }
Ejemplo n.º 13
0
 public ExampleHelper(TabbedView _TabbedView)
 {
     tabbedView = _TabbedView;
 }
Ejemplo n.º 14
0
 public void Init(DocumentManager documentManager, TabbedView tabbedView, DockManager dockManager)
 {
     this._documentManager = documentManager;
     this._tabbedView      = tabbedView;
     this._dockManager     = dockManager;
 }
Ejemplo n.º 15
0
 public App()
 {
     InitializeComponent();
     NavigationPage.SetHasNavigationBar(this, true);
     MainPage = new TabbedView();
 }
Ejemplo n.º 16
0
        public static void CreateViews(IContainer components, DockManager dockManager, TabbedView tabbedView)
        {
            if (views != null && views.Count > 0)
            {
                DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup documentGroup = new DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup(components);
                tabbedView.DocumentGroups.AddRange(new DevExpress.XtraBars.Docking2010.Views.Tabbed.DocumentGroup[] { documentGroup });

                for (int i = 0; i < views.Count; i++)
                {
                    XtraUserControl uc = (XtraUserControl)views[i];

                    DockPanel dockPanel = new DevExpress.XtraBars.Docking.DockPanel();
                    DevExpress.XtraBars.Docking2010.Views.Tabbed.Document dockPanel_Document = new DevExpress.XtraBars.Docking2010.Views.Tabbed.Document(components);
                    ControlContainer dockPanel_Container = new ControlContainer();

                    dockManager.RootPanels.AddRange(new DevExpress.XtraBars.Docking.DockPanel[] { dockPanel });
                    tabbedView.Documents.Add(dockPanel_Document);
                    documentGroup.Items.Add(dockPanel_Document);

                    dockPanel.Controls.Add(dockPanel_Container);
                    dockPanel.DockedAsTabbedDocument            = true;
                    dockPanel.Options.AllowDockAsTabbedDocument = true;
                    dockPanel.Options.AllowDockLeft             = false;
                    dockPanel.Options.AllowDockRight            = false;
                    dockPanel.Options.AllowDockTop    = false;
                    dockPanel.Options.AllowDockBottom = false;
                    dockPanel.Options.AllowDockFill   = false;
                    dockPanel.ID = System.Guid.NewGuid();
                    string strName = DateTime.Now.Ticks.ToString();
                    dockPanel.Name             = "dockPanel" + strName;
                    dockPanel.OriginalSize     = new System.Drawing.Size(300, 300);
                    dockPanel.Text             = views[i].Title;
                    dockPanel.SavedIndex       = i;
                    dockPanel.SavedMdiDocument = true;
                    dockPanel.FloatLocation    = new System.Drawing.Point(0, 0);
                    if (views[i].ShowCloseButton)
                    {
                        dockPanel.Options.ShowCloseButton = true;
                    }
                    else
                    {
                        dockPanel.Options.ShowCloseButton = false;
                    }
                    dockPanel_Container.Controls.Add(uc);
                    dockPanel_Container.Location = new System.Drawing.Point(0, 0);
                    dockPanel_Container.Name     = "dockPanel_Container" + strName;
                    dockPanel_Container.Size     = new System.Drawing.Size(300, 300);
                    dockPanel_Container.TabIndex = 0;

                    uc.Dock     = System.Windows.Forms.DockStyle.Fill;
                    uc.Location = new System.Drawing.Point(0, 0);
                    uc.Name     = "uc" + strName;
                    uc.Size     = new System.Drawing.Size(300, 300);
                    uc.TabIndex = 0;

                    dockPanel_Document.Caption       = views[i].Title;
                    dockPanel_Document.ControlName   = dockPanel.Name;
                    dockPanel_Document.FloatLocation = new System.Drawing.Point(0, 0);
                    dockPanel_Document.FloatSize     = new System.Drawing.Size(300, 300);
                    if (views[i].ShowCloseButton)
                    {
                        dockPanel_Document.Properties.AllowClose = DevExpress.Utils.DefaultBoolean.True;
                    }
                    else
                    {
                        dockPanel_Document.Properties.AllowClose = DevExpress.Utils.DefaultBoolean.False;
                    }

                    if (views[i].IsActive)
                    {
                        InitActivateViewText = views[i].Title;
                    }
                    ContentCollection.Add(views[i]);
                }
            }
        }
Ejemplo n.º 17
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();

        }
    }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CommonParentForm));
     this.rbnMain = new DevExpress.XtraBars.Ribbon.RibbonControl();
     this.appMenu = new DevExpress.XtraBars.Ribbon.ApplicationMenu(this.components);
     this.bbiSettings = new DevExpress.XtraBars.BarButtonItem();
     this.bbiExitUser = new DevExpress.XtraBars.BarButtonItem();
     this.siVersion = new DevExpress.XtraBars.BarStaticItem();
     this.alignButtonGroup = new DevExpress.XtraBars.BarButtonGroup();
     this.bbiAdd = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRemove = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRefresh = new DevExpress.XtraBars.BarButtonItem();
     this.bbiExel = new DevExpress.XtraBars.BarButtonItem();
     this.bbiAdmin = new DevExpress.XtraBars.BarButtonItem();
     this.bbiSave = new DevExpress.XtraBars.BarButtonItem();
     this.bbiRoleEdit = new DevExpress.XtraBars.BarButtonItem();
     this.brDockMenuItem = new DevExpress.XtraBars.BarDockingMenuItem();
     this.brEdItControlsStates = new DevExpress.XtraBars.BarEditItem();
     this.ripceControlsStates = new DevExpress.XtraEditors.Repository.RepositoryItemPopupContainerEdit();
     this.rpMain = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgMain = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.rpDictionaries = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgCommonDictionaries = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.rpReports = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpSettings = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpAdmin = new DevExpress.XtraBars.Ribbon.RibbonPage();
     this.rpgAdmin = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
     this.riceStates = new DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit();
     this.rsbMain = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
     this.defaultLookAndFeel = new DevExpress.LookAndFeel.DefaultLookAndFeel(this.components);
     this.dxErrorProvider = new DevExpress.XtraEditors.DXErrorProvider.DXErrorProvider(this.components);
     this.documentMng = new DevExpress.XtraBars.Docking2010.DocumentManager(this.components);
     this.MDIViewNative = new DevExpress.XtraBars.Docking2010.Views.NativeMdi.NativeMdiView(this.components);
     this.MDIViewTabbed = new DevExpress.XtraBars.Docking2010.Views.Tabbed.TabbedView(this.components);
     this.bbiChangeUser = new DevExpress.XtraBars.BarButtonItem();
     ((System.ComponentModel.ISupportInitialize)(this.rbnMain)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.appMenu)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.ripceControlsStates)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.riceStates)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.documentMng)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewNative)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewTabbed)).BeginInit();
     this.SuspendLayout();
     //
     // rbnMain
     //
     this.rbnMain.ApplicationButtonDropDownControl = this.appMenu;
     this.rbnMain.ApplicationButtonText = "Меню";
     this.rbnMain.AutoSizeItems = true;
     this.rbnMain.Categories.AddRange(new DevExpress.XtraBars.BarManagerCategory[] {
     new DevExpress.XtraBars.BarManagerCategory("Dictionaries", new System.Guid("bfb17616-73d9-42e6-8028-a10ce19e5160"))});
     this.rbnMain.ExpandCollapseItem.Id = 0;
     this.rbnMain.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
     this.rbnMain.ExpandCollapseItem,
     this.siVersion,
     this.alignButtonGroup,
     this.bbiAdd,
     this.bbiRemove,
     this.bbiRefresh,
     this.bbiExel,
     this.bbiAdmin,
     this.bbiSave,
     this.bbiRoleEdit,
     this.brDockMenuItem,
     this.bbiSettings,
     this.brEdItControlsStates,
     this.bbiExitUser,
     this.bbiChangeUser});
     this.rbnMain.Location = new System.Drawing.Point(0, 0);
     this.rbnMain.MaxItemId = 162;
     this.rbnMain.Name = "rbnMain";
     this.rbnMain.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
     this.rpMain,
     this.rpDictionaries,
     this.rpReports,
     this.rpSettings,
     this.rpAdmin});
     this.rbnMain.RepositoryItems.AddRange(new DevExpress.XtraEditors.Repository.RepositoryItem[] {
     this.ripceControlsStates,
     this.riceStates});
     this.rbnMain.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonControlStyle.Office2013;
     this.rbnMain.ShowToolbarCustomizeItem = false;
     this.rbnMain.Size = new System.Drawing.Size(1210, 173);
     this.rbnMain.StatusBar = this.rsbMain;
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiAdd);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiRemove);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiRefresh);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiSave);
     this.rbnMain.Toolbar.ItemLinks.Add(this.bbiExel);
     this.rbnMain.Toolbar.ItemLinks.Add(this.brDockMenuItem);
     this.rbnMain.Toolbar.ShowCustomizeItem = false;
     this.rbnMain.ToolbarLocation = DevExpress.XtraBars.Ribbon.RibbonQuickAccessToolbarLocation.Below;
     this.rbnMain.ShowCustomizationMenu += new DevExpress.XtraBars.Ribbon.RibbonCustomizationMenuEventHandler(this.RibbonShowCustomizationMenu);
     this.rbnMain.Merge += new DevExpress.XtraBars.Ribbon.RibbonMergeEventHandler(this.MainMerge);
     //
     // appMenu
     //
     this.appMenu.ItemLinks.Add(this.bbiSettings, true);
     this.appMenu.ItemLinks.Add(this.bbiChangeUser);
     this.appMenu.ItemLinks.Add(this.bbiExitUser);
     this.appMenu.Name = "appMenu";
     this.appMenu.Ribbon = this.rbnMain;
     //
     // bbiSettings
     //
     this.bbiSettings.Caption = "Настройки";
     this.bbiSettings.Description = "Настройки программы";
     this.bbiSettings.Hint = "Настройки программы";
     this.bbiSettings.Id = 76;
     this.bbiSettings.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiSettings.LargeGlyph")));
     this.bbiSettings.Name = "bbiSettings";
     //
     // bbiExitUser
     //
     this.bbiExitUser.Caption = "Выход";
     this.bbiExitUser.CategoryGuid = new System.Guid("6ffddb2b-9015-4d97-a4c1-91613e0ef537");
     this.bbiExitUser.Id = 160;
     this.bbiExitUser.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiExitUser.LargeGlyph")));
     this.bbiExitUser.Name = "bbiExitUser";
     //
     // siVersion
     //
     this.siVersion.Caption = "Версия:";
     this.siVersion.Id = 31;
     this.siVersion.Name = "siVersion";
     this.siVersion.TextAlignment = System.Drawing.StringAlignment.Near;
     //
     // alignButtonGroup
     //
     this.alignButtonGroup.Caption = "Align Commands";
     this.alignButtonGroup.Id = 52;
     this.alignButtonGroup.Name = "alignButtonGroup";
     //
     // bbiAdd
     //
     this.bbiAdd.Caption = "Добавить данные";
     this.bbiAdd.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiAdd.Glyph")));
     this.bbiAdd.Hint = "Добавить новую запись в текущий элемент интерфейса";
     this.bbiAdd.Id = 62;
     this.bbiAdd.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N));
     this.bbiAdd.Name = "bbiAdd";
     this.bbiAdd.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.AddItemClick);
     //
     // bbiRemove
     //
     this.bbiRemove.Caption = "Удалить данные";
     this.bbiRemove.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRemove.Glyph")));
     this.bbiRemove.Hint = "Удалить текущие данные";
     this.bbiRemove.Id = 63;
     this.bbiRemove.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Delete));
     this.bbiRemove.Name = "bbiRemove";
     this.bbiRemove.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RemoveItemClick);
     //
     // bbiRefresh
     //
     this.bbiRefresh.Caption = "Обновить данные";
     this.bbiRefresh.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRefresh.Glyph")));
     this.bbiRefresh.Hint = "Обновить записи из базы данных";
     this.bbiRefresh.Id = 65;
     this.bbiRefresh.ItemShortcut = new DevExpress.XtraBars.BarShortcut(System.Windows.Forms.Keys.F5);
     this.bbiRefresh.Name = "bbiRefresh";
     this.bbiRefresh.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RefreshItemClick);
     //
     // bbiExel
     //
     this.bbiExel.Caption = "Сохранить в Exel";
     this.bbiExel.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiExel.Glyph")));
     this.bbiExel.Hint = "Сохранить данные в виде Excel";
     this.bbiExel.Id = 66;
     this.bbiExel.Name = "bbiExel";
     this.bbiExel.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.ExelItemClick);
     //
     // bbiAdmin
     //
     this.bbiAdmin.Caption = "Настройка интерфейсов";
     this.bbiAdmin.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiAdmin.Glyph")));
     this.bbiAdmin.Hint = "Администрирование внешнего вида форм";
     this.bbiAdmin.Id = 69;
     this.bbiAdmin.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiAdmin.LargeGlyph")));
     this.bbiAdmin.Name = "bbiAdmin";
     this.bbiAdmin.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.AdminItemClick);
     //
     // bbiSave
     //
     this.bbiSave.Caption = "Сохранить в базу";
     this.bbiSave.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiSave.Glyph")));
     this.bbiSave.Hint = "Сохранить изменения текущего элемента на сервер";
     this.bbiSave.Id = 70;
     this.bbiSave.ItemShortcut = new DevExpress.XtraBars.BarShortcut((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S));
     this.bbiSave.Name = "bbiSave";
     this.bbiSave.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.CommitItemClick);
     //
     // bbiRoleEdit
     //
     this.bbiRoleEdit.Caption = "Настройка ролей и сотрудников";
     this.bbiRoleEdit.Glyph = ((System.Drawing.Image)(resources.GetObject("bbiRoleEdit.Glyph")));
     this.bbiRoleEdit.Id = 71;
     this.bbiRoleEdit.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiRoleEdit.LargeGlyph")));
     this.bbiRoleEdit.Name = "bbiRoleEdit";
     this.bbiRoleEdit.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.RoleEditItemClick);
     //
     // brDockMenuItem
     //
     this.brDockMenuItem.Caption = "Расположение форм";
     this.brDockMenuItem.Glyph = ((System.Drawing.Image)(resources.GetObject("brDockMenuItem.Glyph")));
     this.brDockMenuItem.Hint = "Настройка расположения форм";
     this.brDockMenuItem.Id = 78;
     this.brDockMenuItem.Name = "brDockMenuItem";
     //
     // brEdItControlsStates
     //
     this.brEdItControlsStates.Edit = this.ripceControlsStates;
     this.brEdItControlsStates.Id = 89;
     this.brEdItControlsStates.Name = "brEdItControlsStates";
     //
     // ripceControlsStates
     //
     this.ripceControlsStates.AutoHeight = false;
     this.ripceControlsStates.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
     new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
     this.ripceControlsStates.Name = "ripceControlsStates";
     //
     // rpMain
     //
     this.rpMain.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgMain});
     this.rpMain.Name = "rpMain";
     this.rpMain.Text = "Главная";
     //
     // rpgMain
     //
     this.rpgMain.Name = "rpgMain";
     this.rpgMain.Text = "Главное";
     //
     // rpDictionaries
     //
     this.rpDictionaries.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgCommonDictionaries});
     this.rpDictionaries.Name = "rpDictionaries";
     this.rpDictionaries.Text = "Справочники";
     //
     // rpgCommonDictionaries
     //
     this.rpgCommonDictionaries.Name = "rpgCommonDictionaries";
     this.rpgCommonDictionaries.Text = "Общие";
     //
     // rpReports
     //
     this.rpReports.Name = "rpReports";
     this.rpReports.Text = "Отчёты";
     //
     // rpSettings
     //
     this.rpSettings.Name = "rpSettings";
     this.rpSettings.Text = "Настройки системы";
     //
     // rpAdmin
     //
     this.rpAdmin.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
     this.rpgAdmin});
     this.rpAdmin.Name = "rpAdmin";
     this.rpAdmin.Text = "Администрирование";
     this.rpAdmin.Visible = false;
     //
     // rpgAdmin
     //
     this.rpgAdmin.ItemLinks.Add(this.bbiAdmin);
     this.rpgAdmin.ItemLinks.Add(this.bbiRoleEdit);
     this.rpgAdmin.Name = "rpgAdmin";
     this.rpgAdmin.Text = "Администратор";
     //
     // riceStates
     //
     this.riceStates.Name = "riceStates";
     this.riceStates.NullStyle = DevExpress.XtraEditors.Controls.StyleIndeterminate.Unchecked;
     //
     // rsbMain
     //
     this.rsbMain.ItemLinks.Add(this.siVersion);
     this.rsbMain.Location = new System.Drawing.Point(0, 669);
     this.rsbMain.Name = "rsbMain";
     this.rsbMain.Ribbon = this.rbnMain;
     this.rsbMain.Size = new System.Drawing.Size(1210, 31);
     //
     // dxErrorProvider
     //
     this.dxErrorProvider.ContainerControl = this;
     //
     // documentMng
     //
     this.documentMng.MdiParent = this;
     this.documentMng.MenuManager = this.rbnMain;
     this.documentMng.ShowThumbnailsInTaskBar = DevExpress.Utils.DefaultBoolean.False;
     this.documentMng.View = this.MDIViewNative;
     this.documentMng.ViewCollection.AddRange(new DevExpress.XtraBars.Docking2010.Views.BaseView[] {
     this.MDIViewNative,
     this.MDIViewTabbed});
     //
     // bbiChangeUser
     //
     this.bbiChangeUser.Caption = "Сменить пользователя";
     this.bbiChangeUser.Id = 161;
     this.bbiChangeUser.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbiChangeUser.LargeGlyph")));
     this.bbiChangeUser.Name = "bbiChangeUser";
     //
     // CommonParentForm
     //
     this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(1210, 700);
     this.Controls.Add(this.rsbMain);
     this.Controls.Add(this.rbnMain);
     this.IsMdiContainer = true;
     this.Name = "CommonParentForm";
     this.Ribbon = this.rbnMain;
     this.StatusBar = this.rsbMain;
     this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
     this.Activated += new System.EventHandler(this.CommonParentFormActivated);
     this.Load += new System.EventHandler(this.CommonParentFormLoad);
     this.Shown += new System.EventHandler(this.CommonParentFormShown);
     ((System.ComponentModel.ISupportInitialize)(this.rbnMain)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.appMenu)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.ripceControlsStates)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.riceStates)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.dxErrorProvider)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.documentMng)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewNative)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.MDIViewTabbed)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Ejemplo n.º 19
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();

        }
    }