コード例 #1
0
        public UUIDGeneratorViewModel()
        {
            UUIDGenerator   = new UUIDGenerator(AppLogger);
            CopyUUIDCommand = new RelayCommand(() => PlatformShim.CopyToClipboard(UUIDGenerator.UUID));

            bool uuidGenerateFunction() => UUIDGenerator.Initiate();

            ExecuteTaskCommand = new RelayCommand(async() => await InitiateProcessAsync(uuidGenerateFunction, ExecuteTaskCommand), () => !IsBusy);
        }
コード例 #2
0
        public UUIDGeneratorViewModel()
        {
            UUIDGenerator   = new UUIDGenerator(AppLogger);
            CopyUUIDCommand = new RelayCommand(() => Clipboard.SetText(UUIDGenerator.UUID ?? string.Empty));

            bool sortLinesFunction() => UUIDGenerator.Initiate();

            ExecuteTaskCommand = new RelayCommand(async() => await InitiateProcessAsync(sortLinesFunction, ExecuteTaskCommand), () => !IsBusy);
        }