Changeset 60


Ignore:
Timestamp:
Jul 2, 2005, 2:58:52 AM (19 years ago)
Author:
rryu
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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)
     
    120118                public void StartApplication()
    121119                {
    122                         doExit = false;
    123 
    124120                        // Šçƒpƒ^[ƒ““ǂݍž‚Ý
    125121                        bool result = false;
     
    131127                        if (!result)
    132128                        {
    133                                 if (!SelectFaceDefine(Application.StartupPath))
     129                                string path = Path.Combine(Application.StartupPath, "default.plist");
     130
     131                                if (!LoadFaceDefine(path))
    134132                                {
    135133                                        Application.Exit();
     
    152150                        config.Save();
    153151                }
    154 
    155                 /*
    156                  * Šçƒpƒ^[ƒ“’è‹`ƒtƒHƒ‹ƒ_‘I‘ð
    157                  */
    158                 public bool SelectFaceDefine()
    159                 {
    160                         return SelectFaceDefine(Application.StartupPath);
    161                 }
    162 
    163                 public bool SelectFaceDefine(string defaultPath)
    164                 {
    165                         while (true)
    166                         {
    167                                 FolderBrowserDialog folderBrowser = new FolderBrowserDialog();
    168                                 folderBrowser.SelectedPath = defaultPath;
    169                                 folderBrowser.Description = "Šçƒpƒ^[ƒ“ƒtƒ@ƒCƒ‹‚Ì‘¶Ý‚·‚éƒtƒHƒ‹ƒ_‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B";
    170                                 if (folderBrowser.ShowDialog() == DialogResult.OK)
    171                                 {
    172                                         if (LoadFaceDefine(folderBrowser.SelectedPath))
    173                                         {
    174                                                 return true;
    175                                         }
    176                                 }
    177                                 else
    178                                 {
    179                                         return false;
    180                                 }
    181                         }
    182 
    183                 }
    184 
    185152
    186153                public bool LoadFaceDefine(string path)
     
    286253                        patternWindow.Move +=new EventHandler(patternWindow_Move);
    287254
    288                         LoadFaceDefine(config.FaceDefPath);
    289 
    290255                        patternWindow.Location = config.Location;
    291256                        patternWindow.Opacity = (float)config.Opacity / 100;
    292257                        patternWindow.PatternSize = (float)config.PatternSize / 100;
    293258                        patternWindow.TransparentMouseMessage = config.TransparentMouseMessage;
    294                         patternWindow.Refresh();
     259
     260                        LoadFaceDefine(config.FaceDefPath);
    295261
    296262                        patternWindow.Show();
     
    323289[ƒNƒŠƒbƒNƒCƒxƒ“ƒg
    324290                 */
    325                 public void menuItemPatternSelect_Click(object sender, System.EventArgs e)
    326                 {
    327                         SelectFaceDefine(patternWindow.FaceDef.Path);   
    328                 }
    329291
    330292                public void menuItemExit_Click(object sender, System.EventArgs e)
Note: See TracChangeset for help on using the changeset viewer.