本文整理汇总了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>();
}
示例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");
}
}
示例3: Loop
public Loop()
{
Name = "loop";
Description = "execute a subset of commands for loopcount";
DefaultValue = "loop loopcount=\"10\"";
Commands = new AsyncObservableCollection<IScriptCommand>();
}
示例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;
}
示例5: ChatViewModel
public ChatViewModel()
{
TextItems = new AsyncObservableCollection<Chat>();
Message = "";
Commands.SendMessageCommand.CanExecute += (sender, e) => e.CanExecute = true;
Commands.SendMessageCommand.Executed += SendMessageCommand_OnExecuted;
}
示例6: BaseCameraDevice
public BaseCameraDevice()
{
IsChecked = true;
AdvancedProperties = new AsyncObservableCollection<PropertyValue<long>>();
Properties = new AsyncObservableCollection<PropertyValue<long>>();
Capabilities = new List<CapabilityEnum>();
}
示例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();
}
示例8: UserMangementViewModel
public UserMangementViewModel()
{
if (IsInDesignMode)
return;
Users = new AsyncObservableCollection<User>();
InitializeMessageHandlers();
}
示例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();
}
示例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)
{
}
}
示例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;
}
示例12: StaticHelper
public StaticHelper()
{
SystemMessage = "";
_timer.Elapsed += _timer_Elapsed;
_timer.Start();
Messages = new AsyncObservableCollection<string>();
}
示例13: BraketingClass
public BraketingClass()
{
IsBusy = false;
ExposureValues = new AsyncObservableCollection<string>();
ShutterValues = new AsyncObservableCollection<string>();
PresetValues = new AsyncObservableCollection<string>();
Mode = 0;
}
示例14: Init
// -----------------------------------------------------------------------------------
internal void Init(MainWindow main)
{
View = main;
MessageList = new AsyncObservableCollection<LogMessage>();
AttachEvents();
DoBinding();
}
示例15: PluginCondition
public PluginCondition()
{
OperatorList = new AsyncObservableCollection<string>() {"AND", "OR"};
ConditionList = new AsyncObservableCollection<string>() { ">=","<=","!=","=","<",">","%"};
ValueList = new AsyncObservableCollection<string>();
Operator = "AND";
Condition = "=";
}