コード例 #1
0
    public void Show()
    {
        indexDataBot = 0;
        indexDataTop = indexDataBot;

        indexCellBot = 0;
        indexCellTop = 0;

        foreach (var cell in lstCell)
        {
            ViewLevel viewLevel = lstCell[indexCellTop].GetComponent <ViewLevel>();
            viewLevel.Init(indexDataTop);
            viewLevel.Show();
            indexCellTop++;
            indexDataTop = LogicIndexData(indexDataTop, true);
        }
        indexCellTop--;
        indexDataTop = LogicIndexData(indexDataTop, false);
        ;
        //MoveToLevel();
        //if(scrollauto != null) {
        //    scrollauto.Kill();
        //}

        //scrollauto = DOVirtual.DelayedCall(0.2f, () => { scrollauto = scrollRect.DOVerticalNormalizedPos(normalizedPosition + 0.0001f, 0.01f); });
    }
コード例 #2
0
        public ActionResult Days(int SiteCode = -1, int YYYY = -1, int MM = -1, int DD = -1)
        {
            DateTime currDate;

            try
            {
                currDate = new DateTime(YYYY, MM, DD);
            }
            catch
            {
                currDate = DateTime.Now;
            }

            ViewBag.currDate = currDate;

            Hydro.HydroServiceClient theHydro = new Hydro.HydroServiceClient();

            ViewLevel theView  = new ViewLevel();
            const int TYPE_AGK = 6;

            theView.theSiteList      = ViewSite.GetAll(TYPE_AGK);
            theView.SelectedSiteCode = SiteCode;
            if (theView.SelectedSiteCode == -1)
            {
                theView.SelectedSiteCode = theView.theSiteList[0].Code;
            }

            return(View(theView));
        }
コード例 #3
0
 public virtual void Attach(ViewLevel viewLevel, UView beAttchedView)
 {
     UIMgr = beAttchedView?.UIMgr;
     ParentView?.SubViews.Remove(this);
     if (viewLevel == ViewLevel.Root)
     {
         ParentView = beAttchedView;
         RootView   = beAttchedView;
         ViewLevel  = ViewLevel.Main;
         RectTrans.SetParent(RootView?.CanvasTrans);
         UIMgr.AddToMainViews(this);
         UIMgr.AddToGroupViews(this);
     }
     else if (viewLevel == ViewLevel.Main)
     {
         ParentView = beAttchedView;
         RootView   = beAttchedView.RootView;
         ViewLevel  = ViewLevel.Sub;
         RectTrans.SetParent(RootView?.CanvasTrans);
         UIMgr.AddToGroupViews(this);
         //移动到父节点下面
         Trans.SetSiblingIndex(ParentView.Trans.GetSiblingIndex() + ParentView.SubViews.Count + 1);
     }
     else
     {
         CLog.Error("无法挂载到:" + viewLevel);
     }
     ParentView.SubViews.Add(this);
 }
