From ea86488e44cf0ceefe1cc30510fdafe1a9dc838a Mon Sep 17 00:00:00 2001 From: mjjo Date: Thu, 2 Oct 2014 09:04:13 +0000 Subject: [PATCH] --- Form1.Designer.cs | 64 +++++++++++++++++ Form1.cs | 58 +++++++++++++++ Form1.resx | 120 +++++++++++++++++++++++++++++++ Program.cs | 21 ++++++ Properties/AssemblyInfo.cs | 36 ++++++++++ Properties/Resources.Designer.cs | 71 ++++++++++++++++++ Properties/Resources.resx | 117 ++++++++++++++++++++++++++++++ Properties/Settings.Designer.cs | 30 ++++++++ Properties/Settings.settings | 7 ++ WebChecker.csproj | 89 +++++++++++++++++++++++ WebChecker.sln | 20 ++++++ 11 files changed, 633 insertions(+) create mode 100644 Form1.Designer.cs create mode 100644 Form1.cs create mode 100644 Form1.resx create mode 100644 Program.cs create mode 100644 Properties/AssemblyInfo.cs create mode 100644 Properties/Resources.Designer.cs create mode 100644 Properties/Resources.resx create mode 100644 Properties/Settings.Designer.cs create mode 100644 Properties/Settings.settings create mode 100644 WebChecker.csproj create mode 100644 WebChecker.sln diff --git a/Form1.Designer.cs b/Form1.Designer.cs new file mode 100644 index 0000000..d0381f7 --- /dev/null +++ b/Form1.Designer.cs @@ -0,0 +1,64 @@ +namespace WebChecker +{ + partial class Form1 + { + /// + /// 필수 디자이너 변수입니다. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 사용 중인 모든 리소스를 정리합니다. + /// + /// 관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다. + protected override void Dispose(bool disposing) + { + if(disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form 디자이너에서 생성한 코드 + + /// + /// 디자이너 지원에 필요한 메서드입니다. + /// 이 메서드의 내용을 코드 편집기로 수정하지 마십시오. + /// + private void InitializeComponent() + { + this.Process = new System.Windows.Forms.CheckBox(); + this.SuspendLayout(); + // + // Process + // + this.Process.Appearance = System.Windows.Forms.Appearance.Button; + this.Process.AutoSize = true; + this.Process.Location = new System.Drawing.Point(90, 61); + this.Process.Name = "Process"; + this.Process.Size = new System.Drawing.Size(62, 22); + this.Process.TabIndex = 0; + this.Process.Text = "Process"; + this.Process.UseVisualStyleBackColor = true; + this.Process.CheckedChanged += new System.EventHandler(this.Process_CheckedChanged); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(284, 262); + this.Controls.Add(this.Process); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.CheckBox Process; + } +} + diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..548513c --- /dev/null +++ b/Form1.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace WebChecker +{ + public partial class Form1 : Form + { + WebBrowser wb = new WebBrowser(); + string url = "http://me.sayclub.com/profile/home/view/ban8"; + Timer m_Timer = new Timer(); + + public Form1() + { + InitializeComponent(); + + m_Timer.Interval = 5000; + m_Timer.Tick += new EventHandler(m_Timer_Tick); + + wb.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(wb_DocumentCompleted); + } + + void wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) + { + HtmlDocument doc = wb.Document; + HtmlElement element = doc.GetElementById("sbVisitedUser"); + string strCnt = (string)element.InnerText.Clone(); + + strCnt = strCnt.Substring(0, strCnt.IndexOf("명")); + strCnt = strCnt.Substring(strCnt.IndexOf("오늘")+"오늘".Length); + strCnt = strCnt.Trim(); + + int iCnt = Convert.ToInt32(strCnt); + + if(iCnt > 3) + MessageBox.Show(iCnt + "명 : 확인해바라"); + } + + void m_Timer_Tick(object sender, EventArgs e) + { + if(wb.IsBusy == false) + wb.Navigate(url); + } + + private void Process_CheckedChanged(object sender, EventArgs e) + { + if(Process.Checked == true) + m_Timer.Start(); + else + m_Timer.Stop(); + } + } +} diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..ff31a6d --- /dev/null +++ b/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..9f1f945 --- /dev/null +++ b/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace WebChecker +{ + static class Program + { + /// + /// 해당 응용 프로그램의 주 진입점입니다. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4217583 --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 어셈블리의 일반 정보는 다음 특성 집합을 통해 제어됩니다. +// 어셈블리와 관련된 정보를 수정하려면 +// 이 특성 값을 변경하십시오. +[assembly: AssemblyTitle("WebChecker")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WebChecker")] +[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 +// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 +// 해당 형식에 대해 ComVisible 특성을 true로 설정하십시오. +[assembly: ComVisible(false)] + +// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. +[assembly: Guid("d439367f-9664-499c-b286-25d64754a6b8")] + +// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다. +// +// 주 버전 +// 부 버전 +// 빌드 번호 +// 수정 버전 +// +// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 버전이 자동으로 +// 지정되도록 할 수 있습니다. +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..06e95d8 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 이 코드는 도구를 사용하여 생성되었습니다. +// 런타임 버전:2.0.50727.5477 +// +// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면 +// 이러한 변경 내용이 손실됩니다. +// +//------------------------------------------------------------------------------ + +namespace WebChecker.Properties +{ + + + /// + /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다. + /// + // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder + // 클래스에서 자동으로 생성되었습니다. + // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 + // ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 이 클래스에서 사용한 캐시된 ResourceManager 인스턴스를 반환합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WebChecker.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대한 현재 스레드의 CurrentUICulture + /// 속성을 재정의합니다. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..702a5d5 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:2.0.50727.5477 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WebChecker.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/WebChecker.csproj b/WebChecker.csproj new file mode 100644 index 0000000..7312817 --- /dev/null +++ b/WebChecker.csproj @@ -0,0 +1,89 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {E4C4528C-6CCF-44EF-8A3C-96BBFFBA12FA} + WinExe + Properties + WebChecker + WebChecker + v3.5 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff --git a/WebChecker.sln b/WebChecker.sln new file mode 100644 index 0000000..39d7123 --- /dev/null +++ b/WebChecker.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebChecker", "WebChecker.csproj", "{E4C4528C-6CCF-44EF-8A3C-96BBFFBA12FA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E4C4528C-6CCF-44EF-8A3C-96BBFFBA12FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E4C4528C-6CCF-44EF-8A3C-96BBFFBA12FA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E4C4528C-6CCF-44EF-8A3C-96BBFFBA12FA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E4C4528C-6CCF-44EF-8A3C-96BBFFBA12FA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal