Ejemplo n.º 1
0
        SplitterPane CreateSplitterListPane(ASPxSplitter splitter)
        {
            SplitterPane listPane = splitter.Panes.Add();

            listPane.Name = "listPane";
            return(listPane);
        }
Ejemplo n.º 2
0
        public virtual SplitterPaneBuilder Add()
        {
            SplitterPane item = new SplitterPane();

            container.Panes.Add(item);

            return new SplitterPaneBuilder(item, viewContext);
        }
Ejemplo n.º 3
0
        public virtual SplitterPaneBuilder Add()
        {
            SplitterPane item = new SplitterPane();

            container.Panes.Add(item);

            return(new SplitterPaneBuilder(item, viewContext));
        }
Ejemplo n.º 4
0
        public IHtmlNode CreatePane(SplitterPane pane)
        {
            var paneElement = new HtmlElement("div")
                              .Attributes(pane.HtmlAttributes)
                              .PrependClass(UIPrimitives.Splitter.Pane)
                              .ToggleClass(UIPrimitives.Scrollable, pane.Scrollable);

            pane.Template.Apply(paneElement);

            return(paneElement);
        }
Ejemplo n.º 5
0
        ASPxCallbackPanel CreateSplitterDetailPane(ASPxSplitter splitter)
        {
            SplitterPane detailPane = splitter.Panes.Add();

            detailPane.ScrollBars = ScrollBars.Auto;
            var updatePanel = new ASPxCallbackPanel {
                ID = "DetailUpdatePanel", ClientInstanceName = "DetailUpdatePanel"
            };

            if (!(WebWindow.CurrentRequestWindow is PopupWindow))
            {
                updatePanel.ClientSideEvents.Init = GetAdjustSizeScript();
            }


            updatePanel.ClientSideEvents.EndCallback = "function(s,e) {ProcessMarkup(s, true);}";
            updatePanel.CustomJSProperties          += updatePanel_CustomJSProperties;
            detailPane.Controls.Add(updatePanel);
            return(updatePanel);
        }
 public SplitterHtmlBuilderTests()
 {
     splitter = SplitterTestHelper.CreateSplitter();
     pane     = new SplitterPane();
     builder  = new SplitterHtmlBuilder(splitter);
 }
 public SplitterHtmlBuilderTests()
 {
     splitter = SplitterTestHelper.CreateSplitter();
     pane = new SplitterPane();
     builder = new SplitterHtmlBuilder(splitter);
 }
        public MasterPaneWithSplitterDemo() : base("MasterPane With Splitter",
                                                   "MasterPane With Splitter Sample", DemoType.Financial)
        {
            var myMaster = base.MasterPane;

            // Remove the default GraphPane that comes with ZedGraphControl
            myMaster.PaneList.Clear();

            // Set the masterpane title
            myMaster.Title.Text      = "ZedGraph MasterPane With Splitter Example";
            myMaster.Title.IsVisible = true;

            // Fill the masterpane background with a color gradient
            myMaster.Fill = new Fill(Color.White, Color.MediumSlateBlue, 45.0F);

            // Set the margins to 10 points
            myMaster.Margin.All = 10;

            // Enable the masterpane legend
            myMaster.Legend.IsVisible = true;
            myMaster.Legend.Position  = LegendPos.TopCenter;

            // Initialize a color and symbol type rotator
            ColorSymbolRotator rotator = new ColorSymbolRotator();

            const int TotPanes = 3;

            // Create some new GraphPanes
            for (int j = 0; j < TotPanes; j++)
            {
                // Create a new graph - rect dimensions do not matter here, since it
                // will be resized by MasterPane.AutoPaneLayout()
                GraphPane myPane = new GraphPane(new Rectangle(10, 10, 10, 10),
                                                 "Case #" + (j + 1).ToString(),
                                                 "Time, Days",
                                                 "Rate, m/s");

                // Fill the GraphPane background with a color gradient
                myPane.Fill          = new Fill(Color.White, Color.LightYellow, 45.0F);
                myPane.BaseDimension = 6.0F;

                // Make up some data arrays based on the Sine function
                PointPairList list = new PointPairList();
                for (int i = 0; i < 36; i++)
                {
                    double x = (double)i + 5;
                    double y = 3.0 * (1.5 + Math.Sin((double)i * 0.2 + (double)j));
                    list.Add(x, y);
                }

                // Add a curve to the Graph, use the next sequential color and symbol
                LineItem myCurve = myPane.AddCurve("Type " + j.ToString(),
                                                   list, rotator.NextColor, rotator.NextSymbol);
                // Fill the symbols with white to make them opaque
                myCurve.Symbol.Fill = new Fill(Color.White);

                // Add the GraphPane to the MasterPane
                myMaster.Add(myPane);

                if (j == TotPanes - 1)
                {
                    break;
                }

                var splitter = new SplitterPane(false);
                myMaster.Add(splitter);
            }

            using (var g = ZedGraphControl.CreateGraphics())
            {
                // Tell ZedGraph to auto layout the new GraphPanes
                myMaster.SetLayout(g, PaneLayout.SingleColumn);
                myMaster.AxisChange(g);
            }
        }