コード例 #4
0
        public ActionResult DeleteConfirmed(int id)
        {
            ViewLevel viewlevel = db.ViewLevels.Include(x => x.Groups).SingleOrDefault(x => x.ID == id);

            if (viewlevel == null)
            {
                return(HttpNotFound());
            }

            db.Contents.Include(x => x.Access)
            .Where(x => x.Access != null && x.Access.ID == id).ToList()
            .ForEach(x => x.Access = null);

            db.Categories.Include(x => x.Access)
            .Where(x => x.Access != null && x.Access.ID == id).ToList()
            .ForEach(x => x.Access = null);

            db.Menus.Include(x => x.Access)
            .Where(x => x.Access != null && x.Access.ID == id).ToList()
            .ForEach(x => x.Access = null);


            db.ViewLevels.Remove(viewlevel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #5
0
 public sealed override void Attach(ViewLevel viewLevel, UView beAttchedView)
 {
     base.Attach(viewLevel, beAttchedView);
     if (ParentView != null)
     {
         Trans.SetParent(ParentView.Trans);
     }
     Trans.localPosition = sourceLocalPos;
 }
コード例 #6
0
    public void SetViewLevel(ViewLevel level)
    {
        if (currentLevel != level)
        {
            currentLevel = level;

            uiElements.ForEach(x => x.Display(currentLevel));
        }
    }
コード例 #7
0
        public ViewLevel PostLevel([FromBody] Level level)
        {
            if (!ModelState.IsValid)
            {
                throw new Exception("No valido");
            }
            db.Level.Add(level);
            db.SaveChanges();
            ViewLevel viewLevel = level;

            return(viewLevel);
        }
コード例 #8
0
ファイル: HtmlRole.cs プロジェクト: manjacat/ESPP_Jan2019New
        //testing
        #region TestData
        private static HtmlRole GetSampleRole(string htmlName, ViewLevel vl = ViewLevel.Edit)
        {
            HtmlRole role1 = new HtmlRole
            {
                RoleId   = ModuleConstant.roleAdmin,
                ModuleId = ModuleConstant.MaklumatKakiTangan,
                HtmlName = htmlName,
                IsView   = true,
                IsAdd    = false,
                IsEdit   = false,
                IsDelete = false
            };

            switch (vl)
            {
            case (ViewLevel.NoAccess):
                role1.IsView   = false;
                role1.IsAdd    = false;
                role1.IsEdit   = false;
                role1.IsDelete = false;
                break;

            case (ViewLevel.View):
                role1.IsView   = true;
                role1.IsAdd    = false;
                role1.IsEdit   = false;
                role1.IsDelete = false;
                break;

            case (ViewLevel.Add):
                role1.IsView   = true;
                role1.IsAdd    = true;
                role1.IsEdit   = false;
                role1.IsDelete = false;
                break;

            case (ViewLevel.Edit):
                role1.IsView   = true;
                role1.IsAdd    = false;
                role1.IsEdit   = true;
                role1.IsDelete = false;
                break;

            case (ViewLevel.Delete):
                role1.IsView   = true;
                role1.IsAdd    = false;
                role1.IsEdit   = false;
                role1.IsDelete = true;
                break;
            }

            return(role1);
        }
コード例 #9
0
ファイル: Connectors.cs プロジェクト: Exclr8/CloudCore
        public static List<Connector> GetStructureConnectors(DBVersion version, String connectionString, ViewLevel viewLevel, List<Process> processes)
        {
            switch (viewLevel)
            {
                case ViewLevel.Activity:
                    return GetActivityConnectors(connectionString, processes, version);
                case ViewLevel.SubProcess:
                    return GetSubProcessConnectors(connectionString, processes, version);
            }

            return null;
        }
コード例 #10
0
        public IActionResult Getlevel(int id = 0)
        {
            var model = new ViewLevel();

            if (id > 0)
            {
                model = _viewLevel.FindById(id);
            }


            return(Json(model));
        }
コード例 #11
0
ファイル: Nodes.cs プロジェクト: Exclr8/CloudCore
        public static List<Node> GetStructureNodes(DBVersion version, String connectionString, ViewLevel viewLevel, List<Process> processes, bool getInstances = false)
        {

            switch (viewLevel)
            {
                case ViewLevel.Activity:
                    return GetActivityNodes(connectionString, processes, version, getInstances);
                case ViewLevel.SubProcess:
                    return GetTaskNodes(connectionString, processes, version, getInstances);
            }

            return null;
        }
コード例 #12
0
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(BadRequest());
            }
            ViewLevel viewlevel = db.ViewLevels.Find(id);

            if (viewlevel == null)
            {
                return(HttpNotFound());
            }
            viewlevel.Groups = db.Groups.Where(x => x.Access.FirstOrDefault(y => y.ID == viewlevel.ID) != null).ToList();
            return(View(viewlevel));
        }
コード例 #13
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(BadRequest());
            }
            ViewLevel viewlevel = db.ViewLevels.Find(id);

            if (viewlevel == null)
            {
                return(HttpNotFound());
            }
            viewlevel.Groups = db.Groups.Include(x => x.Access).Where(x => x.Access.FirstOrDefault(y => y.ID == viewlevel.ID) != null).ToList();

            return(View(new ViewLevelViewModel().Initialize(FillWithChildren(db.Groups.Where(x => x.Parent == null).ToList()), viewlevel)));
        }
コード例 #14
0
 public ViewLevel AssignTheSelectedGroupsToTheViewLevelAndReturnIt(ViewLevel vl, List <SelectableGroup> sg)
 {
     foreach (var g in sg)
     {
         if (g.Selected)
         {
             if (vl.Groups.SingleOrDefault(x => x.ID == g.ID) == null)
             {
                 vl.Groups.Add(db.Groups.SingleOrDefault(y => y.ID == g.ID));
             }
         }
         else
         {
             if (vl.Groups.SingleOrDefault(x => x.ID == g.ID) != null)
             {
                 vl.Groups.Remove(db.Groups.SingleOrDefault(y => y.ID == g.ID));
             }
         }
     }
     return(vl);
 }
