Ejemplo n.º 1
0
        /// <summary>
        /// Get Main Tab Container.
        /// </summary>
        /// <param name="firstPanel">Work Stack Container.</param>
        /// <param name="secondPanel">Rnter Panel.</param>
        /// <param name="thirdPanel">Top Tab Container.</param>
        /// <returns>Main Tab Container.</returns>
        private static IPanelContainer GetMainTabContainer(IPanel firstPanel, IPanel secondPanel, IPanel thirdPanel)
        {
            var mainToolbar = new ToolbarBase();

            mainToolbar.Childs.Add(new DublicateSelectedPanelCommand
            {
                Text = "First command"
            });

            var mainTabContainer = new TabContainer
            {
                Header = new PanelHeader
                {
                    Text = "Main Window"
                },
                Toolbar = mainToolbar
            };

            mainTabContainer.Childs.Add(firstPanel);
            mainTabContainer.Childs.Add(secondPanel);
            mainTabContainer.Childs.Add(thirdPanel);

            var topStackContainer = new StackContainer
            {
                Header = new PanelHeader
                {
                    Text = "Root Stack Container"
                },
                Orientation = Orientation.Vertical
            };

            topStackContainer.Childs.Add(mainTabContainer);

            return(topStackContainer);
        }
        public HttpServicesPage()
        {
            this.Title = "Http Services";

            this.ToolbarItems.Add(new ToolbarItem("Load", null, () =>
            {
                VM.HttpDownloadStart.Execute(null);
            })
            {
                AutomationId = "Load"
            });

            var lstView = new CoreListView(ListViewCachingStrategy.RecycleElement)
            {
                HasUnevenRows = true,
                ItemTemplate  = new DataTemplate(typeof(RandomUserCell)),
                AutomationId  = "lstView"
            };

            lstView.SetBinding(CoreListView.ItemsSourceProperty, "RandomUsers");


            Content = new StackContainer(true)
            {
                Children = { lstView }
            };
        }
Ejemplo n.º 3
0
        public CarouselMain()
        {
            this.Title = "Photos";
            var carousel = new CarouselViewControl()
            {
                HeightRequest  = 300,
                ItemTemplate   = new PictureTemplateSelector(),
                ShowIndicators = true,
                //IsSwipingEnabled=true,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                //VerticalOptions = LayoutOptions.StartAndExpand,
                AnimateTransition = true,
                IndicatorsShape   = IndicatorsShape.Square,
                InterPageSpacing  = 10,
                Orientation       = CarouselViewOrientation.Horizontal,
            };

            carousel.SetBinding(CarouselViewControl.ItemsSourceProperty, "ItemSource");
            carousel.SetBinding(CarouselViewControl.PositionProperty, "Position");

            var lbl = new Label()
            {
                Margin = 10,
                Text   = "Bacon ipsum dolor amet jerky picanha beef chicken ball tip, capicola shoulder pork belly boudin prosciutto shank sausage pig hamburger. Tongue pork cupim landjaeger chuck short loin kielbasa fatback tail strip steak. Spare ribs kielbasa tenderloin jerky alcatra tri-tip pork. Spare ribs jowl shankle, ball tip alcatra ham short ribs picanha chicken drumstick. Cupim corned beef bacon, shoulder brisket ground round leberkas bresaola.\n\nT-bone beef ribs pastrami chuck. T-bone tongue swine bacon picanha, tenderloin beef strip steak. Pork loin sirloin picanha, short loin bresaola brisket alcatra corned beef venison sausage prosciutto cupim turkey boudin chicken. Sirloin capicola cupim chuck alcatra pork. Pork jerky fatback, meatball short loin tri-tip doner beef ribs bacon porchetta."
            };

            Content = new StackContainer(true)
            {
                Children = { carousel, new ScrollView()
                             {
                                 Content = lbl
                             } }
            };
        }
