Changeset 9


Ignore:
Timestamp:
Nov 10, 2004, 8:24:03 PM (19 years ago)
Author:
altba\rryu
Message:

起動時に黙って起動時のディレクトリにあるdefault.mcfaceを開くようにした。

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MacFaceFloat/AssemblyInfo.cs

    r8 r9  
    77// î•ñ‚ð•ÏX‚·‚é‚ɂ́A‚±‚ê‚ç‚Ì‘®«’l‚ð•ÏX‚µ‚Ä‚­‚¾‚³‚¢B
    88//
    9 [assembly: AssemblyTitle("")]
    10 [assembly: AssemblyDescription("")]
     9[assembly: AssemblyTitle("MacFace for Windows ‚¨ŽŽ‚µ”Å")]
     10[assembly: AssemblyDescription("ƒGƒ‚[ƒVƒ‡ƒiƒ‹CPUƒ[ƒ^MacFace")]
    1111[assembly: AssemblyConfiguration("")]
    12 [assembly: AssemblyCompany("")]
     12[assembly: AssemblyCompany("Team MacFace")]
    1313[assembly: AssemblyProduct("")]
    14 [assembly: AssemblyCopyright("")]
     14[assembly: AssemblyCopyright("Team MacFace")]
    1515[assembly: AssemblyTrademark("")]
    1616[assembly: AssemblyCulture("")]         
  • trunk/MacFaceFloat/MacFaceFloat.csproj

    r8 r9  
    8787                <Reference
    8888                    Name = "System.XML"
    89                     AssemblyName = "System.XML"
     89                    AssemblyName = "System.Xml"
    9090                    HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
    9191                />
     
    115115                <File
    116116                    RelPath = "AssemblyInfo.cs"
     117                    SubType = "Code"
    117118                    BuildAction = "Compile"
    118119                />
  • trunk/MacFaceFloat/MainForm.cs

    r8 r9  
    119119                        return SelectFaceDefine(Application.StartupPath);
    120120                }
     121
    121122                public bool SelectFaceDefine(string defaultPath)
    122123                {
    123124                        String facePath;
    124                         Hashtable property;
    125125
    126126                        // XV‚ðŽ~‚ß‚éB
     
    140140                                {
    141141                                        facePath = folderBrowser.SelectedPath;
    142                                         if (File.Exists(Path.Combine(facePath, "faceDef.plist")))
     142
     143                                        if (LoadFaceDefine(facePath))
    143144                                        {
    144                                                 break;
    145                                         }
    146                                         else
    147                                         {
    148                                                 // ƒtƒ@ƒCƒ‹‚ª‚È‚¢
    149                                                 if (MessageBox.Show(
    150                                                         String.Format("Žw’肳‚ꂽƒtƒHƒ‹ƒ_‚ÉŠçƒpƒ^[ƒ“’è‹`XMLƒtƒ@ƒCƒ‹ \"faceDef.plist\" ‚ª‘¶Ý‚µ‚Ü‚¹‚ñB\n\nƒtƒHƒ‹ƒ_:\n{0}", facePath),
    151                                                         "MacFace for Windows", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error)
    152                                                         == DialogResult.Cancel)
    153                                                 {
    154                                                         return false;
    155                                                 }
     145                                                return true;
    156146                                        }
    157147                                }
     
    162152                        }
    163153
    164                         // “ǂݍž‚Ý
     154                }
     155
     156
     157                bool LoadFaceDefine(string path)
     158                {
     159                        string plistPath = Path.Combine(path, "faceDef.plist");
     160
     161                        if (!File.Exists(plistPath))
     162                        {
     163                                System.Windows.Forms.MessageBox.Show(
     164                                        String.Format("Žw’肳‚ꂽƒtƒHƒ‹ƒ_‚ÉŠçƒpƒ^[ƒ“’è‹`XMLƒtƒ@ƒCƒ‹ \"faceDef.plist\" ‚ª‘¶Ý‚µ‚Ü‚¹‚ñB\n\nƒtƒHƒ‹ƒ_:\n{0}", path),
     165                                        "MacFace for Windows", MessageBoxButtons.OK, MessageBoxIcon.Error);
     166                                return false;
     167                        }
     168                       
     169                        Hashtable property;
    165170                        try
    166171                        {
    167                                 property = PropertyList.Load(Path.Combine(facePath, "faceDef.plist"));
     172                                property = PropertyList.Load(plistPath);
    168173                        }
    169174                        catch (System.IO.IOException ie)
     
    184189                        }
    185190
     191                        // Šçƒpƒ^[ƒ“·‚µ‘Ö‚¦’†‚͍XV‚ðŽ~‚ß‚Ä‚¨‚­
     192                        if (_updateTimer != null) _updateTimer.Stop();
     193
    186194                        _property = property;
    187                         _facePath = facePath;
     195                        _facePath = path;
    188196                        _parts = (ArrayList)_property["parts"];
    189 
    190                         // XVŠJŽn
     197                        prevUsage = -10;
     198
     199                        // XVÄŠJ
    191200                        if (_updateTimer != null) _updateTimer.Start();
    192201
    193202                        return true;
    194203                }
    195 
    196 
    197204
    198205                public void CountProcessorUsage(object sender, EventArgs e)
     
    234241                public void MainForm_Load(object sender, System.EventArgs e)
    235242                {
    236                         if (!SelectFaceDefine(Path.Combine(Application.StartupPath, "default.mcface")))
    237                         {
    238                                 Application.Exit();
    239                                 return;
    240                         }
    241 
     243                        string faceDefPath = Path.Combine(Application.StartupPath, "default.mcface");
     244                        bool result = false;
     245
     246                        if (Directory.Exists(faceDefPath))
     247                        {
     248                                result = LoadFaceDefine(faceDefPath);
     249                        }
     250
     251                        if (!result)
     252                        {
     253                                if (!SelectFaceDefine(Application.StartupPath))
     254                                {
     255                                        Application.Exit();
     256                                        return;
     257                                }
     258
     259                        }
    242260                }
    243261
  • trunk/MacFaceLibrary/AssemblyInfo.cs

    r8 r9  
    77// î•ñ‚ð•ÏX‚·‚é‚ɂ́A‚±‚ê‚ç‚Ì‘®«’l‚ð•ÏX‚µ‚Ä‚­‚¾‚³‚¢B
    88//
    9 [assembly: AssemblyTitle("")]
    10 [assembly: AssemblyDescription("")]
     9[assembly: AssemblyTitle("MacFace Lib")]
     10[assembly: AssemblyDescription("MacFace Library")]
    1111[assembly: AssemblyConfiguration("")]
    1212[assembly: AssemblyCompany("")]
    1313[assembly: AssemblyProduct("")]
    14 [assembly: AssemblyCopyright("")]
     14[assembly: AssemblyCopyright("Team MacFace")]
    1515[assembly: AssemblyTrademark("")]
    1616[assembly: AssemblyCulture("")]         
Note: See TracChangeset for help on using the changeset viewer.