Ejemplo n.º 9
0
 public SplitterPaneBuilder(SplitterPane pane, ViewContext viewContext)
 {
     this.pane        = pane;
     this.viewContext = viewContext;
 }
 public SplitterPaneBuilderTests()
 {
     pane    = new SplitterPane();
     builder = new SplitterPaneBuilder(pane, TestHelper.CreateViewContext());
 }
Ejemplo n.º 11
0
        public void SetupPage()
        {
            //BasePage.Title = BasePage.PageName + " - DevAV Demo | ASP.NET Controls by DevExpress";

            List <S_MenuNavigation_Result> MenuListesi;
            List <S_MenuNavigation_Result> MenuListesiAll;

            if (Membership.GetUser() != null) //master page ilk yüklendiði zaman boþ geliyor. menü listesi null olmasýn diye kontrol ediyorum.
            {
                Guid UserGUID = new Guid(Membership.GetUser().ProviderUserKey.ToString());
                MenuListesi = db.S_MenuNavigation(UserGUID).ToList();
                ProfileBase curProfile = ProfileBase.Create(Membership.GetUser().UserName);
                string      loginName  = "(" + curProfile.GetPropertyValue("BayiKodu").ToString() + ")";
                loginName        += " " + curProfile.GetPropertyValue("BayiCariAdi").ToString();
                loginName        += ", " + curProfile.GetPropertyValue("Ismi").ToString();
                loginName        += " " + curProfile.GetPropertyValue("Soyismi").ToString();
                lblHosgeldin.Text = loginName;
            }
            else
            {
                MenuListesi = null;
            }

            string ustSayfaAdi = "";
            string altSayfaAdi = BasePage.PageName;

            if (MenuListesi != null && MenuListesi.Count > 0)
            {
                var a = MenuListesi.Where(c => c.Name == altSayfaAdi).ToList().Count > 0 ? MenuListesi.Where(c => c.Name == altSayfaAdi).FirstOrDefault().ParentID.Value : -1;
                if (a < 0)
                {
                    MenuListesiAll = db.S_MenuNavigation(null).ToList();
                    if (MenuListesiAll.Count > 0)
                    {
                        int _ParentID = MenuListesiAll.Where(c => c.Name == altSayfaAdi).First().ParentID.Value;
                        var linklist  = MenuListesiAll.Where(c => c.ParentID == _ParentID).ToList();
                        if (linklist.Count > 0)
                        {
                            ustSayfaAdi = MenuListesi.Where(c => c.ParentID == _ParentID).FirstOrDefault().Name;
                        }
                    }
                }
                else
                {
                    //alt sayfa adýndan üst sayfa adýný buluyorum. alt tarafdaki kodlarda kullanmak için.
                    int parentId = MenuListesi.Where(c => c.Name == altSayfaAdi).FirstOrDefault().ParentID.Value;
                    ustSayfaAdi = MenuListesi.Where(c => c.ID == parentId).FirstOrDefault().Name;
                }
                //ana manü yükleniyor.
                var MenuAnaListesi = MenuListesi.Where(c => c.ParentID == 1).ToList();
                if (MenuAnaListesi.Count > 0)
                {
                    foreach (var item in MenuAnaListesi)
                    {
                        NavigationMenu.Items[0].Items.Add(item.Text, item.Name, "", item.NavigateURL);
                    }
                }

                //menü deki resimleri dinamik olarak ekliyor.
                if (a < 0)
                {
                    MenuListesiAll = db.S_MenuNavigation(null).ToList();
                    var    linklist     = MenuListesiAll.Where(c => c.Name == ustSayfaAdi).ToList();
                    int    parentid     = linklist.FirstOrDefault().ParentID.Value;
                    string _ustSayfaAdi = MenuListesi.Where(c => c.ID == parentid).FirstOrDefault().Name;
                    NavigationMenu.Items[0].Image.Url = string.Format("~/Content/Images/LogoMenuIcons/{0}.png", _ustSayfaAdi);
                }
                else
                {
                    NavigationMenu.Items[0].Image.Url = string.Format("~/Content/Images/LogoMenuIcons/{0}.png", ustSayfaAdi);
                }
                NavigationMenu.Items[0].SubMenuStyle.CssClass = "navigationPopupMenu";
                NavigationMenu.Items[0].PopOutImage.Url       = "Content/Images/LogoMenuIcons/PopOutIcon.png";

                //anasayfa adýný bulmasý için yaptým. bulamadýðý zaman ana menüdeki bulunduðu sayfanýn adýný kýrmýzý seçili þekilde yapamýyordu.
                int menuSelectedIndex = 0;
                if (ustSayfaAdi != null)
                {
                    foreach (var item in MenuAnaListesi)
                    {
                        if (a < 0)
                        {
                            var list     = MenuListesi.Where(c => c.Name == ustSayfaAdi).ToList();
                            int parentid = list.FirstOrDefault().ParentID.Value;
                            if (item.ID == parentid)
                            {
                                NavigationMenu.Items[0].Items[menuSelectedIndex].Selected = true;
                            }
                            menuSelectedIndex++;
                        }
                        else
                        {
                            if (item.Name == ustSayfaAdi)
                            {
                                NavigationMenu.Items[0].Items[menuSelectedIndex].Selected = true;
                            }
                            menuSelectedIndex++;
                        }
                    }
                }

                SplitterPane contentPane = Splitter.GetPaneByName("MainContentPane");
                if (contentPane != null)
                {
                    contentPane.ScrollBars         = BasePage.ContentHasScroll ? ScrollBars.Auto : ScrollBars.None;
                    contentPane.PaneStyle.CssClass = BasePage.ContentHasBorder ? "mainContentPane frame" : "mainContentPane";
                }
                //ReadOnlyPopup.Visible = DemoUtils.IsSiteMode;

                //NavBar yükleniyor.
                int anaMenuId = -1;
                if (a < 0)
                {
                    MenuListesiAll = db.S_MenuNavigation(null).ToList();
                    if (MenuListesiAll.Count > 0)
                    {
                        anaMenuId = MenuListesiAll.Where(c => c.Name == altSayfaAdi).First().ParentID.Value;
                    }
                }
                else
                {
                    anaMenuId = MenuListesi.Where(c => c.Name == altSayfaAdi).FirstOrDefault().ParentID.Value;
                }
                var MenuNavBarListesi = MenuListesi.Where(c => c.ParentID == anaMenuId).ToList();
                if (MenuNavBarListesi.Count > 0)
                {
                    NavigationBarMenu.Groups.Add("MENU", ustSayfaAdi);

                    foreach (var item in MenuNavBarListesi)
                    {
                        NavigationBarMenu.Groups[0].Items.Add(item.Text, item.Name, "", item.NavigateURL);
                    }
                }
                //Filtre grubu þimdilik iptal ettim. ileriki zamanlarda ekleyeceðim.
                //NavigationBarMenu.Groups.Add("FAVORÝ FÝLTRELER", "Favorites");
                //NavigationBarMenu.Groups[1].Items.Add("Bu Ay", "BuAy", "", "#");
            }
        }
 public SplitterPaneBuilderTests()
 {
     pane = new SplitterPane();
     builder = new SplitterPaneBuilder(pane, TestHelper.CreateViewContext());
 }
