コード例 #1
0
ファイル: PageProgress.cs プロジェクト: JBTech/MailSystem.NET
		public PageProgress(TypePage Type) : base(Type)
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitForm call
			this.Location = new Point(0,52);
		}
コード例 #2
0
        public PageScheduledMail(TypePage Type) : base(Type)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            // TODO: Add any initialization after the InitForm call
            this.Location = new Point(0, 51);
        }
コード例 #3
0
        public PageBase(TypePage Type)
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            // TODO: Add any initialization after the InitForm call
            _type = Type;
        }
コード例 #4
0
ファイル: PageForm.cs プロジェクト: isaachogue/Archived
        public void HidePage(TypePage Type)
        {
            int index = GetIndex(Type);

            if (index >= 0)
            {
                ((PageBase)_pageList[index]).Visible = false;
            }
        }
コード例 #5
0
ファイル: PageBase.cs プロジェクト: JBTech/MailSystem.NET
		public PageBase(TypePage Type)
		{
			// This call is required by the Windows.Forms Form Designer.
			InitializeComponent();

			// TODO: Add any initialization after the InitForm call
			_type = Type;

			
		}
コード例 #6
0
ファイル: PageForm.cs プロジェクト: isaachogue/Archived
        public void ShowPage(TypePage Type)
        {
            int index = GetIndex(Type);

            if (index != _indexCurrentPage)
            {
                if (_indexCurrentPage >= 0)
                {
                    HidePage(_indexCurrentPage);
                }
                _indexCurrentPage = index;
                ShowPage(index);
            }
        }
コード例 #7
0
ファイル: PageForm.cs プロジェクト: isaachogue/Archived
        public int GetIndex(TypePage Type)
        {
            int index = -1;

            for (int i = 0; i < _pageList.Count; i++)
            {
                if (((PageBase)_pageList[i]).Type == Type)
                {
                    index = i;
                    break;
                }
            }

            return(index);
        }
コード例 #8
0
ファイル: ToursViewModel.cs プロジェクト: oleg111an/poker
        // проверяем тип страницы  (Favorites либо MyTours) и загружаем инфу из БД
        protected void OnNavigatedTo()
        {
            var param = _navigationService.GetLastNavigationData() as string;
            if (param == null) return;

            switch (param)
            {
                case FavoriteConst:

                    var vv = (from x in _myDataContextBase.Tournaments select x).ToList();

                    Tours = new ObservableCollection<ITournament>();
                    foreach (var v in vv.Where(x=>x.IsFavorites))
                        Tours.Add(v);
                    
                    _type = TypePage.Favorites;
                    NamePage = AppResources.Favorites;
                    break;

                case MyToursConst:
                    Tours =
                        new ObservableCollection<ITournament>(from x in _myDataContextBase.Tournaments select x);
                    _type = TypePage.MyTours;

                    NamePage = AppResources.Tours;
                    _isVisibleAppBar = true;
                    break;
            }

            Tours.CollectionChanged += Tours_CollectionChanged;
            CheckYet();
        }
コード例 #9
0
    public void OnClick()
    {
        TypePage page = NGUITools.FindInParents <TypePage>(gameObject);

        page.OnItemClick(mType);
    }
