Пример #1
0
 public MarkOfDeath(PlotLogReadable plotLogReadable)
 {
     this.LogFolder      = plotLogReadable.LogFolder;
     this.LogFile        = plotLogReadable.LogFile;
     this.PlaceInLogFile = int.Parse(plotLogReadable.PlaceInLogFile.Split("/")[0]);
     // here and not in field definition to stay compatible to pre DiedAt versions
     this.DiedAt = DateTime.Now;
 }
Пример #2
0
 public bool IsMatch(PlotLogReadable plotLog)
 {
     if (!string.Equals(this.LogFolder, plotLog.LogFolder))
     {
         return(false);
     }
     if (!string.Equals(this.LogFile, plotLog.LogFile))
     {
         return(false);
     }
     if (!string.Equals(this.PlaceInLogFile, plotLog.PlaceInLogFile))
     {
         return(false);
     }
     return(true);
 }
        public NoteDialog(PlotLogReadable plotLogReadable, Language language, Settings settings, string theme, Action onUpdate)
        {
            this.DataContext     = this;
            this.Language        = language;
            this.Settings        = settings;
            this.plotLogReadable = plotLogReadable;
            this.OnUpdate        = onUpdate;
            this.Note            = plotLogReadable.Note;
            InitializeComponent();
#if DEBUG
            this.AttachDevTools();
#endif
            Utils.SetTheme(this, theme);
            this.Focus();
            // does not work for some reason:
            this.Find <TextBox>("Input").SelectionStart = 0;
            this.Find <TextBox>("Input").SelectionEnd   = plotLogReadable.Note.Length;
            this.Find <TextBox>("Input").Focus();
        }
        public MarkOfDeathDialog(PlotLogReadable plotLogReadable, Language language, Settings settings, Action onUpdate)
        {
            this.DataContext     = this;
            this.Language        = language;
            this.Settings        = settings;
            this.plotLogReadable = plotLogReadable;
            this.OnUpdate        = onUpdate;
            InitializeComponent();
#if DEBUG
            this.AttachDevTools();
#endif
            foreach (var markOfDeath in Settings.MarksOfDeath)
            {
                if (markOfDeath.IsMatch(plotLogReadable))
                {
                    this.IsDead = true;
                }
            }
            this.IsAlive = !this.IsDead;
            this.Focus();
        }
Пример #5
0
 public bool IsMatch(PlotLogReadable plotLog)
 {
     if (!string.Equals(this.LogFolder, plotLog.LogFolder)) return false;
     if (!string.Equals(this.LogFile, plotLog.LogFile)) return false;
     return true;
 }
Пример #6
0
 public Note(PlotLogReadable plotLogReadable)
 {
     this.LogFolder = plotLogReadable.LogFolder;
     this.LogFile = plotLogReadable.LogFile;
     this.text = plotLogReadable.Note;
 }
Пример #7
0
 public MarkOfDeath(PlotLogReadable plotLogReadable)
 {
     this.LogFolder      = plotLogReadable.LogFolder;
     this.LogFile        = plotLogReadable.LogFile;
     this.PlaceInLogFile = plotLogReadable.PlaceInLogFile;
 }