Ejemplo n.º 13
0
        public static void LoadNode(ILayoutFactory iLayoutFactory, Dictionary <string, UserControl> viewsMap, FrameworkElement rootFrameworkElement, FrameworkElement parentFrameworkElement, XmlNode xmlParentElement, bool isParentHorizontal)
        {
            int row             = 0;
            int rowIncrement    = isParentHorizontal ? 2 : 0;
            int column          = 0;
            int columnIncrement = isParentHorizontal ? 0 : 2;

            foreach (var xmlChildNode in xmlParentElement.ChildNodes)
            {
                if (xmlChildNode is XmlElement)
                {
                    if ((xmlChildNode as XmlElement).Name == "SplitterPane")
                    {
                        XmlElement xmlSplitterPane = xmlChildNode as XmlElement;

                        XmlAttribute xmlAttribute = xmlSplitterPane.Attributes.GetNamedItem("Orientation") as XmlAttribute;

                        System.Diagnostics.Trace.Assert(xmlAttribute != null, "SplitterPane element does not have an orientation attribute");

                        bool isChildHorizontal = xmlAttribute.Value == "Horizontal";

                        SplitterPane newGrid = iLayoutFactory.MakeSplitterPane(isChildHorizontal);
                        newGrid.Tag = GetGuid(xmlSplitterPane);

                        if (parentFrameworkElement == rootFrameworkElement)
                        {
                            iLayoutFactory.SetRootPane(newGrid, out row, out column);
                        }
                        else
                        {
                            System.Windows.Markup.IAddChild parentElement = (System.Windows.Markup.IAddChild)parentFrameworkElement;
                            parentElement.AddChild(newGrid);
                            Grid.SetRow(newGrid, row);
                            Grid.SetColumn(newGrid, column);
                        }
                        SetWidthOrHeight(xmlSplitterPane, parentFrameworkElement, isParentHorizontal, row, column);

                        row    += rowIncrement;
                        column += columnIncrement;

                        LoadNode(iLayoutFactory, viewsMap, rootFrameworkElement, newGrid, xmlSplitterPane, isChildHorizontal);
                    }
                    else if ((xmlChildNode as XmlElement).Name == "DocumentPanel")
                    {
                        DocumentPanel documentPanel = iLayoutFactory.MakeDocumentPanel();

                        if (parentFrameworkElement == rootFrameworkElement)
                        {
                            iLayoutFactory.SetRootPane(documentPanel, out row, out column);
                        }
                        else
                        {
                            System.Windows.Markup.IAddChild parentElement = (System.Windows.Markup.IAddChild)parentFrameworkElement;
                            parentElement.AddChild(documentPanel);
                            Grid.SetRow(documentPanel, row);
                            Grid.SetColumn(documentPanel, column);
                        }

                        XmlElement xmlDocumentPanel = xmlChildNode as XmlElement;
                        SetWidthOrHeight(xmlDocumentPanel, parentFrameworkElement, isParentHorizontal, row, column);

                        row    += rowIncrement;
                        column += columnIncrement;

                        LoadNode(iLayoutFactory, viewsMap, rootFrameworkElement, documentPanel, xmlDocumentPanel, true);
                    }
                    else if ((xmlChildNode as XmlElement).Name == "DocumentPaneGroup")
                    {
                        DocumentPaneGroup documentPaneGroup = iLayoutFactory.MakeDocumentPaneGroup();

                        System.Windows.Markup.IAddChild parentElement = (System.Windows.Markup.IAddChild)parentFrameworkElement;
                        parentElement.AddChild(documentPaneGroup);

                        XmlElement xmlDocumentGroup = xmlChildNode as XmlElement;

                        documentPaneGroup.Tag = GetGuid(xmlDocumentGroup);;
                        SetWidthOrHeight(xmlDocumentGroup, parentFrameworkElement, isParentHorizontal, row, column);

                        LoadDocuments(iLayoutFactory, viewsMap, xmlDocumentGroup, documentPaneGroup.IViewContainer);
                        Grid.SetRow(documentPaneGroup, row);
                        Grid.SetColumn(documentPaneGroup, column);
                        row    += rowIncrement;
                        column += columnIncrement;
                    }
                    else if ((xmlChildNode as XmlElement).Name == "ToolPaneGroup")
                    {
                        ToolPaneGroup toolPaneGroup = iLayoutFactory.MakeToolPaneGroup();

                        System.Windows.Markup.IAddChild parentElement = (System.Windows.Markup.IAddChild)parentFrameworkElement;
                        parentElement.AddChild(toolPaneGroup);

                        XmlElement xmlToolPaneGroup = xmlChildNode as XmlElement;

                        toolPaneGroup.Tag = GetGuid(xmlToolPaneGroup);
                        SetWidthOrHeight(xmlToolPaneGroup, parentFrameworkElement, isParentHorizontal, row, column);

                        LoadTools(viewsMap, xmlToolPaneGroup, toolPaneGroup.IViewContainer);
                        Grid.SetRow(toolPaneGroup, row);
                        Grid.SetColumn(toolPaneGroup, column);
                        row    += rowIncrement;
                        column += columnIncrement;
                    }
                    else if ((xmlChildNode as XmlElement).Name == "FloatingToolPaneGroup")
                    {
                        FloatingToolPaneGroup floatingToolPaneGroup = iLayoutFactory.MakeFloatingToolPaneGroup();
                        XmlElement            xmlfloatingTool       = xmlChildNode as XmlElement;
                        floatingToolPaneGroup.Tag = GetGuid(xmlfloatingTool);
                        SetLocationAndSize(xmlfloatingTool, floatingToolPaneGroup);
                        LoadTools(viewsMap, xmlfloatingTool, floatingToolPaneGroup.IViewContainer);
                    }
                    else if ((xmlChildNode as XmlElement).Name == "FloatingDocumentPaneGroup")
                    {
                        FloatingDocumentPaneGroup floatingDocumentPaneGroup = iLayoutFactory.MakeFloatingDocumentPaneGroup();
                        XmlElement xmlfloatingDocument = xmlChildNode as XmlElement;
                        floatingDocumentPaneGroup.Tag = GetGuid(xmlfloatingDocument);
                        SetLocationAndSize(xmlfloatingDocument, floatingDocumentPaneGroup);
                        LoadDocuments(iLayoutFactory, viewsMap, xmlfloatingDocument, floatingDocumentPaneGroup.IViewContainer);
                    }
                    else if ((xmlChildNode as XmlElement).Name == "LeftSide")
                    {
                        XmlElement xmlLeftSide = xmlChildNode as XmlElement;
                        LoadUnPinnedToolDataNodes(iLayoutFactory, viewsMap, WindowLocation.LeftSide, xmlLeftSide);
                    }
                    else if ((xmlChildNode as XmlElement).Name == "TopSide")
                    {
                        XmlElement xmlTopSide = xmlChildNode as XmlElement;
                        LoadUnPinnedToolDataNodes(iLayoutFactory, viewsMap, WindowLocation.TopSide, xmlTopSide);
                    }
                    else if ((xmlChildNode as XmlElement).Name == "RightSide")
                    {
                        XmlElement xmlRightSide = xmlChildNode as XmlElement;
                        LoadUnPinnedToolDataNodes(iLayoutFactory, viewsMap, WindowLocation.RightSide, xmlRightSide);
                    }
                    else if ((xmlChildNode as XmlElement).Name == "BottomSide")
                    {
                        XmlElement xmlBottomSide = xmlChildNode as XmlElement;
                        LoadUnPinnedToolDataNodes(iLayoutFactory, viewsMap, WindowLocation.BottomSide, xmlBottomSide);
                    }
                }

                if (parentFrameworkElement != rootFrameworkElement)
                {
                    if ((row > 2) || (column > 2))
                    {
                        // we can only have two child elements (plus a splitter) in each grid
                        break;
                    }
                }
            }
        }