/// <summary> /// X2chServerTracerクラスのインスタンスを初期化 /// </summary> public X2chServerTracer() { // // TODO: コンストラクタ ロジックをここに追加してください。 // traceList = new BoardInfoCollection(); result = null; }
public void TraceFrom2ch(BoardInfoCollection oldBoards) { BoardTraceEventArgs e = new BoardTraceEventArgs(); OnBoardTraced(e); }
public void SetPattern(PatrolPattern source) { Name = source.Name; currentPattern = source; currentBoards = source.TargetBoards; targetBoardsListBox.Items.AddRange(currentBoards.ToArray()); //targetBoardsListBox.DisplayMember = "Name"; //boardsTextBox.Source = currentBoards; SetParameters(source.Pattern, source.NGPattern, //source.IsIgnorePattern, source.SubFolderFormat, source.Name, source.EnableJpg, source.EnablePng, source.EnableGif, source.EnableBmp, source.EnableZip); }
public void SetBoards(BoardInfoCollection boards) { currentBoards = boards; }
private void OnDeserialized(StreamingContext sc) { if (targetBoardInfo != null) { targetBoards = new BoardInfoCollection(); targetBoards.Add(targetBoardInfo); targetBoardInfo = null; } }
public void Initialize(BoardInfoCollection targetBoards, string pattern, string ngPattern, //bool isIgnorePattern, bool jpg, bool png, bool gif, bool bmp, bool zip, string name, string subFolderFormat) { //if (initialized)編集のときプロパティを効率よく書き換えるのに使用される //{ // return; //} if (targetBoards == null) { throw new ArgumentNullException("targetBoard"); } //if (targetBoard == BoardInfo.Empty) //{ // throw new ArgumentException("板情報を空にできません。"); //} if (string.IsNullOrWhiteSpace(pattern)) { throw new ArgumentException("キーワードの項目を空にできません。"); } if (string.IsNullOrWhiteSpace(name)) { throw new ArgumentException("名前の項目を空にできません。"); } if (!jpg && !png && !gif && !bmp && !zip) { throw new ArgumentException("ダウンロードする拡張子を選択してください。"); } TargetBoards = targetBoards; Pattern = pattern; NGPattern = ngPattern; //IsIgnorePattern = isIgnorePattern; OnPatternChanged(EventArgs.Empty); enableJpg = jpg; enablePng = png; enableGif = gif; enableBmp = bmp; enableZip = zip; OnExtensionEnableChanged(EventArgs.Empty); this.name = name; SubFolderFormat = subFolderFormat; initialized = true; }
//public string SaveFolderByFormat //{ // get // { // return CreatesSubFolder ? // Path.Combine(parentFolder.LocalPath, SubFolderFormat) : parentFolder.LocalPath; // } //} public object Clone() { object clonedPattern = MemberwiseClone(); BoardInfoCollection clonedBoards = new BoardInfoCollection(); foreach (BoardInfo board in TargetBoards) { clonedBoards.Add(board); } ((PatrolPattern)clonedPattern).TargetBoards = clonedBoards; return clonedPattern; }