コード例 #15
0
        public async Task <IActionResult> AddAsync(ViewLevelwithImage ViewLevelwithImage)
        {
            int Subjectid = 0;

            if (ModelState.IsValid)
            {
                ViewLevel model = new ViewLevel
                {
                    Contentid    = ViewLevelwithImage.Contentid,
                    LevelContent = ViewLevelwithImage.LevelContent,
                    Levelid      = ViewLevelwithImage.Levelid
                };
                if (ViewLevelwithImage.LevelidName != null)
                {
                    model.LevelidName = ViewLevelwithImage.LevelidName;
                }

                if (string.IsNullOrEmpty(ViewLevelwithImage.LevelContent))
                {
                    model.LevelContent = "Empty";
                }

                if (ViewLevelwithImage.LevelImage != null)
                {
                    using (var memoryStream = new MemoryStream())
                    {
                        await ViewLevelwithImage.LevelImage.CopyToAsync(memoryStream);

                        model.LevelImage = memoryStream.ToArray();
                    }
                }

                _viewLevel.Add(model);
                _viewLevel.Save();
                Subjectid = _content.FindById((int)model.Contentid).Subjectid;
            }

            return(RedirectToAction("contentlist", "content", new { id = Subjectid }));
        }
コード例 #16
0
        public void EnqueueMessage(string message, LogLevel level, OpType operationType, Exception ex = null,
                                   ViewLevel viewLevel = ViewLevel.Admin, string toObjct = "", string fromMethod = "")
        {
            if ((level == LogLevel.Debug && _log.IsDebugEnabled) ||
                (level == LogLevel.Error && _log.IsErrorEnabled) ||
                (level == LogLevel.Fatal && _log.IsFatalEnabled) ||
                (level == LogLevel.Info && _log.IsInfoEnabled) ||
                (level == LogLevel.Warn && _log.IsWarnEnabled))
            //|| (level == LogLevel.Printer && _printerLog.IsErrorEnabled)
            //|| (level == LogLevel.Pay && _PayLog.IsInfoEnabled))
            {
                var ip = Net.Net.Ip;
                //var ip = "112.253.8.147";
                _que.Enqueue(new LogMessage
                {
                    //Message = GetContent(message, ex).ToString(),
                    Message    = message,
                    Level      = level,
                    Exception  = ex,
                    UserIP     = ip,
                    UserName   = OperatorProvider.Provider.GetCurrent().UserCode,
                    CurrentUrl = HttpContext.Current?.Request.Url.ToString(),
                    PrevUrl    = (HttpContext.Current?.Request.UrlReferrer != null
                ? HttpContext.Current?.Request.UrlReferrer.AbsoluteUri
                : string.Empty),
                    IPCity        = Tool.GetIpLocation(ip),
                    OperationType = (int)operationType,
                    ToObjct       = toObjct,
                    ViewLevel     = (int)viewLevel,
                    FromMethod    = fromMethod
                });

                // 通知线程往磁盘中写日志
                _mre.Set();
            }
        }
コード例 #17
0
ファイル: Controller.cs プロジェクト: sat1582/CODEFramework
 /// <summary>Returns a standard view associated with the current action and passes a view model</summary>
 /// <param name="standardView">Standard view supported by all themes</param>
 /// <param name="model">The model that is to be passed to the view</param>
 /// <param name="level">The level the view desires to be</param>
 /// <param name="forceNewShell">Indicates whether it is desired to launch this view in a new shell (may or may not be respected by each theme)</param>
 /// <returns>A view result</returns>
 /// <example>
 /// public ActionResult ShowDetails()
 /// {
 ///     var model = new MyModel();
 ///     return Document(StandardViews.Block, model, ViewLevel.Popup);
 /// }
 /// </example>        
 protected virtual ViewResult View(StandardViews standardView, object model = null, ViewLevel level = ViewLevel.Normal, bool forceNewShell = false)
 {
     var viewName = "CODEFrameworkStandardView" + standardView;
     return View(viewName, model, level, forceNewShell);
 }
