private void bookFolderTreeView_MouseUp(object sender, MouseButtonEventArgs e)
        {
            // 중복 선택의 경우 다시 로드 안하는 코드

            if (bookFolderTreeView_.SelectedItem == null)
            {
                return; // return if there's no row selected
            }
            BookViewModel bvm = this.bookFolderTreeView_.SelectedItem as BookViewModel;

            //현재 List에 있는 상품들에 대해서 eventList를 가져옴.
            //bvm.loadMasterInformation();
            //bvm.refreshInstrument();
            ObservableCollection <EventViewModel> e_vmList = new ObservableCollection <EventViewModel>();

            //EventViewModel e1 = new EventViewModel();

            //e_vmList.Add(new EventViewModel());
            //e_vmList.Add(new EventViewModel());

            bvm.getEventList(e_vmList, false);

            this.eventListListView_.ItemsSource = e_vmList;

            selectedFolder_    = bvm;
            selectedViewModel_ = this.rootBookViewModel_;

            //this.rootBookViewModel_.clearSelection();
            //this.bookFolderTreeView_.Items.Refresh();

            // do something with the Selected row here
        }
コード例 #2
0
 /// <summary>
 /// Unregisters the specified file action.
 /// </summary>
 /// <param name="fileAction">File action, which should be unregistered.</param>
 public static void UnregisterFileAction(IFileAction fileAction)
 {
     if (fileAction != null)
     {
         sRegisteredFileActions.Remove(fileAction);
     }
 }
コード例 #3
0
 /// <summary>
 /// Registers a file action.
 /// </summary>
 /// <param name="fileAction">File action to be registered.</param>
 public static void RegisterFileAction(IFileAction fileAction)
 {
     if (fileAction != null)
     {
         sRegisteredFileActions.Add(fileAction);
     }
 }
コード例 #4
0
ファイル: Client.cs プロジェクト: j2ghz/A417Sync
 private async Task AddActionAsync(
     IFileAction action,
     ObservableCollection <IFileAction> actions,
     long sizeToDownload)
 {
     this.Model.BytesToDownload += sizeToDownload;
     await Application.Current.Dispatcher.InvokeAsync(() => actions.Add(action), DispatcherPriority.Background);
 }
コード例 #5
0
ファイル: SaveCommand.cs プロジェクト: zsuzitor/pass_code
 public SaveCommand(IWordContainer container, ICoder coder,
                    IAppSettings appSettings, IFileAction fileAction)
 {
     _customName  = "save";
     _container   = container;
     _coder       = coder;
     _appSettings = appSettings;
     _fileAction  = fileAction;
 }
コード例 #6
0
 public FileLoaderCommand(IWordContainer container,
                          IFileAction fileAction, ICoder coder, IAppSettings appSettings)
 {
     _customName  = "load";
     _container   = container;
     _fileAction  = fileAction;
     _coder       = coder;
     _appSettings = appSettings;
 }
コード例 #7
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="filePath">File path to the text document.</param>
        /// <param name="occurrences">Search result match occurrences.</param>
        /// <param name="searchQuery">Search query used for retrieving matches.</param>
        public DocumentViewModel(string filePath, ReadOnlyCollection <IOccurrence> occurrences = null, string searchQuery = null, IFileAction fileActionCloseAllButThis = null, IFileAction fileActionCloseAll = null)
        {
            mFilePath = filePath;
            mFileActionCloseAllButThis = fileActionCloseAllButThis;
            mFileActionCloseAll        = fileActionCloseAll;
            mOccurrenceModels          = occurrences;
            mOccurrencesByLine         = occurrences != null?occurrences.ToLookup(occurrence => occurrence.Line) : null;

            if (occurrences != null)
            {
                mOccurrences = new ReadOnlyCollection <OccurrenceViewModel>(occurrences.Select(occurrence => new OccurrenceViewModel(occurrence, null)).ToList());
            }
            SearchQuery = searchQuery;
        }
コード例 #8
0
 /// <summary>
 /// Registers a file action.
 /// </summary>
 /// <param name="actionType">Type of the action to be registered. The type must have a public constructor and must derive from IFileAction.</param>
 public static void RegisterFileAction(Type actionType)
 {
     if (actionType != null && typeof(IFileAction).IsAssignableFrom(actionType))
     {
         try
         {
             IFileAction fileAction = (IFileAction)Activator.CreateInstance(actionType);
             RegisterFileAction(fileAction);
         }
         catch
         {
         }
     }
 }
コード例 #9
0
        private void favoritesListView_MouseUp(object sender, RoutedEventArgs e)
        {
            if (favoritesListView_.SelectedItem == null)
            {
                return; // return if there's no row selected
            }
            FavoriteViewModel fvm = this.favoritesListView_.SelectedItem as FavoriteViewModel;

            //현재 List에 있는 상품들에 대해서 Master를 로드함.
            fvm.loadMasterInformation();

            this.instrumentListListView_.ItemsSource = fvm.InstrumentList_;

            selectedFolder_    = fvm;
            selectedViewModel_ = this.rootFavoriteViewModel_;

            // do something with the Selected row here
        }
