Ignore:
Timestamp:
Feb 26, 2005, 2:55:18 AM (19 years ago)
Author:
altba\rryu
Message:

アプリケーション的な処理をMainFormクラスからMacFaceAppクラスに分離した。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MacFaceFloat/ConfigurationForm.cs

    r32 r39  
    33using System.Collections;
    44using System.ComponentModel;
     5using System.Diagnostics;
    56using System.Windows.Forms;
    67using System.IO;
     
    1415        public class ConfigurationForm : System.Windows.Forms.Form
    1516        {
    16                 private MainForm _mainForm;
     17                private MacFaceApp _app;
    1718                private Configuration _config;
    1819
     
    4243                private System.ComponentModel.IContainer components;
    4344
    44                 public ConfigurationForm(MainForm mainForm)
     45                public ConfigurationForm(MacFaceApp app)
    4546                {
    4647                        //
     
    4950                        InitializeComponent();
    5051
    51                         _mainForm = mainForm;
    5252                        _config = Configuration.GetInstance();
    53 
     53                        _app = app;
    5454                }
    5555
     
    371371                private void ConfigurationForm_Load(object sender, System.EventArgs e)
    372372                {
    373                         // ‘S”Ê‚ð•\Ž¦B
     373                        // ‰Šú’l‚̃Zƒbƒg
     374                        trackBarOpacity.Value = _config.Opacity;
     375                        trackBarPatternSize.Value = _config.PatternSize;
     376                        checkMouseMessage.Checked = _config.TransparentMouseMessage;
     377
     378                        // ˆê“x‚·‚ׂẴpƒlƒ‹‚ð”ñ•\Ž¦‚É‚·‚é
    374379                        foreach (Panel pane in panelContainer.Controls)
    375380                        {
     
    378383                        }
    379384
     385                        // ‘S”Ê‚Ì‚Ý‚ð‰ÂŽ‹‚É‚·‚é
    380386                        panelAppearance.Show();
    381 
    382                         // ‰Šú’l‚ðƒZƒbƒgB
    383                         trackBarOpacity.Value = (int) (_mainForm.Opacity * 100);
    384                         trackBarPatternSize.Value = (int)(_mainForm.PatternSize * 100);
    385                         checkMouseMessage.Checked = Configuration.GetInstance().TransparentMouseMessage;
    386387                }
    387388
    388389                private void buttonOK_Click(object sender, System.EventArgs e)
    389390                {
    390                         Configuration config = Configuration.GetInstance();
    391                         config.Opacity = trackBarOpacity.Value;
    392                         config.PatternSize = trackBarPatternSize.Value;
    393                         config.TransparentMouseMessage = checkMouseMessage.Checked;
     391                        _config.Opacity = trackBarOpacity.Value;
     392                        _config.PatternSize = trackBarPatternSize.Value;
     393                        _config.TransparentMouseMessage = checkMouseMessage.Checked;
    394394
    395395                        this.Close();
     
    514514                        if (item != null)
    515515                        {
    516                                 _mainForm.LoadFaceDefine(item.SubItems[1].Text);
     516                                // TODO: ‚±‚±‚¾‚¯ƒŠƒAƒ‹ƒ^ƒCƒ€‚ɐݒè“à—e‚ª”½‰f‚³‚ê‚é‚Ì‚Í”½‘¥‚Á‚Û‚¢
     517                                _app.LoadFaceDefine(item.SubItems[1].Text);
    517518                        }
    518519                }
     
    533534                        try
    534535                        {
    535                                 System.Diagnostics.Process.Start(linkWebSite.Text);
     536                                Process.Start(linkWebSite.Text);
    536537                        }
    537538                        catch (Win32Exception) {}
Note: See TracChangeset for help on using the changeset viewer.