当前位置: 首页>>代码示例>>C#>>正文


C# AsyncObservableCollection类代码示例

本文整理汇总了C#中AsyncObservableCollection的典型用法代码示例。如果您正苦于以下问题:C# AsyncObservableCollection类的具体用法?C# AsyncObservableCollection怎么用?C# AsyncObservableCollection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AsyncObservableCollection类属于命名空间,在下文中一共展示了AsyncObservableCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IfCommand

 public IfCommand()
 {
     Name = "if";
     Description = "if condition to run a set of scripts";
     DefaultValue = "if condition=\"${variable}==value\" ";
     Commands = new AsyncObservableCollection<IScriptCommand>();
 }
开发者ID:brunoklein99,项目名称:nikon-camera-control,代码行数:7,代码来源:IfCommand.cs

示例2: EnfusePluginViewModel

        public EnfusePluginViewModel(Window window)
        {
            if (!IsInDesignMode)
            {
                window.Closing += window_Closing;
                ServiceProvider.FileTransfered += ServiceProvider_FileTransfered;
                ServiceProvider.WindowsManager.Event += WindowsManager_Event;
                SetEnabled();
                ResetCommand = new RelayCommand(SetDefault);
                PreviewCommand = new RelayCommand(Preview);
                GenerateCommand = new RelayCommand(Generate);
                StopCommand=new RelayCommand(Stop);
                ConfPluginCommand = new RelayCommand(ConfPlugin);
                InitCommands();
                Output = new AsyncObservableCollection<string>();
                LoadData();
                _pathtoalign = Path.Combine(Settings.ApplicationFolder, "Tools", "align_image_stack.exe");
                var hugin = @"c:\Program Files (x86)\Hugin\bin\align_image_stack.exe";
                // use hugin installation
                if (File.Exists(hugin))
                {
                    _pathtoalign = hugin;
                    OnProgressChange("Hugin installed using align_image_stack.exe");
                }
                else
                {
                    OnProgressChange("Hugin not installed. Instal x86 version for betteer image align performance");
                }

                _pathtoenfuse = Path.Combine(Settings.ApplicationFolder, "Tools", "x64", "enfuse.exe");
            }
        }
开发者ID:CadeLaRen,项目名称:digiCamControl,代码行数:32,代码来源:EnfusePluginViewModel.cs

示例3: Loop

 public Loop()
 {
     Name = "loop";
     Description = "execute a subset of commands for loopcount";
     DefaultValue = "loop loopcount=\"10\"";
     Commands = new AsyncObservableCollection<IScriptCommand>();
 }
开发者ID:brunoklein99,项目名称:nikon-camera-control,代码行数:7,代码来源:Loop.cs

示例4: GenMovieViewModel

 public GenMovieViewModel(Window window)
 {
     _window = window;
     _window.Closed += _window_Closed;
     StartCommand = new RelayCommand(Start);
     StopCommand = new RelayCommand(Stop);
     PlayVideoCommand = new RelayCommand(PlayVideo);
     BrowseFileCommand = new RelayCommand(BrowseFile);
     _backgroundWorker.DoWork += _backgroundWorker_DoWork;
     _backgroundWorker.RunWorkerCompleted += _backgroundWorker_RunWorkerCompleted;
     _backgroundWorker.WorkerSupportsCancellation = true;
     TotalImages = ServiceProvider.Settings.DefaultSession.Files.Count;
     MaxValue = TotalImages;
     VideoTypes = new ObservableCollection<VideoType>
     {
         new VideoType("4K 16:9", 3840, 2160),
         new VideoType("HD 1080 16:9", 1920, 1080),
         new VideoType("UXGA 4:3", 1600, 1200),
         new VideoType("HD 720 16:9", 1280, 720),
         new VideoType("Super VGA 4:3", 800, 600),
     };
     VideoType = VideoTypes[0];
     OutPutFile = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyVideos),
         ServiceProvider.Settings.DefaultSession.Name + ".mp4");
     OutPut = new AsyncObservableCollection<string>();
     Fps = 15;
 }
开发者ID:Sooyung,项目名称:digiCamControl,代码行数:27,代码来源:GenMovieViewModel.cs

