コード例 #1
0
        //private PanelCommandFileSystemSecurity command_security = new PanelCommandFileSystemSecurity();

        public DirectoryList(int sort_index, bool sort_reverse, string directory_path)
            : base(sort_index, sort_reverse)
        {
            this.directory_path = directory_path;
            internal_comparer   = new InternalComparer(sort_index, sort_reverse);
            internal_list       = new SortedList <WIN32_FIND_DATA, object>(internal_comparer);

            //set notification
            internal_watcher.IncludeSubdirectories = false;
            internal_watcher.NotifyFilter          =
                NotifyFilters.Attributes |
                NotifyFilters.DirectoryName |
                NotifyFilters.FileName |
                NotifyFilters.Size;
            internal_watcher.Changed += new FileSystemEventHandler(internal_watcher_Changed);
            internal_watcher.Renamed += new RenamedEventHandler(internal_watcher_Renamed);
            internal_watcher.Created += new FileSystemEventHandler(internal_watcher_Created);
            internal_watcher.Deleted += new FileSystemEventHandler(internal_watcher_Deleted);
            internal_watcher.Error   += new ErrorEventHandler(internal_watcher_Error);

            //add panel commands
            AvailableCommands.Add(command_show_afs);
            AvailableCommands.Add(command_touch);
            AvailableCommands.Add(command_attributes);
            AvailableCommands.Add(command_delete);
            AvailableCommands.Add(command_copy);
            AvailableCommands.Add(command_move);
            AvailableCommands.Add(command_create_dir);
            //AvailableCommands.Add(command_browse_streams);
            AvailableCommands.Add(command_fileinfo);
            //AvailableCommands.Add(command_security);
        }
コード例 #2
0
        public FileCollectionBase(int sort_criteria_index, bool sort_reverse)
        {
            sort_current      = sort_criteria_index;
            this.sort_reverse = sort_reverse;

            AvailableCommands.Add(command_add_short);
            AvailableCommands.Add(command_add_long);
        }
コード例 #3
0
        public ProcessList(int sort_index, bool sort_reverse, string computer_name)
            : base(sort_index, sort_reverse)
        {
            internal_comparer = new InternalComparer(sort_index, sort_reverse);
            intern_list       = new List <Process>();
            comp_name         = computer_name;

            AvailableCommands.Add(cmd_process_info);
            AvailableCommands.Add(cmd_terminate);
        }
コード例 #4
0
 public CommerceState()
     : base()
 {
     AvailableCommands.Add("go", new MoveCommand());
     AvailableCommands.Add("buy", new BuyCommand());
     AvailableCommands.Add("sell", new SellCommand());
     AvailableCommands.Add("move", new MoveCommand());
     AvailableCommands.Add("look", new LookCommand());
     AvailableCommands.Add("list", new ListItemCommand());
 }
コード例 #5
0
        public HelpViewModel(IEnumerable <Framework.ModuleBase> modules)
        {
            CommandText = string.Empty;
            _modules    = new List <Framework.ModuleBase>(modules);

            AvailableCommands = modules
                                .Select(module => module.ModuleCommand)
                                .ToList();

            AvailableCommands.Add(back);

            SelectedIndex = 0;
        }
コード例 #6
0
        public FtpDirectoryList(int sort_criteria, bool sort_reverse, FtpConnection connection)
            : base(sort_criteria, sort_reverse)
        {
            internal_comparer       = new InternalComparer(sort_criteria, sort_reverse);
            internal_list           = new SortedList <FtpEntryInfo, object>(internal_comparer);
            internal_conection      = connection;
            internal_directory_path = string.Empty;

            AvailableCommands.Add(command_download);
            AvailableCommands.Add(command_delete);
            AvailableCommands.Add(command_create_dir);

            internal_conection.ForceUpdate += new EventHandler(internal_conection_ForceUpdate);
        }
コード例 #7
0
        public ZipDirectory(string file_name, int sort_criteria, bool reverse)
            : base(sort_criteria, reverse)
        {
            zip_file_name   = file_name;
            zip_virtual_dir = string.Empty;
            if (zip_file == null)
            {
                zip_file = new ZipFile(zip_file_name);
                zip_file.KeysRequired = new ZipFile.KeysRequiredEventHandler(keys_required_callback);
            }
            internal_comparer = new InternalComparer(sort_criteria, reverse, zip_file);
            internal_list     = new SortedList <string, object>(internal_comparer);

            AvailableCommands.Add(command_extract);
            AvailableCommands.Add(command_create_dir);
            AvailableCommands.Add(command_del);
        }
コード例 #8
0
 public MovementState() : base()
 {
     AvailableCommands.Add("go", new MoveCommand());
     AvailableCommands.Add("move", new MoveCommand());
     AvailableCommands.Add("quit", new QuitCommand());
     AvailableCommands.Add("look", new LookCommand());
     AvailableCommands.Add("unlock", new UnlockCommand());
     AvailableCommands.Add("attack", new AttackCommand());
     AvailableCommands.Add("list", new ListItemCommand());
     AvailableCommands.Add("inventory", new ListItemCommand());
     AvailableCommands.Add("grab", new PickUpCommand());
     AvailableCommands.Add("get", new PickUpCommand());
     AvailableCommands.Add("pickup", new PickUpCommand());
     AvailableCommands.Add("drop", new DropCommand());
     AvailableCommands.Add("flee", new FleeCommand());
     AvailableCommands.Add("equip", new EquipCommand());
     AvailableCommands.Add("unequip", new UnequipCommand());
 }
コード例 #9
0
        private void init_commands()
        {
            //AvailableCommands.Add(command_add_connection);

            AvailableCommands.Add(command_server_info);
        }