Ejemplo n.º 4
0
        public UIElement GetGitPanel()
        {
            var stack = new StackContainer();
            var group = new GroupContainer {
                CaptionHtml = "Git", LabelHeight = "10"
            };

            var gitPathRow    = new RowContainer();
            var repoPathField = new FieldElement {
                CaptionHtml = "Ścieżka do repozytorium", EditValue = "{RepoPath}", OuterWidth = "80"
            };

            gitPathRow.Elements.Add(repoPathField);
            group.Elements.Add(gitPathRow);

            var commandRow       = new RowContainer();
            var invalidPathLabel = new LabelElement {
                CaptionHtml = "{InvalidRepoPathInfo}"
            };
            var getDataCommand = new CommandElement {
                CaptionHtml = "Pobierz dane", MethodName = "GetGitData", OuterWidth = "15"
            };

            commandRow.Elements.Add(getDataCommand);
            commandRow.Elements.Add(invalidPathLabel);
            group.Elements.Add(commandRow);

            stack.Elements.Add(group);
            return(stack);
        }
    public static StackContainer Load(string assetFileName)
    {
        StackContainer stacksall = new StackContainer();
        //
        // Get the file name
        //
        TextAsset _xml = Resources.Load <TextAsset>(assetFileName);

        XmlSerializer serializer = new XmlSerializer(typeof(StackContainer));
        //
        // Read strings from asset file name
        //
        StringReader reader = new StringReader(_xml.text);

        //
        // XML reader will read the entire data file and load it into ItemContainer
        //

        try
        {
            stacksall = serializer.Deserialize(reader) as StackContainer;
        }
        catch (Exception ex)
        {
            Debug.Log(ex.Message);
        }

        reader.Close();

        //return null;
        return(stacksall);
    }
        public SqlitePage()
        {
            this.Title = "Sqlite Events";

            VM.GetDbAppointments(null);

            this.ToolbarItems.Add(new ToolbarItem("Create", null, async() =>
            {
                await Navigation.PushAsync(new CalendarEventPage()
                {
                    DevicePersistOnly = false
                });
            })
            {
                AutomationId = "Create"
            });


            var lstView = new ListView(ListViewCachingStrategy.RecycleElement)
            {
                HasUnevenRows = true,
                ItemTemplate  = new DataTemplate(typeof(AppointmentCell)),
                AutomationId  = "lstView"
            };

            lstView.SetBinding(ListView.ItemsSourceProperty, "Appointments");


            Content = new StackContainer(true)
            {
                Children = { lstView }
            };
        }
Ejemplo n.º 7
0
        public SearchContentPage()
        {
            this.Title = "Search Page";

            var lstPeople = new CoreListView()
            {
                ItemTemplate = new DataTemplate(typeof(PeopleCell))
            };

            lstPeople.SetBinding(CoreListView.ItemsSourceProperty, "People");

            if (Device.RuntimePlatform == "iOS")
            {
                searchBar = new SearchBar()
                {
                    SearchCommand = new Command((obj) => {
                        VM.SearchCommand.Execute(searchBar.Text);
                    })
                };
                Content = new StackContainer(true)
                {
                    Children = { searchBar, lstPeople }
                };
            }
            else
            {
                Content = new StackContainer(true)
                {
                    Children = { lstPeople }
                };
            }
        }
Ejemplo n.º 8
0
        private static StackContainer GetSettings()
        {
            if (!File.Exists("settings.bin"))
            {
                StackContainer settings = new StackContainer();

                settings.CreateContainer("products");

                settings.OpenContainer("products");
                settings.WriteValue("product1", "Product 1 Example Name", Encoding.ASCII);
                settings.WriteValue("product2", "Product 2 Example Name", Encoding.ASCII);
                settings.WriteValue("product3", "Product 3 Example Name", Encoding.ASCII);
                settings.Back();

                settings.CreateContainer("config");

                settings.OpenContainer("config");
                settings.WriteValue("show_help", BitConverter.GetBytes(false), true);
                settings.WriteValue("store_id", BitConverter.GetBytes(125778), true);

                settings.Back();
                File.WriteAllBytes("setting.bin", settings.Serialize());
                return(settings);
            }
            else
            {
                return(new StackContainer(File.ReadAllBytes("settings.bin")));
            }
        }
Ejemplo n.º 9
0
        public BackgroundImagePage()
        {
            var imgName = Device.RuntimePlatform == "iOS" ? "Default.png" : "screen.png";

            this.BackgroundImage = imgName;

            var formattedString = new FormattedString();

            formattedString.AddTextSpan("\tSimply setting the background image in iOS may result in the image tiling across the screen. Some articles suggest using an absolute layout with a bottom layer being an image. In the readme.txt find a url to create icons and splash screen assets and place them in your project. \n\n");
            formattedString.AddTextSpan("\tSet the page's BackgroundImage property and the BasePageRenderer in the CommonCore will fix the tiling issue without you having to layer controls to accomplish the effect.");
            var lbl = new Label()
            {
                FormattedText = formattedString
            };

            var frame = new Frame()
            {
                Margin          = 10,
                Padding         = 10,
                BackgroundColor = Color.White,
                Opacity         = 0.5,
                Content         = new StackLayout()
                {
                    Children = { lbl }
                }
            };


            Content = new StackContainer(true)
            {
                Children = { frame }
            };
        }
