Ejemplo n.º 1
0
        public DataProvider()
        {
            client = new WebMechServiceClient();

            surfaceList = new ObservableCollection<SurfaceData>();
            sampleList = new ObservableCollection<SampleData>();
            parameterNameList = new ObservableCollection<ParameterData>();

            surfaceFilter = GetFilter();
            sampleFilter = GetFilter();
            sampleFilter.Count = 1000;

            surfacePageInfo = GetPageInfo();
            samplePageInfo = GetPageInfo();

            visualization = new Visualization();

            newSurface = new NewSurface();

            uploadData = new UploadData { Surfaces = surfaceList };

            ResetSurfaceList();
            ResetSampleList();

            RegisterCallbacks();
        }
        public PageInfoData GetPageInfoData(IPublishedContent source, string reminderText)
        {
            var pageInfoData = new PageInfoData();

            if (source is IPublishedContent node)
            {
                pageInfoData.PageType      = node.ContentType.Alias;
                pageInfoData.ChildrenNodes = GetChildrenNodes(node);
                pageInfoData.Reminder      = reminderText;
            }

            return(pageInfoData);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets default values of page information object.
 /// </summary>
 /// <param name="pageInfo">A WebMech.Web.PageInfoData that specifies
 /// data object of pagination.</param>
 private void ResetPageInfo(PageInfoData pageInfo)
 {
     pageInfo.Start = 0;
     pageInfo.End = 0;
     pageInfo.Total = 0;
     pageInfo.IsNext = false;
     pageInfo.IsPrevious = false;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Gets new instance of page information object.
 /// </summary>
 /// <returns>A WebMech.Web.PageInfoData that specifies
 /// data object of pagination.</returns>
 private PageInfoData GetPageInfo()
 {
     PageInfoData pageInfo = new PageInfoData();
     ResetPageInfo(pageInfo);
     return pageInfo;
 }
Ejemplo n.º 5
0
 void GetNewPage(string pathPage)
 {
     pageInfoData  = Resources.Load <PageInfoData>(pathPage);
     pageView.page = pageInfoData;
 }
Ejemplo n.º 6
0
 private void Awake()
 {
     pageInfoData    = ScriptableObject.CreateInstance <PageInfoData>();
     pageInfoRunTime = new PageInfoRunTime();
     pageView        = gameObject.GetComponent <PageView>();
 }