Changeset 60

Show
Ignore:
Timestamp:
07/02/05 02:58:52 (4 years ago)
Author:
rryu
Message:

盲腸のように存在していたSelectFaceDefine?()を撲滅した。

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/MacFaceFloat/MacFaceApp.cs

    r58 r60  
    4444                private int memHistoryCount; 
    4545 
    46                 private bool doExit; 
    47  
    4846                [STAThread] 
    4947                public static void Main(string[] args) 
     
    119117                public void StartApplication() 
    120118                { 
    121                         doExit = false; 
    122  
    123119                        // ���^�[���ǂݍ��� 
    124120                        bool result = false; 
     
    130126                        if (!result) 
    131127                        { 
    132                                 if (!SelectFaceDefine(Application.StartupPath)) 
     128                                string path = Path.Combine(Application.StartupPath, "default.plist"); 
     129 
     130                                if (!LoadFaceDefine(path)) 
    133131                                { 
    134132                                        Application.Exit(); 
     
    151149                        config.Save(); 
    152150                } 
    153  
    154                 /* 
    155                  * ���^�[�����t�H���_�I��        */ 
    156                 public bool SelectFaceDefine() 
    157                 { 
    158                         return SelectFaceDefine(Application.StartupPath); 
    159                 } 
    160  
    161                 public bool SelectFaceDefine(string defaultPath) 
    162                 { 
    163                         while (true)  
    164                         { 
    165                                 FolderBrowserDialog folderBrowser = new FolderBrowserDialog(); 
    166                                 folderBrowser.SelectedPath = defaultPath; 
    167                                 folderBrowser.Description = "���^�[���t�@�C���̑��݂����H���_���Ă��������B"; 
    168                                 if (folderBrowser.ShowDialog() == DialogResult.OK)  
    169                                 { 
    170                                         if (LoadFaceDefine(folderBrowser.SelectedPath))  
    171                                         { 
    172                                                 return true; 
    173                                         } 
    174                                 } 
    175                                 else  
    176                                 { 
    177                                         return false; 
    178                                 } 
    179                         } 
    180  
    181                 } 
    182  
    183151 
    184152                public bool LoadFaceDefine(string path) 
     
    284252                        patternWindow.Move +=new EventHandler(patternWindow_Move); 
    285253 
    286                         LoadFaceDefine(config.FaceDefPath); 
    287  
    288254                        patternWindow.Location = config.Location; 
    289255                        patternWindow.Opacity = (float)config.Opacity / 100; 
    290256                        patternWindow.PatternSize = (float)config.PatternSize / 100; 
    291257                        patternWindow.TransparentMouseMessage = config.TransparentMouseMessage; 
    292                         patternWindow.Refresh(); 
     258 
     259                        LoadFaceDefine(config.FaceDefPath); 
    293260 
    294261                        patternWindow.Show(); 
     
    320287                 * ���j���[�N���b�N�C�x���g 
    321288                 */ 
    322                 public void menuItemPatternSelect_Click(object sender, System.EventArgs e) 
    323                 { 
    324                         SelectFaceDefine(patternWindow.FaceDef.Path);    
    325                 } 
    326289 
    327290                public void menuItemExit_Click(object sender, System.EventArgs e)