コード例 #10
0
        //private void bookFolderTreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        //{
        //    if (this.bookFolderTreeView_.SelectedItem != null)
        //    {
        //        BookViewModel bvm = this.bookFolderTreeView_.SelectedItem as BookViewModel;

        //        this.instrumentListListView_.ItemsSource = bvm.InstrumentList_;

        //        selectedFolder_ = bvm;
        //        selectedViewModel_ = this.rootBookViewModel_;
        //        favoritesListView_.SelectedItem = null;
        //    }
        //}

        //private void favoritesListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        //{
        //    if (this.favoritesListView_.SelectedItem != null)
        //    {
        //        FavoriteViewModel fvm = this.favoritesListView_.SelectedItem as FavoriteViewModel;

        //        this.instrumentListListView_.ItemsSource = fvm.InstrumentList_;

        //        selectedFolder_ = fvm;
        //    }
        //    //selectedViewModel_ = this.rootFavoriteViewModel_;
        //}

        private void bookFolderTreeView_MouseUp(object sender, RoutedEventArgs e)
        {
            // 중복 선택의 경우 다시 로드 안하는 코드

            if (bookFolderTreeView_.SelectedItem == null)
            {
                return; // return if there's no row selected
            }
            BookViewModel bvm = this.bookFolderTreeView_.SelectedItem as BookViewModel;

            //현재 List에 있는 상품들에 대해서 Master를 로드함.
            bvm.loadMasterInformation();
            //bvm.refreshInstrument();

            this.instrumentListListView_.ItemsSource = bvm.InstrumentList_;

            selectedFolder_    = bvm;
            selectedViewModel_ = this.rootBookViewModel_;

            //this.rootBookViewModel_.clearSelection();
            //this.bookFolderTreeView_.Items.Refresh();

            // do something with the Selected row here
        }
        private void bookFolderTreeView_MouseUp(object sender, MouseButtonEventArgs e)
        {
            // 중복 선택의 경우 다시 로드 안하는 코드

            if (bookFolderTreeView_.SelectedItem == null)
                return; // return if there's no row selected

            BookViewModel bvm = this.bookFolderTreeView_.SelectedItem as BookViewModel;

            //현재 List에 있는 상품들에 대해서 eventList를 가져옴.
            //bvm.loadMasterInformation();
            //bvm.refreshInstrument();
            ObservableCollection<EventViewModel> e_vmList = new ObservableCollection<EventViewModel>();

            //EventViewModel e1 = new EventViewModel();
            
            //e_vmList.Add(new EventViewModel());
            //e_vmList.Add(new EventViewModel());

            bvm.getEventList(e_vmList,false);

            this.eventListListView_.ItemsSource = e_vmList;

            selectedFolder_ = bvm;
            selectedViewModel_ = this.rootBookViewModel_;

            //this.rootBookViewModel_.clearSelection();
            //this.bookFolderTreeView_.Items.Refresh();

            // do something with the Selected row here
        }
コード例 #12
0
        private void favoritesListView_MouseUp(object sender, RoutedEventArgs e)
        {
            if (favoritesListView_.SelectedItem == null)
                return; // return if there's no row selected

            FavoriteViewModel fvm = this.favoritesListView_.SelectedItem as FavoriteViewModel;

            //현재 List에 있는 상품들에 대해서 Master를 로드함.
            fvm.loadMasterInformation();

            this.instrumentListListView_.ItemsSource = fvm.InstrumentList_;

            selectedFolder_ = fvm;
            selectedViewModel_ = this.rootFavoriteViewModel_;

            // do something with the Selected row here
        }
コード例 #13
0
        //private void bookFolderTreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        //{
        //    if (this.bookFolderTreeView_.SelectedItem != null)
        //    {
        //        BookViewModel bvm = this.bookFolderTreeView_.SelectedItem as BookViewModel;

        //        this.instrumentListListView_.ItemsSource = bvm.InstrumentList_;

        //        selectedFolder_ = bvm;
        //        selectedViewModel_ = this.rootBookViewModel_;
        //        favoritesListView_.SelectedItem = null;
        //    }
        //}

        //private void favoritesListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        //{
        //    if (this.favoritesListView_.SelectedItem != null)
        //    {
        //        FavoriteViewModel fvm = this.favoritesListView_.SelectedItem as FavoriteViewModel;

        //        this.instrumentListListView_.ItemsSource = fvm.InstrumentList_;

        //        selectedFolder_ = fvm;
        //    }
        //    //selectedViewModel_ = this.rootFavoriteViewModel_;
        //}

        private void bookFolderTreeView_MouseUp(object sender, RoutedEventArgs e)
        {
            // 중복 선택의 경우 다시 로드 안하는 코드

            if (bookFolderTreeView_.SelectedItem == null)
                return; // return if there's no row selected

            BookViewModel bvm = this.bookFolderTreeView_.SelectedItem as BookViewModel;

            //현재 List에 있는 상품들에 대해서 Master를 로드함.
            bvm.loadMasterInformation();
            //bvm.refreshInstrument();
            
            this.instrumentListListView_.ItemsSource = bvm.InstrumentList_;

            selectedFolder_ = bvm;
            selectedViewModel_ = this.rootBookViewModel_;

            //this.rootBookViewModel_.clearSelection();
            //this.bookFolderTreeView_.Items.Refresh();

            // do something with the Selected row here
        }
コード例 #14
0
 private void InitializeOpenDocuments()
 {
     mOpenDocuments             = new ObservableCollection <DocumentViewModel>();
     mCloseAllButThisFileAction = new CodeXCavator.Engine.FileAction("FileActionCloseAllFilesButThis", "Close all files but this", "Closes all opened files but this file.", CanCloseAllFilesButThis, CloseAllFilesButThis);
     mCloseAllFilesAction       = new CodeXCavator.Engine.FileAction("FileActionCloseAll", "Close all files", "Closes all opened files.", CanCloseAllFiles, CloseAllFiles);
 }