Ejemplo n.º 10
0
        public FontView()
        {
            var imgLabel = new Label()
            {
                FontSize          = 32,
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.Center
            };

            imgLabel.SetBinding(Label.TextProperty, "Unicode");
            imgLabel.SetBinding(Label.FontFamilyProperty, "FontFamily");


            var descript = new Label()
            {
                HorizontalOptions = LayoutOptions.Center,
                VerticalOptions   = LayoutOptions.Center,
                FontSize          = 10,
            };

            descript.SetBinding(Label.TextProperty, "FriendlyName");

            Content = new StackContainer(true)
            {
                Spacing  = 5,
                Children = { imgLabel, descript }
            };
        }
Ejemplo n.º 11
0
        private static void ExportToPath(StackContainer container, string path)
        {
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path).Refresh();
            }

            foreach (string value in container.GetValueNames())
            {
                File.WriteAllBytes(Path.Combine(path, value), container.ReadValue(value));
            }

            foreach (string sub in container.GetContainerNames())
            {
                if (sub == "..")
                {
                    continue;
                }

                string subpath = Path.Combine(path, sub);
                container.OpenContainer(sub, false);
                ExportToPath(container, subpath);
                container.Back();
            }
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Get Main Tab Container.
        /// </summary>
        /// <param name="firstPanel">Work Stack Container.</param>
        /// <param name="secondPanel">Rnter Panel.</param>
        /// <param name="thirdPanel">Top Tab Container.</param>
        /// <returns>Main Tab Container.</returns>
        private static IPanelContainer GetMainTabContainer(IPanel firstPanel, IPanel secondPanel, IPanel thirdPanel)
        {
            var mainTabContainer = new TabContainer
            {
                Header = new PanelHeader
                {
                    Text = "Main Window"
                },
            };

            mainTabContainer.Presenters.Add(firstPanel);
            mainTabContainer.Presenters.Add(secondPanel);
            mainTabContainer.Presenters.Add(thirdPanel);

            var topStackContainer = new StackContainer
            {
                Header = new PanelHeader
                {
                    Text = "Root Stack Container"
                },
                Orientation = Orientation.Vertical
            };

            topStackContainer.Presenters.Add(mainTabContainer);

            return(topStackContainer);
        }
Ejemplo n.º 13
0
        /// <summary>
        ///     Создает новый экземпляр файлового менеджера.
        /// </summary>
        /// <param name="maxWidth">Максимальная используемая ширина.</param>
        /// <param name="maxHeight">Максимальная используемая высота.</param>
        public FileManager(int maxWidth, int maxHeight)
        {
            CurrentDirectory = null;
            panelWidth       = maxWidth / 2 - 2;
            list             = new StackContainer(Orientation.Vertical, maxVisibleCount: maxHeight - 3);
            header           = new Label("", maxWidth);
            selectedWidget   = new StackContainer(Orientation.Vertical, maxVisibleCount: maxHeight - 3);
            selectedSet      = new OrderedSet <string>();

            var wrappedList = new RelativePosition(0, 1)
                              .Add(new Frame(Style.DarkGrayOnDefault)
                                   .Add(list));
            var wrappedSelected = new RelativePosition(40, 1, 1)
                                  .Add(new Frame(Style.DarkGrayOnDefault)
                                       .Add(selectedWidget));

            RootContainer = new BaseContainer()
                            .Add(new RelativePosition(0, 0, 1)
                                 .Add(header))
                            .AddFocused(wrappedList)
                            .Add(wrappedSelected);
            RootContainer.AsIKeyHandler()
            .Add(new[] { new KeySelector(ConsoleKey.F10), new KeySelector(ConsoleKey.Q) },
                 () => RootContainer.Loop.OnStop = () => Console.WriteLine("До новых встреч!"));
            list.AsIKeyHandler()
            .Add(new[] { new KeySelector('/'), new KeySelector('\\') }, () => ChangeDir(null))
            .Add(new KeySelector(ConsoleKey.Tab), () => RootContainer.Focused = wrappedSelected);
            selectedWidget.AsIKeyHandler()
            .Add(new KeySelector(ConsoleKey.Tab), () => RootContainer.Focused = wrappedList);
        }
