C# Class WritersBattleField.ViewModel.WritersBattleFieldViewModel

執筆空間のViewModel
Inheritance: INotifyPropertyChanged
Mostrar archivo Open project: kienaiProject/ArtOfWords Class Usage Examples

Public Properties

Property Type Description
CurrentMarkingLayerViewModel WritersBattleField.ViewModel.MarkingLayer.MarkingLayerViewModelBase

Public Methods

Method Description
AddMarkAt ( Point pos ) : bool

X,Y座標にMarkを追加する

CalculatePageNumber ( ) : void

ページ数を計算する

DeleteMark ( Mark mark ) : void

Markを削除する

GetHeadIndexOfVisibleText ( ) : int

表示されている領域の中で先頭の文字Indexを取得する

GetIndexFromPosition ( Point pos ) : int

X、Y座標から文字Indexを取得する

GetMarkFromIndex ( int index ) : Mark

文字Indexからそれに対応するMarkを取得する

GetMarkFromPosition ( Point point ) : Mark

X,Y座標からMarkを取得する

GetMarkablesOnMode ( ) : ICollection

マーキング可能なオブジェクトのコレクションを返す

GetRectOfCharIndex ( int headIndex, int tailIndex ) : List

文字Indexの範囲を含むRectを取得する

文字の途中で改行されることもあるのでList型。二行に渡る場合は二個のRectが入る

GetTailIndexOfLineByIndex ( int index ) : int

ある文字が存在する行の末尾の文字Indexを取得する

GetTailIndexOfVisibleText ( ) : int

表示されている領域の中で末尾の文字Indexを取得する

Initialize ( WritersBattleFieldView view ) : void

執筆Viewを初期化する

MoveLineAt ( int line ) : void

行を移動する

OnEditor_TextSearchOccured ( object sender, TextSearchEventArgs arg ) : void

テキストサーチが始まったときのイベント

OnTextRegionScrolled ( ) : void

テキスト領域がスクロールされたときのイベント

OnWindowActivated ( ) : void

WindowがActivateしたときのイベント

PrepareForMark ( ) : void

マークを描画するための準備をします(高速化のためのキャッシュ化)

SetTextToModelsComposite ( ) : void

執筆TextBoxに書かれたTextをModelsCompositeに設定する

このようにBindingせずに明示的にModelと分離しているのは、 パフォーマンスの理由による

Protected Methods

Method Description
OnPropertyChanged ( string name ) : void

Private Methods

Method Description
DoUseMarkingLayer ( ) : bool

マーキングレイヤーを表示するモードかどうか判定する

GetMarkKindEnum ( ) : MarkKindEnums

ModeからMarkKindを取得する

OnMoveDocumentIndex ( object obj, MoveDocumentIndexEventArgs args ) : void

検索とか置換でドキュメントが変化したときのイベント

OnReplaceWordEvent ( object sender, ReplaceWordEventArgs arg ) : void

置換が発生した時のイベント

ReplaceOneWord ( string from, int index, bool doDelete ) : void

テキストを置換する

Method Details

AddMarkAt() public method

X,Y座標にMarkを追加する
public AddMarkAt ( Point pos ) : bool
pos Point X,Y座標
return bool

CalculatePageNumber() public method

ページ数を計算する
public CalculatePageNumber ( ) : void
return void

DeleteMark() public method

Markを削除する
public DeleteMark ( Mark mark ) : void
mark ModernizedAlice.ArtOfWords.BizCommon.Model.Marks.Mark 削除するMark
return void

GetHeadIndexOfVisibleText() public method

表示されている領域の中で先頭の文字Indexを取得する
public GetHeadIndexOfVisibleText ( ) : int
return int

GetIndexFromPosition() public method

X、Y座標から文字Indexを取得する
public GetIndexFromPosition ( Point pos ) : int
pos Point X、Y座標
return int

GetMarkFromIndex() public method

文字Indexからそれに対応するMarkを取得する
public GetMarkFromIndex ( int index ) : Mark
index int 文字Index
return ModernizedAlice.ArtOfWords.BizCommon.Model.Marks.Mark

GetMarkFromPosition() public method

X,Y座標からMarkを取得する
public GetMarkFromPosition ( Point point ) : Mark
point Point X、Y座標
return ModernizedAlice.ArtOfWords.BizCommon.Model.Marks.Mark

GetMarkablesOnMode() public method

マーキング可能なオブジェクトのコレクションを返す
public GetMarkablesOnMode ( ) : ICollection
return ICollection

GetRectOfCharIndex() public method

文字Indexの範囲を含むRectを取得する
文字の途中で改行されることもあるのでList型。二行に渡る場合は二個のRectが入る
public GetRectOfCharIndex ( int headIndex, int tailIndex ) : List
headIndex int 先頭Index
tailIndex int 末尾Index
return List

GetTailIndexOfLineByIndex() public method

ある文字が存在する行の末尾の文字Indexを取得する
public GetTailIndexOfLineByIndex ( int index ) : int
index int 文字Index
return int

GetTailIndexOfVisibleText() public method

表示されている領域の中で末尾の文字Indexを取得する
public GetTailIndexOfVisibleText ( ) : int
return int

Initialize() public method

執筆Viewを初期化する
public Initialize ( WritersBattleFieldView view ) : void
view WritersBattleField.View.WritersBattleFieldView 対応するビュー
return void

MoveLineAt() public method

行を移動する
public MoveLineAt ( int line ) : void
line int 移動先の行番号
return void

OnEditor_TextSearchOccured() public method

テキストサーチが始まったときのイベント
public OnEditor_TextSearchOccured ( object sender, TextSearchEventArgs arg ) : void
sender object
arg ModernizedAlice.IPlugin.ModuleInterface.TextSearchEventArgs
return void

OnPropertyChanged() protected method

protected OnPropertyChanged ( string name ) : void
name string
return void

OnTextRegionScrolled() public method

テキスト領域がスクロールされたときのイベント
public OnTextRegionScrolled ( ) : void
return void

OnWindowActivated() public method

WindowがActivateしたときのイベント
public OnWindowActivated ( ) : void
return void

PrepareForMark() public method

マークを描画するための準備をします(高速化のためのキャッシュ化)
public PrepareForMark ( ) : void
return void

SetTextToModelsComposite() public method

執筆TextBoxに書かれたTextをModelsCompositeに設定する
このようにBindingせずに明示的にModelと分離しているのは、 パフォーマンスの理由による
public SetTextToModelsComposite ( ) : void
return void

Property Details

CurrentMarkingLayerViewModel public_oe property

マーキングレイヤーのViewModel
public MarkingLayerViewModelBase,WritersBattleField.ViewModel.MarkingLayer CurrentMarkingLayerViewModel
return WritersBattleField.ViewModel.MarkingLayer.MarkingLayerViewModelBase