public JumpToWindowViewModel(Tuple<int,int[]>[] threads)
 {
     CloseWindowCommand=new Command(CloseWindow,()=>SelectedThread!=null);
     this.threads=threads;
     SelectedThread=threads.First();
     SelectedResNumber=SelectedThread.Item2.First();
 }
 public MainWindowViewModel()
 {
     openFileDialog.Filter="XMLファイル (*.xml)|*.xml";
     openFileDialog.FilterIndex=0;
     saveFileDialog.Filter="XMLファイル (*.xml)|*.xml";
     saveFileDialog.FilterIndex=0;
     OpenCommand=new Command(Open);
     SaveCommand=new Command(Save,()=>IsFileOpenning);
     SaveAsCommand=new Command(SaveAs,()=>IsFileOpenning);
     JumpToCommand=new Command(JumpTo,()=>IsFileOpenning);
     PreviousCommand=new Command(()=>Move(true),()=>IsFileOpenning&&CurrentPosition>0);
     NextCommand=new Command(()=>Move(false),()=>IsFileOpenning&&CurrentPosition<responses.Length-1);
     tagPresets=File.Exists("tags.txt")?LoadTagPresets("tags.txt"):new string[]{};
 }