Exemple #1
0
 /// <summary>
 /// ファイルリストで選択中のフォルダまたはファイルの、選択中イベントを発生させます
 ///
 /// </summary>
 public void RaiseSelectingEvent(string path)
 {
     if (FileUtils.IsFile(path))
     {
         //ファイルの場合、ファイル選択イベントを発生させます
         var param = new FileSelectingEventParam {
             Path = path
         };
         _pluginManager.GetEventManager().RaiseEvent(FileSelectingEventParam.Name, this, param);
     }
     else
     {
         //フォルダの場合、フォルダ選択イベントを発生させます
         var param = new DirSelectingEventParam {
             Path = path
         };
         _pluginManager.GetEventManager().RaiseEvent(DirSelectingEventParam.Name, this, param);
     }
 }
Exemple #2
0
        /// <summary>
        /// グリッドの選択しているセルが変更された時のイベント
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void grid_SelectionChanged(object sender, EventArgs e)
        {
            if (_grid.CurrentCell == null)
            {
                return;                                     //カレントセルが未設定の場合は処理しない
            }
            if (_grid.CurrentCell.RowIndex == -1)
            {
                return;                                     //ヘッダーダブルクリックは無視する
            }
            {
                //選択行のIDを取得します
                int id = GetSelectedID();
                if (id >= 1)
                {
                    //ファイル情報選択中イベントを発生させます
                    var param = new FileInfoSelectingEventParam {
                        ID = id.ToString()
                    };
                    _pluginManager.GetEventManager().RaiseEvent(FileInfoSelectingEventParam.Name, _plugin, param);
                }
            }

            {
                //選択行のパスを取得します
                var path = GetSelectedPath();
                if (StringUtils.IsNotEmpty(path))
                {
                    //ファイル選択中イベントを発生させます
                    var param = new FileSelectingEventParam {
                        Path = path
                    };
                    _pluginManager.GetEventManager().RaiseEvent(FileSelectingEventParam.Name, _plugin, param);
                }
            }
        }