Ejemplo n.º 14
0
        public UIElement GetSource()
        {
            var stack = new StackContainer();
            var group = new GroupContainer {
                CaptionHtml = "Tytuł grupy", LabelHeight = "10"
            };
            var row    = new RowContainer();
            var rowCmd = new RowContainer();

            var field1 = new FieldElement {
                CaptionHtml = "Pole 1", EditValue = "{Field1}", OuterWidth = "30"
            };
            var field2 = new FieldElement {
                CaptionHtml = "Pole 2", EditValue = "{Field2}", OuterWidth = "30"
            };
            var field3 = new FieldElement {
                CaptionHtml = "Pole 3", EditValue = "{Field3}", OuterWidth = "30"
            };
            var command = new CommandElement {
                CaptionHtml = "Pokaż wartości", MethodName = "ShowFieldValue", Width = "20"
            };

            row.Elements.Add(field1);
            row.Elements.Add(field2);
            row.Elements.Add(field3);
            rowCmd.Elements.Add(command);

            group.Elements.Add(row);
            group.Elements.Add(rowCmd);
            stack.Elements.Add(group);

            return(stack);
        }
Ejemplo n.º 15
0
        private static StackContainer GenerateStackContainer(
            IEnumerable <IPanel> panels, string header, Orientation orientation, bool wrapUpEachPanelInTabContainer)
        {
            var panelHeader = new PanelHeader
            {
                Text = header
            };

            var stackContainer = new StackContainer
            {
                Header      = panelHeader,
                Orientation = orientation
            };

            foreach (IPanel panel in panels)
            {
                var newPanel = (IPanel)panel.Clone();

                if (wrapUpEachPanelInTabContainer)
                {
                    newPanel.Activate();

                    var tabContainer = new TabContainer();
                    tabContainer.Presenters.Add(newPanel);

                    stackContainer.Presenters.Add(tabContainer);
                }
                else
                {
                    stackContainer.Presenters.Add(newPanel);
                }
            }

            return(stackContainer);
        }
Ejemplo n.º 16
0
        public AnalyticsPage()
        {
            this.Title = "App Analytics";

            var lst = new CoreListView()
            {
                ItemTemplate = new DataTemplate(typeof(AnalyticsPageCell))
            };

            lst.SetBinding(CoreListView.ItemsSourceProperty, "AnalyticLogs");

            var btnClear = new CoreButton()
            {
                Text         = "Clear",
                Style        = CoreStyles.LightOrange,
                AutomationId = "btnClear"
            };

            btnClear.SetBinding(CoreButton.CommandProperty, "ClearAnalyticEntries");

            Content = new StackContainer(true)
            {
                Padding  = 20,
                Spacing  = 10,
                Children = { lst, btnClear }
            };
        }
        public Nav1()
        {
            this.Title = "Nav1";

#if __IOS__
            this.OverrideBackButton = true;
#endif

            var btn = new CoreButton()
            {
                Style        = CoreStyles.LightOrange,
                Text         = "Navigate",
                AutomationId = "btn",
                Command      = new Command((obj) =>
                {
                    Navigation.PushNonAwaited <Nav2>();
                })
            };

            Content = new StackContainer(true)
            {
                Padding  = 20,
                Spacing  = 10,
                Children = { btn }
            };
        }
