Exemple #1
0
        public CommunityCommandUploadWindow(CommunityCommandDetailsViewModel ccCommand)
        {
            InitializeComponent();

            this.ccCommand = ccCommand;

            this.Initialize(this.StatusBar);
        }
Exemple #2
0
        public static async Task ProcessDownloadedCommunityCommand(CommunityCommandDetailsViewModel command)
        {
            if (bool.Equals(await DialogHelper.ShowCustom(new CommandImporterDialogControl(command.PrimaryCommand)), true))
            {
                if (!CommunityCommandsControl.downloadedCommandsCache.Contains(command.ID))
                {
                    CommunityCommandsControl.downloadedCommandsCache.Add(command.ID);

#pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
                    AsyncRunner.RunAsyncBackground(async(cancellationToken) =>
                    {
                        await ChannelSession.Services.CommunityCommandsService.DownloadCommand(command.ID);
                    }, new CancellationToken());
#pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed
                }
            }
        }