コード例 #18
0
    // Update is called once per frame
    void Update()
    {
        if (m_ViewLevel == ViewLevel.Far)
        {
            if (Input.GetAxis("Mouse ScrollWheel") > 0 || ToucheUpdate() == 1)
            {
                CloseTweener();
                var finalPos = sum_position / 2;
#if UNITY_EDITOR
                finalPos = Input.mousePosition;
#endif
                Vector3 mousePos = Camera.main.ScreenToWorldPoint(new Vector3(finalPos.x, finalPos.y, Camera.main.WorldToScreenPoint(m_BigMapMeshRender.transform.position).z));
                Vector3 mouseNor = (mousePos - transform.position).normalized;
                //float angle = Vector3.Angle(transform.forward, mouseNor);
                //angle = angle > 90 ? 180 - angle : angle;
                //float dis = m_Dis / Mathf.Cos((angle * Mathf.Deg2Rad));
                //Vector3 target = transform.position + mouseNor * dis;
                Vector3 target = GetIntersectWithLineAndPlane(transform.position, mouseNor, Vector3.up, new Vector3(0, (transform.position + transform.forward * m_Dis).y, 0));
                if (target.x > m_SmallMaX)
                {
                    target = new Vector3(m_SmallMaX, target.y, target.z);
                }
                if (target.x < m_SmallMinX)
                {
                    target = new Vector3(m_SmallMinX, target.y, target.z);
                }

                if (target.z > m_SmallMaxZ)
                {
                    target = new Vector3(target.x, target.y, m_SmallMaxZ);
                }
                if (target.z < m_SmallMinZ)
                {
                    target = new Vector3(target.x, target.y, m_SmallMinZ);
                }
                m_CameraTween = Camera.main.transform.DOMove(target, 0.5f);
                m_ValueTween  = DOTween.To(() => m_ChangeValue, x => m_ChangeValue = x, 1, 0.5f);

                DoNearFarTween(false);
                m_ViewLevel = ViewLevel.Near;
            }
        }
        else if (m_ViewLevel == ViewLevel.Near)
        {
            if (Input.GetAxis("Mouse ScrollWheel") < 0 || ToucheUpdate() == -1)
            {
                CloseTweener();
                Vector3 targetPos = transform.position - transform.forward * m_Dis;
                if (targetPos.x > m_BigMaxX)
                {
                    targetPos = new Vector3(m_BigMaxX, targetPos.y, targetPos.z);
                }
                if (targetPos.x < m_BigMinX)
                {
                    targetPos = new Vector3(m_BigMinX, targetPos.y, targetPos.z);
                }

                if (targetPos.z > m_BigMaxZ)
                {
                    targetPos = new Vector3(targetPos.x, targetPos.y, m_BigMaxZ);
                }
                if (targetPos.z < m_BigMinZ)
                {
                    targetPos = new Vector3(targetPos.x, targetPos.y, m_BigMinZ);
                }

                m_CameraTween = Camera.main.transform.DOMove(targetPos, 0.5f);
                m_ValueTween  = DOTween.To(() => m_ChangeValue, x => m_ChangeValue = x, 0, 0.5f);

                DoNearFarTween(true);
                m_ViewLevel = ViewLevel.Far;
            }
        }

        m_BigMapMeshRender.material.SetFloat("_ThreValue", m_ChangeValue);
    }
コード例 #19
0
ファイル: Controller.cs プロジェクト: sat1582/CODEFramework
 /// <summary>
 /// Returns a modal default view associated with the current action and passes a view model
 /// </summary>
 /// <param name="model">The model that is to be passed to the view</param>
 /// <param name="level">The level the view desires to be</param>
 /// <param name="scope">The scope of the view (global or local/child).</param>
 /// <returns>A view result</returns>
 /// <example>
 /// public ActionResult ShowDetails()
 /// {
 /// var model = new MyModel();
 /// return ViewModal(model, ViewLevel.Popup);
 /// }
 /// </example>
 protected virtual ViewResult ViewModal(object model = null, ViewLevel level = ViewLevel.Normal, ViewScope scope = ViewScope.Global)
 {
     var result = View(model, level);
     result.IsModal = true;
     result.ViewScope = scope;
     return result;
 }
コード例 #20
0
 public abstract void Display(ViewLevel level);
コード例 #21
0
ファイル: SystemCenter.cs プロジェクト: elliot-winch/Kepler
 public override void Display(ViewLevel level)
 {
     GetComponent <Renderer>().enabled = level == ViewLevel.SystemCenter;
 }
コード例 #22
0
ファイル: UUIView.cs プロジェクト: chengyimingvb/CYMUni
 // 将界面挂到其他界面下
 public sealed override void Attach(ViewLevel viewLevel, UView beAttchedView)
 {
     base.Attach(viewLevel, beAttchedView);
     ResetSourcePosData();
 }