Ejemplo n.º 18
0
        public UIElement GetCommitPanel()
        {
            var stack = new StackContainer();
            var group = new GroupContainer {
                CaptionHtml = "Commity wybranego autora", LabelHeight = "10", IsReadOnly = "{ReadOnlyMode}"
            };

            var refreshCommandRow = new RowContainer();
            var refreshCommand    = new CommandElement {
                CaptionHtml = "Odśwież", MethodName = "RefreshCommitList", OuterWidth = "15"
            };

            refreshCommandRow.Elements.Add(refreshCommand);
            group.Elements.Add(refreshCommandRow);

            var commitGrid = GridElement.CreatePopulateGrid(CommitRows);

            commitGrid.EditValue    = "{CommitRows}";
            commitGrid.FocusedValue = "{FocusedCommitRow}";
            commitGrid.OuterWidth   = "80";
            group.Elements.Add(commitGrid);

            stack.Elements.Add(group);
            return(stack);
        }
        public WebViewEffect()
        {
            var htmlSource = new HtmlWebViewSource();

            htmlSource.Html = @"<html><body>
  <h1>Xamarin.Forms</h1>
  <p>Prosciutto biltong tenderloin shankle salami t-bone pig pork belly corned beef. Meatloaf pig boudin t-bone, bacon pastrami kevin filet mignon biltong shank turducken corned beef beef ribs prosciutto. Ribeye landjaeger shank beef sirloin bresaola fatback. Corned beef chuck tongue porchetta salami pork belly tail pig meatball</p>
<p>Morbi sizzle. Dawg potenti. Its fo rizzle fo. Gangster elizzle shizzlin dizzle, ullamcorpizzle quis, ullamcorpizzle phat, scelerisque brizzle, fo shizzle my nizzle. Crunk fo shizzle dang. Break yo neck, yall felizzle.</p>
  </body></html>";

            var webView = new WebView()
            {
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions   = LayoutOptions.FillAndExpand,
                Source            = htmlSource
            };

#if __IOS__
            webView.Effects.Add(new DisableWebViewScrollEffect());
#endif

            Content = new StackContainer(true)
            {
                Children = { webView }
            };
        }
Ejemplo n.º 20
0
		public SlidingPageCell()
		{

			img = new CachedImage()
			{
				Margin = new Thickness(10, 0, 3, 5),
				HeightRequest = 22,
				WidthRequest = 22,
				DownsampleHeight = 22,
				DownsampleWidth = 22,
				Aspect = Aspect.AspectFit,
				CacheDuration = TimeSpan.FromDays(30),
				VerticalOptions = LayoutOptions.Center,
				DownsampleUseDipUnits = true
			};

			lbl = new Label()
			{
				Margin = 5,
				VerticalOptions = LayoutOptions.Center,
			};

            View = new StackContainer(true)
			{
				Orientation = StackOrientation.Horizontal,
				Children = { img, lbl }
			};
		}
Ejemplo n.º 21
0
        public void PopTest_NoItem()
        {
            // Arrange
            var s = new StackContainer <string>();

            // Action
            var item = s.Pop();
        }
Ejemplo n.º 22
0
        public SlidingPage()
        {
            BackgroundColor = Color.FromHex("#b85921");

            var monkey = new CachedImage()
            {
                Margin = 5,
                Source = "iconwhite.png"
            };
            var navTitle = new Label()
            {
                Text      = "Common Core",
                TextColor = Color.White,
                Margin    = 5
            };
            var navSubtitle = new Label()
            {
                Text      = "Options Menu",
                TextColor = Color.White,
                Style     = CoreStyles.AddressCell
            };

            var topPanel = new StackLayout()
            {
                Padding         = new Thickness(10, 0, 10, 10),
                BackgroundColor = Color.FromHex("#b85921"),
                Orientation     = StackOrientation.Horizontal,
                Children        = { monkey, new StackLayout()
                                    {
                                        Children = { navTitle, navSubtitle }
                                    } }
            };

            var listView = new CoreListView
            {
                BackgroundColor     = Color.White,
                ItemTemplate        = new DataTemplate(typeof(SlidingPageCell)),
                VerticalOptions     = LayoutOptions.FillAndExpand,
                SeparatorVisibility = SeparatorVisibility.None,
            };

            listView.SetBinding(CoreListView.ItemsSourceProperty, "MasterPageItems");
            listView.SetBinding(CoreListView.ItemClickCommandProperty, "NavClicked");

            Padding = new Thickness(0, 40, 0, 0);
            Icon    = "hamburger.png";
            Title   = "Reference Guide";
            Content = new StackContainer(true)
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                Children        =
                {
                    topPanel,
                    listView
                }
            };
        }
        public RandomUserCell()
        {
            this.Height = 85;
            img         = new CachedImage()
            {
                Margin             = new Thickness(8, 4, 4, 4),
                HeightRequest      = 65,
                WidthRequest       = 65,
                RetryCount         = 0,
                RetryDelay         = 250,
                LoadingPlaceholder = "placeholder.png",
                CacheDuration      = TimeSpan.FromDays(10),
                Transformations    = new System.Collections.Generic.List <ITransformation>()
                {
                    new CircleTransformation()
                },
            };
            img.Effects.Add(new ViewShadowEffect());

            lblFullName = new Label()
            {
                Margin = new Thickness(4, 2, 4, -4)
            };
            lblFullName.SetBinding(Label.TextProperty,
                                   new Binding(path: "FullName", converter: AppConverters.UpperText));

            lblFullAddress = new Label()
            {
                Style = CoreStyles.AddressCell
            };

            var rightPanel = new StackLayout()
            {
                Padding  = 0,
                Children = { lblFullName, lblFullAddress }
            };

            ContextActions.Add(new MenuItem()
            {
                Text          = "More Info",
                IsDestructive = true,
                Command       = new Command((obj) =>
                {
                    DependencyService.Get <IDialogPrompt>().ShowMessage(new Prompt()
                    {
                        Title   = "Row Selected",
                        Message = $"You chose {((RandomUser)BindingContext).FullName}"
                    });
                })
            });

            View = new StackContainer(true)
            {
                Orientation = StackOrientation.Horizontal,
                Children    = { img, rightPanel }
            };
        }
