Ejemplo n.º 1
0
        private async Task Save()
        {
            LoggType dto = BuildDto();
            await _customFieldService.Save(dto);

            await PopAsync();
        }
Ejemplo n.º 2
0
 public void AddSelectedLoggType(LoggType loggType)//todo change to store only key
 {
     if (SelectedLoggTypeList.All(l => l.Key != loggType.Key))
     {
         SelectedLoggTypeList.Add(loggType);
         SelectedLoggTypeList.Save(FILE_SELECTED_LOGGTYPEIDS);
     }
 }
Ejemplo n.º 3
0
        public void SaveLoggType(LoggType loggType)
        {
            var index = LoggTypeList.FindIndex(x => x.Key == loggType.Key);

            LoggTypeList[index] = loggType;

            LoggTypeList.Where(a => a.GroupId != 100).ToList().SaveToLocalStorage(FILE_LOGGTYPER);
        }
Ejemplo n.º 4
0
        //private async Task Delete()
        //{
        //    var ok = await _huntFactory.DeleteCustomField(ID, ImagePath);
        //    if (ok)
        //    {
        //        await PopAsync();
        //    }
        //}

        public void SetState(LoggType dto, bool selected)
        {
            _dto        = dto ?? new LoggType();
            ID          = _dto.Key;
            Name        = _dto.Navn;
            Description = _dto.Beskrivelse;
            GroupId     = _dto.GroupId;
            Title       = ID == null ? "Nytt felt" : _dto.Navn;
            Selected    = selected;
        }
Ejemplo n.º 5
0
        public void LoggTypeSelected(LoggType loggType)
        {
            loggType.Selected = !loggType.Selected;
            if (loggType.Selected)
            {
                App.Database.AddSelectedLoggType(loggType);
            }
            else
            {
                App.Database.RemoveSelectedLoggType(loggType.Key);
            }

            BindData();
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Creates a new Instance of <see cref="LoggInfo"/>
 /// With the <see cref="Date"/> to Current Date
 /// </summary>
 /// <param name="Text">The error message</param>
 /// <param name="Type">The <see cref="LoggType"/> of this error</param>
 public LoggInfo(string Text, LoggType Type)
     : this(Text)
 {
     this.Type = Type;
 }
Ejemplo n.º 7
0
 public LoggInfo(DateTime date, string text, LoggType Type, Type InnerType, string InnerMessage, string InnerStack)
     : this(text, Type)
 {
     this.Date = date;
     this.InnerException = new InnerException();
     this.InnerException.ExceptionType = InnerType;
     this.InnerException.Message = InnerMessage;
     this.InnerException.StackTrace = InnerStack;
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Creates a new Instance of <see cref="LoggInfo"/>
 /// With the <see cref="Date"/> set to the Current Date
 /// </summary>
 /// <param name="Exception">The Exception</param>
 /// <param name="Type">The <see cref="LoggType"/> of this Exception</param>
 public LoggInfo(Exception Exception, LoggType Type)
     : this(Exception)
 {
     this.Type = Type;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Creates a new Instance of <see cref="LoggInfo"/>
 /// With the <see cref="Date"/> to Current Date
 /// </summary>
 /// <param name="Text">The error message</param>
 /// <param name="Type">The <see cref="LoggType"/> of this error</param>
 /// <param name="InnerException">The InnerException of this Error</param>
 public LoggInfo(string Text, LoggType Type, Exception InnerException)
     : this(Text, Type)
 {
     if (InnerException != null)
     {
         this.InnerException = new InnerException();
         this.InnerException.ExceptionType = InnerException.GetType();
         this.InnerException.Message = InnerException.Message;
         this.InnerException.StackTrace = InnerException.StackTrace;
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Logs a new line of text to a text file
 /// </summary>
 /// <param name="type">The type of the error to log</param>
 /// <param name="text">The error message to log.</param>
 /// <param name="innerException">The InnerException of this error</param>
 public override void Log(LoggType type, string text, Exception InnerException = null)
 {
     LoggInfo loggInfo = new LoggInfo(text, type, InnerException);
     Log(loggInfo);
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Logs a new line of text
 /// </summary>
 /// <param name="type">The type of the error to log</param>
 /// <param name="text">The error message to log.</param>
 /// <param name="innerException">The InnerException of this error</param>
 public abstract void Log(LoggType type, string text, Exception innerException = null);