Changeset 4


Ignore:
Timestamp:
Nov 4, 2004, 3:32:07 AM (19 years ago)
Author:
altba\rryu
Message:

コンテキストメニューで終了メニューを付けてみるも、勝手に走ってるスレッドは止まらないのでだめっぽい。

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MacFace.prjx

    r1 r4  
    1 <Project name="MacFace" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
     1<Project name="MacFace" standardNamespace="NewProject" description="" newfilesearch="None" enableviewstate="True" version="1.1" projecttype="C#">
    22  <Contents>
    33    <File name=".\MainForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
     
    55    <File name=".\PropertyList.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
    66    <File name=".\AlphaForm.cs" subtype="Code" buildaction="Compile" dependson="" data="" />
     7    <File name=".\MyForm.CreatedForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
     8    <File name=".\MacFace.MainForm.resources" subtype="Code" buildaction="EmbedAsResource" dependson="" data="" />
    79  </Contents>
    810  <References />
    911  <DeploymentInformation target="" script="" strategy="File" />
    1012  <Configuration runwithwarnings="False" name="Debug">
    11     <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" />
     13    <CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
    1214    <Execution commandlineparameters="" consolepause="False" />
    13     <Output directory=".\bin\Debug" assembly="MacFace" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
     15    <Output directory=".\bin\Debug" assembly="MacFace" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
    1416  </Configuration>
    1517  <Configurations active="Debug">
    1618    <Configuration runwithwarnings="False" name="Debug">
    17       <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" />
     19      <CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="Exe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
    1820      <Execution commandlineparameters="" consolepause="False" />
    19       <Output directory=".\bin\Debug" assembly="MacFace" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
     21      <Output directory=".\bin\Debug" assembly="MacFace" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
    2022    </Configuration>
    2123    <Configuration runwithwarnings="False" name="Release">
    22       <CodeGeneration runtime="MsNet" compiler="Csc" warninglevel="4" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" />
     24      <CodeGeneration runtime="MsNet" compiler="Csc" compilerversion="" warninglevel="4" nowarn="" includedebuginformation="True" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" target="WinExe" definesymbols="" generatexmldocumentation="False" win32Icon="" noconfig="False" nostdlib="False" />
    2325      <Execution commandlineparameters="" consolepause="False" />
    24       <Output directory=".\bin\Release" assembly="MacFace" executeScript="" executeBeforeBuild="" executeAfterBuild="" />
     26      <Output directory=".\bin\Release" assembly="MacFace" executeScript="" executeBeforeBuild="" executeAfterBuild="" executeBeforeBuildArguments="" executeAfterBuildArguments="" />
    2527    </Configuration>
    2628  </Configurations>
  • trunk/MainForm.cs

    r1 r4  
    1010using System.Threading;
    1111
    12 namespace MacFace 
     12namespace MacFace
    1313{
    1414        class MainForm : Misuzilla.Windows.Forms.AlphaForm
     15//      class MainForm : System.Windows.Forms.Form
    1516        {
     17                private System.Windows.Forms.ContextMenu contextMenu1;
     18                private System.Windows.Forms.MenuItem menuItem1;
    1619                private Hashtable _property;
    1720                private ArrayList _parts;
     
    2124                {
    2225                        InitializeComponent();
    23 //                      this.Load += new EventHandler(this.Form1_Load);
     26                        this.TransparentMouseMessage = false;
     27                        this.MoveAtFormDrag = true;
     28
    2429                        _facePath = Path.Combine(Application.StartupPath,"default.mcface");
    2530                        _property = PropertyList.load(Path.Combine(_facePath,"faceDef.plist"));
     
    2833                        (new Thread(new ThreadStart(CountProcessorUsage))).Start();
    2934                }
    30        
     35
    3136                // THIS METHOD IS MAINTAINED BY THE FORM DESIGNER
    3237                // DO NOT EDIT IT MANUALLY! YOUR CHANGES ARE LIKELY TO BE LOST
    33                 void InitializeComponent()
    34                 {
     38                void InitializeComponent() {
     39                        this.menuItem1 = new System.Windows.Forms.MenuItem();
     40                        this.contextMenu1 = new System.Windows.Forms.ContextMenu();
    3541                        //
    36                         //  Set up generated class MainForm
     42                        // menuItem1
    3743                        //
    38                         this.SuspendLayout();
    39                         this.Name = "MainForm";
    40                         this.Text = "This is my form";
    41                         this.Size = new System.Drawing.Size(300, 300);
    42                         this.ResumeLayout(false);
    43                         this.ShowInTaskbar = false;
    44                         this.TopMost = true;
    45                         this.FormBorderStyle = FormBorderStyle.None;
     44                        this.menuItem1.Index = 0;
     45                        this.menuItem1.Shortcut = System.Windows.Forms.Shortcut.CtrlQ;
     46                        this.menuItem1.Text = "終了";
     47                        this.menuItem1.Click += new System.EventHandler(this.doQuit);
     48                        //
     49                        // contextMenu1
     50                        //
     51                        this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
     52                                                this.menuItem1});
     53                        //
     54                        // MainForm
     55                        //
     56                        this.AutoScaleBaseSize = new System.Drawing.Size(5, 12);
     57                        this.ClientSize = new System.Drawing.Size(120, 101);
     58                        this.ContextMenu = this.contextMenu1;
     59                        this.ControlBox = false;
    4660                        this.MaximizeBox = false;
    4761                        this.MinimizeBox = false;
    48                         this.ControlBox = false;
    49                         this.TransparentMouseMessage = false;
    50                         this.MoveAtFormDrag = true;
    51                         this.Visible = true;
     62                        this.Name = "MainForm";
    5263                        this.Opacity = 0.75F;
     64                        this.ShowInTaskbar = false;
     65                        this.Text = "MacFace For Windows";
     66                        this.TopMost = true;
    5367                }
    5468                       
     
    87101                                }
    88102                               
    89                                 // ‘O‚̃pƒ^[ƒ“‚Æ“¯‚¶‚È‚çXV‚µ‚È‚¢B
     103                                // Õp^[ƓȂXVȂB
    90104                                if (prevUsage/10 != usage/10) {
    91105                                        ArrayList patterns = (ArrayList)_property["pattern"];
     
    111125                       
    112126                }
     127                void doQuit(object sender, System.EventArgs e)
     128                {
     129                        Application.Exit();
     130                }
     131               
    113132        }
    114133}
Note: See TracChangeset for help on using the changeset viewer.