예제 #1
0
        public void Ini()
        {
            PreviousCommand = new DelegateCommand(Previous);
            NextCommand     = new DelegateCommand(Next);
            CloseCommand    = new DelegateCommand(Close);
            S1 = new ReadMe()
            {
                IsSelected = true, ImagePath = @"../bin/Debug/ico/1.png"
            };
            S2 = new ReadMe()
            {
                IsSelected = false, ImagePath = @"../bin/Debug/ico/2.png"
            };
            S3 = new ReadMe()
            {
                IsSelected = false, ImagePath = @"../bin/Debug/ico/3.png"
            };
            S4 = new ReadMe()
            {
                IsSelected = false, ImagePath = @"../bin/Debug/ico/4.png"
            };

            Files = new ObservableCollection <ReadMe>()
            {
                S1, S2, S3, S4
            };
            SelectedFile = Files[0];
            Files.All(T => { T.IsSelected = false; return(true); });
            SelectedFile.IsSelected = true;
        }
예제 #2
0
 public MainViewModel(MainView view)
 {
     View               = view;
     AddGroupCommand    = new DelegateCommand(AddGroup);
     RemoveGroupCommand = new DelegateCommand(RemoveGroup);
     EditCommand        = new DelegateCommand(Edit, () => IsValid());
     ExcuteCmdCommand   = new DelegateCommand(ExcuteCmd, () => IsValid());
     PreviousCommand    = new DelegateCommand(Previous);
     NextCommand        = new DelegateCommand(Next);
     HelpCommand        = new DelegateCommand(Help);
     SaveCommand        = new DelegateCommand(Save, () => IsValid());
     LoadCommand        = new DelegateCommand(Load);
     AlwaysClickCommand = new DelegateCommand(AlwaysClick);
     InstallSDCommand   = new DelegateCommand(InstallSD);
     S1 = new ReadMe()
     {
         IsSelected = true, ImagePath = @"./bin/Debug/ico/1.png"
     };
     S2 = new ReadMe()
     {
         IsSelected = false, ImagePath = @"./bin/Debug/ico/2.png"
     };
     S3 = new ReadMe()
     {
         IsSelected = false, ImagePath = @"./bin/Debug/ico/3.png"
     };
     S4 = new ReadMe()
     {
         IsSelected = false, ImagePath = @"./bin/Debug/ico/4.png"
     };
     Files = new ObservableCollection <ReadMe>()
     {
         S1, S2, S3, S4
     };
     SelectedFile = Files[0];
     Files.All(T => { T.IsSelected = false; return(true); });
     SelectedFile.IsSelected = true;
 }