示例#1
0
        public MainForm(IEnumerable <Section> topNodes = null)
        {
            Title    = "Test Application";
            Style    = "main";
            topNodes = topNodes ?? TestSections.Get();
            //SectionList = new SectionListGridView(topNodes);
            //SectionList = new SectionListTreeView(topNodes);
            if (Platform.IsAndroid)
            {
                SectionList = new SectionListGridView(topNodes);
            }
            else
            {
                SectionList = new SectionListTreeGridView(topNodes);
            }

            this.Icon = TestIcons.TestIcon;

            if (Platform.IsDesktop)
            {
                ClientSize = new Size(900, 650);
            }
            //Opacity = 0.5;

            Content = MainContent();

            CreateMenuToolBar();
        }
示例#2
0
        public MainForm(IEnumerable <Section> topNodes = null)
        {
            Title       = string.Format("Test Application [{0}]", Platform.ID);
            Style       = "main";
            MinimumSize = new Size(400, 400);
            topNodes    = topNodes ?? TestSections.Get(TestApplication.DefaultTestAssemblies());
            //SectionList = new SectionListGridView(topNodes);
            //SectionList = new SectionListTreeView(topNodes);
            if (Platform.IsAndroid)
            {
                SectionList = new SectionListGridView(topNodes);
            }
            else
            {
                SectionList = new SectionListTreeGridView(topNodes);
            }

            this.Icon = TestIcons.TestIcon;

            if (Platform.IsDesktop)
            {
                ClientSize = new Size(900, 650);
            }
            //Opacity = 0.5;

            Content = MainContent();

            CreateMenuToolBar();
        }
示例#3
0
        public MainForm(IEnumerable <Section> topNodes = null)
        {
            var bitness  = EtoEnvironment.Is64BitProcess ? "64bit" : "32bit";
            var runtime  = RuntimeInformation.FrameworkDescription ?? (EtoEnvironment.Platform.IsMono ? "Mono" : EtoEnvironment.Platform.IsNetCore ? ".NET Core" : ".NET");
            var platform = EtoEnvironment.Platform.IsWindows ? EtoEnvironment.Platform.IsWinRT
                                ? "WinRT" : "Windows" : EtoEnvironment.Platform.IsMac
                                ? "Mac" : EtoEnvironment.Platform.IsLinux
                                ? "Linux" : EtoEnvironment.Platform.IsUnix
                                ? "Unix" : "Unknown";

            Title       = $"Test Application [{Platform.ID}, {bitness}, {runtime}, {platform}]";
            Style       = "main";
            MinimumSize = new Size(400, 400);
            topNodes    = topNodes ?? TestSections.Get(TestApplication.DefaultTestAssemblies());

            var nodes = topNodes.ToList();

            if (Platform.IsAndroid)
            {
                SectionList = new SectionListGridView(nodes);
            }
            else
            {
                SectionList = new SectionListTreeGridView(nodes);
            }

            SectionList.SelectedItemChanged += SectionList_SelectedItemChanged;


            this.Icon = TestIcons.TestIcon;

            if (Platform.IsDesktop)
            {
                ClientSize = new Size(900, 650);
            }
            //Opacity = 0.5;

            Content = MainContent();

            CreateMenuToolBar();

            if (TestApplication.Settings.SaveInitialSection && InitialSection == null)
            {
                InitialSection = TestApplication.Settings.InitialSection;
            }

            if (InitialSection != null)
            {
                SectionList.SelectedItem = nodes.SelectMany(r => r).OfType <ISection>().FirstOrDefault(r => r.Text == InitialSection);
            }
        }
示例#4
0
        public MainForm(IEnumerable <Section> topNodes = null)
        {
            Title = string.Format("Test Application [{0}, {1} {2}, {3}]",
                                  Platform.ID,
                                  EtoEnvironment.Is64BitProcess ? "64bit" : "32bit",
                                  EtoEnvironment.Platform.IsMono ? "Mono" : ".NET",
                                  EtoEnvironment.Platform.IsWindows ? EtoEnvironment.Platform.IsWinRT
                                ? "WinRT" : "Windows" : EtoEnvironment.Platform.IsMac
                                ? "Mac" : EtoEnvironment.Platform.IsLinux
                                ? "Linux" : EtoEnvironment.Platform.IsUnix
                                ? "Unix" : "Unknown");
            Style       = "main";
            MinimumSize = new Size(400, 400);
            topNodes    = topNodes ?? TestSections.Get(TestApplication.DefaultTestAssemblies());
            //SectionList = new SectionListGridView(topNodes);
            //SectionList = new SectionListTreeView(topNodes);
            if (Platform.IsAndroid)
            {
                SectionList = new SectionListGridView(topNodes);
            }
            else
            {
                SectionList = new SectionListTreeGridView(topNodes);
            }

            this.Icon = TestIcons.TestIcon;

            if (Platform.IsDesktop)
            {
                ClientSize = new Size(900, 650);
            }
            //Opacity = 0.5;

            Content = MainContent();

            CreateMenuToolBar();
        }