Ejemplo n.º 24
0
        public void IsEmptyTest_EmptyStack()
        {
            // Arrange
            var s = new StackContainer <int>();

            // Assert
            Assert.IsTrue(s.IsEmpty());
            Assert.AreEqual(0, s.Size());
        }
Ejemplo n.º 25
0
    // Use this for initialization
    void Start()
    {
        StackContainer ic = StackContainer.Load(path);

        foreach (XmlStacks stack in ic.stacks)
        {
            print(stack.Name);
        }
    }
Ejemplo n.º 26
0
        public static int FunctionPop(Processor proc, ProgramReader reader)
        {
            StackContainer c = proc.Stack.Peek();

            proc.MMU.Free(c.Memory);
            proc.Stack.Pop();

            return(reader.Elapsed());
        }
Ejemplo n.º 27
0
        /// <summary>
        /// Get Work Right Stack Container.
        /// </summary>
        /// <returns>Work Right Stack Container.</returns>
        private static IPanelContainer GetWorkRightStackContainer()
        {
            IViewModel workRight1 = RootNode.Inst.GetNode(@"\{78888951-2516-4e63-AC97-90E9D54351D8}\D:\Games");

            workRight1.Refresh();

            var workRightPanel1 = new PanelBase
            {
                PanelContent = (IPanelContent)workRight1
            };

            IViewModel workRight2 = RootNode.Inst.GetNode(@"\{78888951-2516-4e63-AC97-90E9D54351D8}\D:\");

            workRight2.Refresh();

            var workRightPanel2 = new PanelBase
            {
                PanelContent = (IPanelContent)workRight2
            };

            var workRightPanel1TabContainer = new TabContainer
            {
                Header = new PanelHeader
                {
                    Text = "Work Right Top Tab Container"
                }
            };

            workRightPanel1TabContainer.Presenters.Add(workRightPanel1);

            var workRightPanel2TabContainer = new TabContainer
            {
                Header = new PanelHeader
                {
                    Text = "Work Right Bottom Tab Container"
                }
            };

            workRightPanel2TabContainer.Presenters.Add(workRightPanel2);

            var workRightStackContainer = new StackContainer
            {
                Header = new PanelHeader
                {
                    Text = "Right Stack Container"
                },
                Orientation = Orientation.Vertical
            };

            //			workRightStackContainer.Childs.Add(workRightPanel1);
            //			workRightStackContainer.Childs.Add(workRightPanel2);
            workRightStackContainer.Presenters.Add(workRightPanel1TabContainer);
            workRightStackContainer.Presenters.Add(workRightPanel2TabContainer);
            return(workRightStackContainer);
        }
Ejemplo n.º 28
0
        public void IsEmptyTest_WithOneItem()
        {
            // Arrange
            var s = new StackContainer <int>();

            s.Push(10);

            // Assert
            Assert.IsFalse(s.IsEmpty());
            Assert.AreEqual(1, s.Size());
        }
Ejemplo n.º 29
0
        public void PushTest_OneItem()
        {
            // Arrange
            var s = new StackContainer <int>();

            // Action
            s.Push(10);

            // Assert
            Assert.AreEqual(1, s.Size());
        }
Ejemplo n.º 30
0
        public static int VarFctCopy(Processor proc, ProgramReader reader)
        {
            int            size = reader.NextInt();
            uint           from = reader.NextPtr();
            uint           to   = reader.NextPtr();
            StackContainer c    = proc.Stack.Peek();

            Array.Copy(c.Memory.Memory, from, proc.FunctionToCall.Memory.Memory, to, size);

            return(reader.Elapsed());
        }