Develop and Download Open Source Software

Browse Subversion Repository

Contents of /OpenLiveFromURLWindow.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (show annotations) (download)
Sun Jan 16 06:24:15 2011 UTC (13 years, 3 months ago) by aqua877
File size: 1321 byte(s)
First commit.
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 using System.Text.RegularExpressions;
10
11 namespace Aqua877.WinApp.IronLivetube
12 {
13 public partial class OpenLiveFromURLWindow : Form
14 {
15 public OpenLiveFromURLWindow()
16 {
17 InitializeComponent();
18 }
19
20 private void OpenLiveButton_Click(object sender, EventArgs e)
21 {
22 if (this.LiveUrlTextBox.Text == "")
23 {
24 this.ErrorMessageTextBox.Visible = true;
25 this.ErrorMessageTextBox.Text = " URLが入力されていません。";
26 return;
27 }
28
29 Uri _ = null;
30 if (!Uri.TryCreate(this.LiveUrlTextBox.Text, UriKind.Absolute, out _))
31 {
32 this.ErrorMessageTextBox.Visible = true;
33 this.ErrorMessageTextBox.Text = " 正しい形式のURLを入力してください";
34 }
35 else if (!Regex.IsMatch(this.LiveUrlTextBox.Text, GlobalValues.LiveUrlPattern))
36 {
37 this.ErrorMessageTextBox.Visible = true;
38 this.ErrorMessageTextBox.Text = " Livetube配信へのURLの形式が正しくありません。";
39 }
40 else
41 {
42 this.Tag = this.LiveUrlTextBox.Text;
43 this.DialogResult = System.Windows.Forms.DialogResult.OK;
44 this.Close();
45 }
46 }
47 }
48 }

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