Develop and Download Open Source Software

Browse Subversion Repository

Contents of /FindWindow.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Sun Jan 16 11:46:21 2011 UTC (13 years, 3 months ago) by aqua877
File size: 1571 byte(s)
Fixed bug for posting comment.
Implemented find window.
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Data;
5 using System.Drawing;
6 using System.Linq;
7 using System.Text;
8 using System.Windows.Forms;
9
10 namespace Aqua877.WinApp.IronLivetube
11 {
12 public struct FindConditionsData
13 {
14 public string Pattern { get; set; }
15 public bool IgnoreCase { get; set; }
16 public bool IsUseRegex { get; set; }
17 }
18
19 public partial class FindWindow : Form
20 {
21 private FindConditionsData _FindConditions;
22
23 public event Action OnFindConditionsChanged;
24
25 public FindWindow()
26 {
27 this.InitializeComponent();
28 }
29
30 public FindConditionsData FindConditions
31 {
32 get
33 {
34 return this._FindConditions;
35 }
36 set
37 {
38 this._FindConditions = value;
39 }
40 }
41
42 private void FindNextButton_Click(object sender, EventArgs e)
43 {
44 if (this.FindPatternTextBox.Text.Trim() == "")
45 {
46 this.FindErrorLabel.Visible = true;
47 this.FindErrorLabel.Text = " 検索する文字列を入力してください";
48 return;
49 }
50 else
51 {
52 this._FindConditions.Pattern = this.FindPatternTextBox.Text;
53 this.OnFindConditionsChanged();
54 this.Close();
55 }
56 }
57
58 private void IsIgnoreCaseCheckBox_CheckedChanged(object sender, EventArgs e)
59 {
60 this._FindConditions.IgnoreCase = this.IsIgnoreCaseCheckBox.Checked;
61 }
62
63 private void IsFindWithRegularExpressionsCheckBox_CheckedChanged(object sender, EventArgs e)
64 {
65 this._FindConditions.IsUseRegex = this.IsFindWithRegularExpressionsCheckBox.Checked;
66 }
67 }
68 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26