コード例 #23
0
ファイル: Controller.cs プロジェクト: sat1582/CODEFramework
        /// <summary>
        /// Returns a named view associated with the current action and passes a view model
        /// </summary>
        /// <param name="viewName">The name of the view that is to be returned</param>
        /// <param name="model">The model that is to be passed to the view</param>
        /// <param name="level">The level the view desires to be</param>
        /// <param name="forceNewShell">Indicates whether it is desired to launch this view in a new shell (may or may not be respected by each theme)</param>
        /// <returns>A view result</returns>
        /// <exception cref="CODE.Framework.Wpf.Mvvm.ViewNotFoundException"></exception>
        /// <example>
        /// public ActionResult ShowDetails()
        /// {
        ///    var model = new MyModel();
        ///    return Document("SomeView", model, ViewLevel.Popup);
        /// }
        ///   </example>
        protected virtual ViewResult View(string viewName, object model = null, ViewLevel level = ViewLevel.Normal, bool forceNewShell = false)
        {
            var result = new ViewResult {Model = model, ForceNewShell = forceNewShell};

            var locationsSearchedUnsuccessfully = new List<string>();
            if (!FindView(viewName, level, result, locationsSearchedUnsuccessfully))
            {
                var sb = new StringBuilder();
                foreach (var location in locationsSearchedUnsuccessfully) sb.AppendLine(location);
                throw new ViewNotFoundException(sb.ToString());
            }

            return result;
        }
コード例 #24
0
        public ActionResult Months(int SiteCode = -1, int YYYY = -1, int MM = -1, int DD = 1)
        {
            DateTime currDate;

            try
            {
                currDate = new DateTime(YYYY, MM, DD);
            }
            catch
            {
                currDate = DateTime.Now;
            }

            ViewBag.currDate = currDate;

            Hydro.HydroServiceClient theHydro = new Hydro.HydroServiceClient();

            ViewLevel theView  = new ViewLevel();
            const int TYPE_AGK = 6;

            theView.theSiteList      = ViewSite.GetAll(TYPE_AGK);
            theView.SelectedSiteCode = SiteCode;
            if (theView.SelectedSiteCode == -1)
            {
                theView.SelectedSiteCode = theView.theSiteList[0].Code;
            }

            int SiteID = theView.theSiteList.Where(x => x.Code == theView.SelectedSiteCode).Single().ID;

            DateTime dateBgn = new DateTime(currDate.Year, currDate.Month, 1);
            DateTime dateEnd = new DateTime(currDate.Year, currDate.Month, DateTime.DaysInMonth(currDate.Year, currDate.Month));

            const int LEVEL_CODE = 2;

            var ValueCollection = theHydro.GetDataValues(SiteID, dateBgn, dateEnd, LEVEL_CODE, null, null, null);

            if (ValueCollection == null)
            {
                return(View(theView));
            }

            foreach (var item in ValueCollection)
            {
                if (item.Value > -9000)
                {
                    ViewLevel.Level theLevel = new ViewLevel.Level();
                    theLevel.Value = item.Value;
                    theLevel.YYYY  = item.Date.Year;
                    theLevel.MM    = item.Date.Month;
                    theLevel.DD    = item.Date.Day;
                    theLevel.HH    = item.Date.Hour;
                    theLevel.MI    = 0;
                    theLevel.SS    = 0;
                    theLevel.ID    = item.Id;
                    theView.theLevelList.Add(theLevel);
                }
            }

            const int HydroPostType = 2;

            var HydroPost = theHydro.GetSite(theView.SelectedSiteCode.ToString(), HydroPostType);
            var HydroPostValueCollection = theHydro.GetDataValues(HydroPost.SiteId, dateBgn, dateEnd, LEVEL_CODE, null, null, null);

            if (HydroPostValueCollection == null)
            {
                return(View(theView));
            }

            foreach (var item in HydroPostValueCollection)
            {
                if (item.Value > -9000)
                {
                    ViewLevel.Level theLevel = new ViewLevel.Level();
                    theLevel.Value = item.Value;
                    theLevel.YYYY  = item.Date.Year;
                    theLevel.MM    = item.Date.Month;
                    theLevel.DD    = item.Date.Day;
                    theLevel.HH    = item.Date.Hour;
                    theLevel.MI    = 0;
                    theLevel.SS    = 0;
                    theLevel.ID    = item.Id;
                    theView.theHydroPostLevelList.Add(theLevel);
                }
            }



            return(View(theView));
        }
コード例 #25
0
 public override void Display(ViewLevel level)
 {
     GetComponent <Renderer>().enabled = level == ViewLevel.Planetary;
 }
