public CardTypeTab(TabControl tabControl, MsgObject.Action saveMsg) { uiContext = SynchronizationContext.Current; watcher = new FileSystemWatcher(); Categories = new ObservableSortedDictionary <string, Category>(); Enabled.Value = Visibility.Collapsed; this.tabControl = tabControl; this.saveMsg = saveMsg; }
void UseCard(RoutedEventArgs e, MsgObject.Action action) { var thumb = (Thumbnail)(e.Source as MenuItem).DataContext; RPCClient_UI.SendMessage(MsgObject.Create(action, Id, thumb.Path)); }