Changeset 10887 for lang/csharp

Show
Ignore:
Timestamp:
05/01/08 19:23:29 (7 months ago)
Author:
showyou
Message:

tw4wmファイル名一部変更。ユーザ名保存(ただし暗号化してないのでファイルには十分気をつけること)

Location:
lang/csharp/tw4wm/wm6test1
Files:
4 added
4 modified

Legend:

Unmodified
Added
Removed
  • lang/csharp/tw4wm/wm6test1/Form1.Designer.cs

    r10210 r10887  
    3030        private void InitializeComponent() 
    3131        { 
    32             System.Windows.Forms.ListViewItem listViewItem3 = new System.Windows.Forms.ListViewItem(); 
     32            System.Windows.Forms.ListViewItem listViewItem1 = new System.Windows.Forms.ListViewItem(); 
    3333            this.mainMenu1 = new System.Windows.Forms.MainMenu(); 
    3434            this.menuItem1 = new System.Windows.Forms.MenuItem(); 
     
    7979            this.lstMain.Columns.Add(this.chDate); 
    8080            this.lstMain.FullRowSelect = true; 
    81             listViewItem3.Text = "0"; 
    82             listViewItem3.SubItems.Add("1"); 
    83             listViewItem3.SubItems.Add("2"); 
    84             listViewItem3.SubItems.Add("3"); 
    85             this.lstMain.Items.Add(listViewItem3); 
    86             this.lstMain.Location = new System.Drawing.Point(0, 143); 
     81            listViewItem1.Text = "0"; 
     82            listViewItem1.SubItems.Add("1"); 
     83            listViewItem1.SubItems.Add("2"); 
     84            listViewItem1.SubItems.Add("3"); 
     85            this.lstMain.Items.Add(listViewItem1); 
     86            this.lstMain.Location = new System.Drawing.Point(0, 96); 
    8787            this.lstMain.Name = "lstMain"; 
    88             this.lstMain.Size = new System.Drawing.Size(240, 151); 
     88            this.lstMain.Size = new System.Drawing.Size(240, 172); 
    8989            this.lstMain.TabIndex = 11; 
    9090            this.lstMain.View = System.Windows.Forms.View.Details; 
     
    114114            this.tabControl1.Controls.Add(this.tabPage3); 
    115115            this.tabControl1.Dock = System.Windows.Forms.DockStyle.None; 
    116             this.tabControl1.Location = new System.Drawing.Point(0, 121); 
     116            this.tabControl1.Location = new System.Drawing.Point(0, 76); 
    117117            this.tabControl1.Name = "tabControl1"; 
    118118            this.tabControl1.SelectedIndex = 0; 
     
    145145            this.txtMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    146146                        | System.Windows.Forms.AnchorStyles.Right))); 
    147             this.txtMessage.Location = new System.Drawing.Point(1, 68); 
     147            this.txtMessage.BorderStyle = System.Windows.Forms.BorderStyle.None; 
     148            this.txtMessage.Location = new System.Drawing.Point(0, 40); 
    148149            this.txtMessage.Multiline = true; 
    149150            this.txtMessage.Name = "txtMessage"; 
    150151            this.txtMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; 
    151             this.txtMessage.Size = new System.Drawing.Size(237, 50); 
     152            this.txtMessage.Size = new System.Drawing.Size(237, 33); 
    152153            this.txtMessage.TabIndex = 14; 
    153154            //  
     
    155156            //  
    156157            this.lblDate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 
    157             this.lblDate.Location = new System.Drawing.Point(125, 51); 
     158            this.lblDate.Location = new System.Drawing.Point(127, 23); 
    158159            this.lblDate.Name = "lblDate"; 
    159             this.lblDate.Size = new System.Drawing.Size(116, 14); 
     160            this.lblDate.Size = new System.Drawing.Size(110, 15); 
    160161            this.lblDate.TextAlign = System.Drawing.ContentAlignment.TopRight; 
    161162            //  
    162163            // lblName 
    163164            //  
    164             this.lblName.Location = new System.Drawing.Point(3, 51); 
     165            this.lblName.Location = new System.Drawing.Point(3, 24); 
    165166            this.lblName.Name = "lblName"; 
    166167            this.lblName.Size = new System.Drawing.Size(118, 14); 
     
    170171            this.txtSendMessage.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
    171172                        | System.Windows.Forms.AnchorStyles.Right))); 
    172             this.txtSendMessage.Location = new System.Drawing.Point(1, 28); 
     173            this.txtSendMessage.Location = new System.Drawing.Point(0, 0); 
    173174            this.txtSendMessage.Name = "txtSendMessage"; 
    174             this.txtSendMessage.Size = new System.Drawing.Size(181, 21); 
     175            this.txtSendMessage.Size = new System.Drawing.Size(183, 21); 
    175176            this.txtSendMessage.TabIndex = 19; 
    176177            //  
     
    178179            //  
    179180            this.btPost.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 
    180             this.btPost.Location = new System.Drawing.Point(186, 28); 
     181            this.btPost.Location = new System.Drawing.Point(189, 0); 
    181182            this.btPost.Name = "btPost"; 
    182183            this.btPost.Size = new System.Drawing.Size(51, 20); 
     
    190191            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; 
    191192            this.AutoScroll = true; 
    192             this.ClientSize = new System.Drawing.Size(240, 294); 
     193            this.ClientSize = new System.Drawing.Size(240, 268); 
    193194            this.Controls.Add(this.btPost); 
    194195            this.Controls.Add(this.txtSendMessage); 
     
    199200            this.Controls.Add(this.lstMain); 
    200201            this.KeyPreview = true; 
    201             this.Location = new System.Drawing.Point(0, 0); 
    202202            this.Menu = this.mainMenu1; 
    203203            this.Name = "Form1"; 
    204204            this.Text = "Twitter for WM"; 
    205             this.WindowState = System.Windows.Forms.FormWindowState.Maximized; 
    206205            this.Activated += new System.EventHandler(this.Form1_Activated); 
     206            this.Closing += new System.ComponentModel.CancelEventHandler(this.Form1_Closing); 
    207207            this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Form1_KeyDown); 
    208208            this.tabControl1.ResumeLayout(false); 
  • lang/csharp/tw4wm/wm6test1/Form1.cs

    r10210 r10887  
    66using System.Text; 
    77using System.Windows.Forms; 
     8using System.IO; 
     9using System.Diagnostics; 
     10using System.Xml.Serialization; 
    811 
    912namespace wm6test1 
     
    1518        private String m_passwd; 
    1619        private Twitter tw; 
    17         private Form2 loginForm = null; 
     20        private loginForm loginForm = null; 
    1821        public Form1() 
    1922        { 
     
    102105            this.Activated -= new EventHandler(Form1_Activated); 
    103106            //�ȍ~������������e 
    104             loginForm = new Form2(this); 
    105             loginForm.Show(); 
    106             this.Hide();            
     107            //��user�̐ݒ��@�C�����Ȃ��A�����͓ǂݍ��݂Ɏ��s�����ꍇ�A 
     108            //loginForm��� 
     109            bool userLoadFlag = false; 
     110 
     111            try 
     112            { 
     113                XmlSerializer serializer = 
     114                    new XmlSerializer(typeof(Setting)); 
     115                TextReader reader = new StreamReader("setting.txt"); 
     116 
     117                Setting set = new Setting(); 
     118                set = (Setting)serializer.Deserialize(reader); 
     119                reader.Close(); 
     120 
     121                SetAuth(set.user, set.password); 
     122                userLoadFlag = true; 
     123            } 
     124            catch (IOException ioe) 
     125            { 
     126                Debug.WriteLine(ioe.StackTrace); 
     127            } 
     128 
     129            if (userLoadFlag) 
     130            { 
     131                MyRefresh(); 
     132            } 
     133            else 
     134            { 
     135                loginForm = new loginForm(this); 
     136                loginForm.Show(); 
     137                this.Hide(); 
     138            } 
    107139        } 
     140 
     141        private void Form1_Closing(object sender, CancelEventArgs e) 
     142        { 
     143             
     144        } 
     145 
    108146    } 
    109147} 
  • lang/csharp/tw4wm/wm6test1/Properties/AssemblyInfo.cs

    r10857 r10887  
    66// set of attributes. Change these attribute values to modify the information 
    77// associated with an assembly. 
    8 [assembly: AssemblyTitle("wm6test1")] 
     8[assembly: AssemblyTitle("tw4wm")] 
    99[assembly: AssemblyDescription("")] 
    1010[assembly: AssemblyConfiguration("")] 
    1111[assembly: AssemblyCompany("")] 
    12 [assembly: AssemblyProduct("wm6test1")] 
     12[assembly: AssemblyProduct("tw4wm")] 
    1313[assembly: AssemblyCopyright("Copyright ©  2008")] 
    1414[assembly: AssemblyTrademark("")] 
  • lang/csharp/tw4wm/wm6test1/wm6test1.csproj

    r10210 r10887  
    3131    <WarningLevel>4</WarningLevel> 
    3232    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> 
     33    <DocumentationFile> 
     34    </DocumentationFile> 
    3335  </PropertyGroup> 
    3436  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> 
     
    5355  </ItemGroup> 
    5456  <ItemGroup> 
     57    <Compile Include="Setting.cs" /> 
    5558    <Compile Include="Form1.cs"> 
    5659      <SubType>Form</SubType> 
     
    5962      <DependentUpon>Form1.cs</DependentUpon> 
    6063    </Compile> 
    61     <Compile Include="Form2.cs"> 
     64    <Compile Include="loginForm.cs"> 
    6265      <SubType>Form</SubType> 
    6366    </Compile> 
    64     <Compile Include="Form2.Designer.cs"> 
    65       <DependentUpon>Form2.cs</DependentUpon> 
     67    <Compile Include="loginForm.Designer.cs"> 
     68      <DependentUpon>loginForm.cs</DependentUpon> 
    6669    </Compile> 
    6770    <Compile Include="Program.cs" /> 
     
    7174      <DependentUpon>Form1.cs</DependentUpon> 
    7275    </EmbeddedResource> 
    73     <EmbeddedResource Include="Form2.resx"> 
     76    <EmbeddedResource Include="loginForm.resx"> 
    7477      <SubType>Designer</SubType> 
    75       <DependentUpon>Form2.cs</DependentUpon> 
     78      <DependentUpon>loginForm.cs</DependentUpon> 
    7679    </EmbeddedResource> 
    7780    <EmbeddedResource Include="Properties\Resources.resx">