コード例 #26
0
 public override void Display(ViewLevel level)
 {
     GetComponent <Renderer>().enabled = level == ViewLevel.Orbiting;
 }
コード例 #27
0
ファイル: Controller.cs プロジェクト: sat1582/CODEFramework
        /// <summary>Attempts to find the view using all currently registered view engines.</summary>
        /// <param name="viewName">Name of the view to be found</param>
        /// <param name="level">Display level of the view (such as top-level)</param>
        /// <param name="result">The view result object.</param>
        /// <param name="locationsSearchedUnsuccessfully">A list of locations the engines searched unsuccessfully (can be used by callers to display error messages and the like)</param>
        /// <returns>Success indicator (false if no view was found)</returns>
        private bool FindView(string viewName, ViewLevel level, ViewResult result, List<string> locationsSearchedUnsuccessfully = null)
        {
            var foundView = false;
            var controllerName = GetType().Name.ToLower();
            if (controllerName.ToLower().EndsWith("controller"))
                controllerName = controllerName.Substring(0, controllerName.Length - 10);

            foreach (var engine in RegisteredViewEngines)
            {
                var viewResult = engine.GetView(viewName, controllerName);
                if (viewResult.FoundView)
                {
                    result.View = viewResult.View;
                    result.ViewSource = viewResult.ViewSource;
                    result.ViewTitle = SimpleView.GetTitle(viewResult.View);
                    result.ViewIconResourceKey = SimpleView.GetIconResourceKey(viewResult.View);
                    result.View.DataContext = result.Model;
                    var haveViewInformation = result.Model as IHaveViewInformation;
                    if (haveViewInformation != null) haveViewInformation.AssociatedView = result.View;
                    result.ViewLevel = level;
                    foundView = true;
                    break;
                }
                if (locationsSearchedUnsuccessfully != null) locationsSearchedUnsuccessfully.AddRange(viewResult.LocationsSearched);
            }
            return foundView;
        }
コード例 #28
0
ファイル: Controller.cs プロジェクト: sat1582/CODEFramework
        /// <summary>
        /// Returns the default view associated with the current action and passes a view model
        /// </summary>
        /// <param name="model">The model that is to be passed to the view</param>
        /// <param name="level">The level the view desires to be</param>
        /// <param name="forceNewShell">Indicates whether it is desired to launch this view in a new shell (may or may not be respected by each theme)</param>
        /// <returns>A view result</returns>
        /// <example>
        /// public ActionResult ShowDetails()
        /// {
        ///     var model = new MyModel();
        ///     return Document(model, ViewLevel.StandAlone);
        /// }
        /// </example>
        protected virtual ViewResult View(object model, ViewLevel level, bool forceNewShell = false)
        {
            var viewName = "Index";
            if (RequestContext.RouteData.Data.ContainsKey("action"))
                viewName = RequestContext.RouteData.Data["action"].ToString();

            return View(viewName, model, level, forceNewShell);
        }
コード例 #29
0
 public override void Display(ViewLevel level)
 {
     lr.enabled = level == ViewLevel.Orbiting;
 }
コード例 #30
0
 /// <summary>
 /// Warn级别
 /// </summary>
 /// <param name="msg">记录信息</param>
 /// <param name="ex">异常信息</param>
 /// <param name="opType">操作类型</param>
 /// <param name="fromMethod">来自哪个方法</param>
 /// <param name="toObjct">发送给谁</param>
 /// <param name="viewLevel">查看等级</param>
 public static void Warn(string msg, OpType opType, Exception ex = null
                         , string fromMethod = "", string toObjct = "", ViewLevel viewLevel = ViewLevel.Admin)
 {
     Instance().EnqueueMessage(msg, LogLevel.Warn, opType, ex, viewLevel, toObjct, fromMethod);
 }
コード例 #31
0
ファイル: WorkStatusProxy.cs プロジェクト: Dhanas-git/dotnet
        public WorkStatus GetLastStatus(string customerShortName, string projectShortName, Guid workId, ViewLevel viewLevel = ViewLevel.All, int maxMessages = 10)
        {
            var method   = $"getWorkStatus?customerShortName={customerShortName}&projectShortName={projectShortName}&workId={workId}&viewLevel={viewLevel}&max_messages={maxMessages}";
            var response = _analyticsEngineClient.Client.GetAsync(method).Result;

            _validation.ValidateResponse(response);
            return(JsonConvert.DeserializeObject <WorkStatus>(response.Content.ReadAsStringAsync().Result));
        }