コード例 #10
0
        public override void BuildDocs(string outputPath)
        {
            var pages     = new PageTree("docs");
            var PageTrees = new List <PageTree>();

            foreach (var type in Library.GetExportedTypes())
            {
                var typePath = $"{type.Namespace.Replace('.', '/')}/{DocUtilities.GetURLTitle(type)}";
                var typeData = Docs[ID.GetIDString(type)];

                pages[typePath] = new TypePage(type, typeData, Docs);
                PageTrees.Add(pages.GetNode(typePath));

                // Constructors
                var ctors = type.GetConstructors();
                if (ctors.Length > 0)
                {
                    // Path to ctors group
                    var ctorsGroupPath = $"{typePath}/ctors";

                    var ctorsData = new Dictionary <ConstructorInfo, MemberXmlDocs>();
                    foreach (var ctor in ctors)
                    {
                        var ctorData = Docs[ID.GetIDString(ctor)];
                        ctorsData.Add(ctor, ctorData);
                    }

                    pages[ctorsGroupPath] = new ConstructorsPage(type, ctors, ctorsData);
                    PageTrees.Add(pages.GetNode(ctorsGroupPath));
                }

                // Method groups
                foreach (var methodGroup in type.GetMethods()
                         .Where(m => !m.Name.StartsWith("get_") && !m.Name.StartsWith("set_"))
                         .GroupBy(m => m.Name))
                {
                    // Path to method group
                    var methodGroupPath = $"{typePath}/{methodGroup.Key}";

                    // Map of reflected methods and documentation
                    var methods = new Dictionary <MethodInfo, MemberXmlDocs>();

                    foreach (var method in methodGroup)
                    {
                        var methodData = Docs[ID.GetIDString(method)];
                        methods[method] = methodData;
                    }

                    pages[methodGroupPath] = new MethodGroupPage(type, methodGroup.Key, methods);
                    PageTrees.Add(pages.GetNode(methodGroupPath));
                }

                // Fields
                foreach (var field in type.GetFields().Where(f => (f.IsPublic || !f.IsPrivate) && (!f.DeclaringType.IsEnum || !f.IsSpecialName)))
                {
                    var fieldPath = Path.Combine(typePath, field.Name).Replace('\\', '/');
                    var fieldData = Docs[ID.GetIDString(field)];
                    pages[fieldPath] = new FieldPage(field, fieldData);
                    PageTrees.Add(pages.GetNode(fieldPath));
                }

                // Properties and Indexers
                int numIndexers = 0;
                foreach (var property in type.GetProperties())
                {
                    var propData = Docs[ID.GetIDString(property)];

                    string propPath;
                    if (property.GetIndexParameters().Length > 0)
                    {
                        propPath = $"{typePath}/this/{++numIndexers}";
                    }
                    else
                    {
                        propPath = $"{typePath}/{property.Name}";
                    }

                    pages[propPath] = new PropertyPage(property, propData);
                    PageTrees.Add(pages.GetNode(propPath));
                }
            }

            // Create a task for each document that needs to be exported, run them all at once
            var exportTasks = new Task[PageTrees.Count];

            for (int i = 0; i < PageTrees.Count; i++)
            {
                var node = PageTrees[i];
                exportTasks[i] = Task.Run(() =>
                {
                    var documentDir  = Directory.GetParent($"{outputPath}/{node.Path}").FullName;
                    var documentPath = $"{outputPath}/{node.Path}.md";
                    Directory.CreateDirectory(documentDir);
                    using (var writer = new MarkdownWriter(documentPath))
                    {
                        node.Page.Render(node, writer);
                    }
                });
            }

            // Wait for all export tasks to finish
            Task.WaitAll(exportTasks);
        }
コード例 #11
0
ファイル: PageForm.cs プロジェクト: haoasqui/MailSystem.NET
		public void ShowPage(TypePage Type)
		{
			int index = GetIndex(Type);

			if (index != _indexCurrentPage)
			{
				if (_indexCurrentPage >= 0)
					HidePage(_indexCurrentPage);
				_indexCurrentPage = index;
				ShowPage(index);
			}
		}
コード例 #12
0
ファイル: PageForm.cs プロジェクト: haoasqui/MailSystem.NET
		public void HidePage(TypePage Type)
		{
			int index = GetIndex(Type);

			if (index >= 0)
			{
				((PageBase)_pageList[index]).Visible = false;
			}
		}
コード例 #13
0
ファイル: PageForm.cs プロジェクト: haoasqui/MailSystem.NET
		public int GetIndex(TypePage Type)
		{
			int index = -1;

			for (int i = 0 ; i < _pageList.Count ; i++)
			{
				if (((PageBase)_pageList[i]).Type == Type)
				{
					index = i;
					break;
				}
			}

			return index;
		}
コード例 #14
0
 public OpenMainPagesCommand(MainVM vm, Page page, TypePage typePage)
 {
     viewModel     = vm;
     newPage       = page;
     this.typePage = typePage;
 }