示例#1
0
 public AdHocTailingViewModel()
 {
     StartTailingCommand     = new StartTailingCommand(this);
     StopTailingCommand      = new StopTailingCommand(this);
     ToggleTailingCommand    = new ToggleTailingCommand(this);
     FollowTailToggleCommand = new FollowTailToggleCommand(this);
 }
示例#2
0
        public MainViewModel()
        {
            //Groups = new ObservableCollection<LogGroup>(LogSource.Instance.Logs.Groups);
            //SelectedGroup = Groups.Count > 0 ? Groups[0] : new LogGroup();

            //SelectedGroup = LogSource.Instance.Logs.Groups[0];
            LogSourceBound(this, new EventArgs());

            OpenLogPickerDialogCommand = new OpenLogPickerDialogCommand();
            AddGroupDialogCommand      = new AddGroupDialogCommand();
            StopTailingCommand         = new StopTailingCommand(this);
            StartTailingCommand        = new StartTailingCommand(this);
            ToggleTailingCommand       = new ToggleTailingCommand(this);
            SelectGroupCommand         = new SelectGroupCommand(this);
            FollowTailToggleCommand    = new FollowTailToggleCommand(this);

            LogSource.Instance.LogSourceBound            += LogSourceBound;
            LogSource.Instance.LogAdded                  += LogAdded;
            LogSource.Instance.LogRemoved                += LogRemoved;
            LogSource.Instance.LogGroupCollectionChanged += LogGroupSourceChanged;
            LogSource.Instance.LogGroupAdded             += SetSelectedGroup;
            LogSource.Instance.LogGroupEdited            += SetSelectedGroup;
            LogSource.Instance.LogGroupDeleted           += LogGroupDeleted;
        }