示例5: ChatViewModel

 public ChatViewModel()
 {
     TextItems = new AsyncObservableCollection<Chat>();
     Message = "";
     Commands.SendMessageCommand.CanExecute += (sender, e) => e.CanExecute = true;
     Commands.SendMessageCommand.Executed += SendMessageCommand_OnExecuted;
 }
开发者ID:no1spirite,项目名称:BlackJack,代码行数:7,代码来源:ChatViewModel.cs

示例6: BaseCameraDevice

 public BaseCameraDevice()
 {
     IsChecked = true;
     AdvancedProperties = new AsyncObservableCollection<PropertyValue<long>>();
     Properties = new AsyncObservableCollection<PropertyValue<long>>();
     Capabilities = new List<CapabilityEnum>();
 }
开发者ID:CadeLaRen,项目名称:digiCamControl,代码行数:7,代码来源:BaseCameraDevice.cs

示例7: SocialIntelligence

        /// <summary>
        /// Initializes a new instance of the <see cref="SocialIntelligence"/> class.
        /// </summary>
        /// <param name="coreIntelligence">The core intelligence.</param>
        public SocialIntelligence(CoreIntelligence coreIntelligence)
            : base(coreIntelligence)
        {
            _networks = new AsyncObservableCollection<NetworkProvider>();
            try
            {
                CoreIntelligence.RepositoryIntelligence.RegisterTable(typeof(System_Social_User2Protocol), 3);
                CoreIntelligence.RepositoryIntelligence.RegisterTable(typeof(System_Social_ContactContainer), 2);
                CoreIntelligence.RepositoryIntelligence.RegisterTable(typeof(System_Social_ContactContainer2ContactProvider), 2);
                CoreIntelligence.RepositoryIntelligence.RegisterTable(typeof(TableModels.System_Social_ContactAttribute), 3);

                User2Protocol = (Table<System_Social_User2Protocol>)CoreIntelligence.RepositoryIntelligence.LoadTable(typeof(System_Social_User2Protocol));
                ContactContainer = (Table<System_Social_ContactContainer>)CoreIntelligence.RepositoryIntelligence.LoadTable(typeof(System_Social_ContactContainer));
                ContactContainer2ContactProvider = (Table<System_Social_ContactContainer2ContactProvider>)CoreIntelligence.RepositoryIntelligence.LoadTable(typeof(System_Social_ContactContainer2ContactProvider));

                try
                {
                    if (User2Protocol.Count() == 0)
                    {
                        System_Social_User2Protocol usr2prot = new System_Social_User2Protocol();
                        usr2prot.NetworkName = "XfireProtocolES";
                        usr2prot.User = "marco.klein";
                        User2Protocol.InsertOnSubmit(usr2prot);
                        CoreIntelligence.RepositoryIntelligence.SubmitChanges();
                    }
                }
                catch (Exception)
                {

                }
            }
            catch (Exception) { }

            loadContacts();
        }
开发者ID:Hobart2967,项目名称:EasySocial,代码行数:39,代码来源:SocialIntelligence.cs

示例8: UserMangementViewModel

 public UserMangementViewModel()
 {
     if (IsInDesignMode)
         return;
     Users = new AsyncObservableCollection<User>();
     InitializeMessageHandlers();
 }
开发者ID:PkInfRemi,项目名称:FaceDetectionApp,代码行数:7,代码来源:UserMangementViewModel.cs

示例9: CopyFiles

 private void CopyFiles(object o)
 {
     AsyncObservableCollection<FileItem> items = o as AsyncObservableCollection<FileItem>;
     items = new AsyncObservableCollection<FileItem>(items.Where(file => file.IsChecked));
     dlg.MaxValue = items.Count;
     int i = 0;
     foreach (var fileItem in items)
     {
         dlg.Progress = i;
         dlg.ImageSource = fileItem.Thumbnail;
         dlg.Label = Path.GetFileName(fileItem.FileName);
         if (File.Exists(fileItem.FileName))
         {
             try
             {
                 File.Copy(fileItem.FileName, Path.Combine(destfolder, Path.GetFileName(fileItem.FileName)), true);
             }
             catch (Exception exception)
             {
                 Log.Error("ErrorCopy file", exception);
             }
         }
         //Thread.Sleep(100);
         i++;
     }
     dlg.Hide();
 }
开发者ID:kwagalajosam,项目名称:digiCamControl,代码行数:27,代码来源:ExportToFolder.cs

示例10: TranslationManager

        static TranslationManager()
        {
            AvailableLangs = new AsyncObservableCollection<TranslationLangDesc>();
              try
              {
            _path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string[] files = Directory.GetFiles(Path.Combine(_path, "Languages"));
            foreach (string file in files)
            {
              try
              {
            CultureInfo cult = CultureInfo.GetCultureInfo(Path.GetFileNameWithoutExtension(file).Replace('_','-'));
              AvailableLangs.Add(new TranslationLangDesc()
                                     {
                                         Value = Path.GetFileNameWithoutExtension(file),
                                         Name = cult.EnglishName + " - " + cult.NativeName
                                     });
              }
              catch (Exception exception)
              {
            Log.Error("Error loading language", exception);
              }
            }
              }
              catch (Exception)
              {

              }
        }
开发者ID:brunoklein99,项目名称:nikon-camera-control,代码行数:29,代码来源:TranslationManager.cs

示例11: DownloadManagerViewModel

        public DownloadManagerViewModel()
        {
            _downloadsSemaphore = new FifoSemaphore(Properties.Settings.Default.MaxParallelDownloads);

            var olderDownloads = new List<DownloadViewModel>();

            ServiceLocator.Instance.GetService<ILibraryManager>().UpdateScrapersList(ScraperLoader.Instance.AllScrapers);

            foreach (DownloadedChapterInfo chapterInfo in ServiceLocator.Instance.GetService<ILibraryManager>().GetDownloads())
            {
                var downloadViewModel = new DownloadViewModel(chapterInfo, _downloadsSemaphore);

                downloadViewModel.RemoveFromCollection += DownloadViewModel_RemoveFromCollection;
                downloadViewModel.DownloadStarted += DownloadViewModel_DownloadStarted;

                olderDownloads.Add(downloadViewModel);
            }

            Downloads = new AsyncObservableCollection<DownloadViewModel>(olderDownloads);
            _downloadsCollectionView = (ListCollectionView) CollectionViewSource.GetDefaultView(Downloads);
            _downloadsCollectionView.CustomSort = new DownloadAgeComparer();

            // init filter
            SelectedTabIndex = Properties.Settings.Default.SelectedDownloadsTab;
        }
开发者ID:blacker-cz,项目名称:MangaScraper,代码行数:25,代码来源:DownloadManagerViewModel.cs

示例12: StaticHelper

 public StaticHelper()
 {
     SystemMessage = "";
     _timer.Elapsed += _timer_Elapsed;
     _timer.Start();
     Messages = new AsyncObservableCollection<string>();
 }
开发者ID:CadeLaRen,项目名称:digiCamControl,代码行数:7,代码来源:StaticHelper.cs

示例13: BraketingClass

 public BraketingClass()
 {
     IsBusy = false;
     ExposureValues = new AsyncObservableCollection<string>();
     ShutterValues = new AsyncObservableCollection<string>();
     PresetValues = new AsyncObservableCollection<string>();
     Mode = 0;
 }
开发者ID:brunoklein99,项目名称:nikon-camera-control,代码行数:8,代码来源:BraketingClass.cs

示例14: Init

        // -----------------------------------------------------------------------------------
        internal void Init(MainWindow main)
        {
            View = main;

            MessageList = new AsyncObservableCollection<LogMessage>();
            AttachEvents();
            DoBinding();
        }
开发者ID:RS2projekat,项目名称:guesstheword,代码行数:9,代码来源:MainController.cs

示例15: PluginCondition

 public PluginCondition()
 {
     OperatorList = new AsyncObservableCollection<string>() {"AND", "OR"};
     ConditionList = new AsyncObservableCollection<string>() { ">=","<=","!=","=","<",">","%"};
     ValueList = new AsyncObservableCollection<string>();
     Operator = "AND";
     Condition = "=";
 }
开发者ID:CadeLaRen,项目名称:digiCamControl,代码行数:8,代码来源:PluginCondition.cs


注:本文中的AsyncObservableCollection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。