Spiel und Spaß
This commit is contained in:
parent
bd76000628
commit
3fae64086d
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
/.vs
|
||||
/testapp/bin
|
||||
/testapp/obj
|
58
testapp/Form1.Designer.cs
generated
58
testapp/Form1.Designer.cs
generated
@ -32,34 +32,46 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// trayIcon
|
||||
//
|
||||
this.trayIcon.Text = "trayIcon";
|
||||
this.trayIcon.Visible = true;
|
||||
// this.trayIcon.Icon = this.getTrayIcon();
|
||||
//this.trayIcon.ContextMenuStrip =
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||
this.Name = "Form1";
|
||||
this.ShowInTaskbar = false;
|
||||
this.Text = "OpenVPN-GUI";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
|
||||
this.Resize += new System.EventHandler(this.EventHandler_Resize);
|
||||
this.ResumeLayout(false);
|
||||
this.components = new System.ComponentModel.Container();
|
||||
this.trayIcon = new System.Windows.Forms.NotifyIcon(this.components);
|
||||
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
|
||||
this.time = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// trayIcon
|
||||
//
|
||||
this.trayIcon.Text = "trayIcon";
|
||||
this.trayIcon.Visible = true;
|
||||
//
|
||||
// time
|
||||
//
|
||||
this.time.AutoSize = true;
|
||||
this.time.Font = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.time.Location = new System.Drawing.Point(12, 115);
|
||||
this.time.Name = "time";
|
||||
this.time.Size = new System.Drawing.Size(355, 91);
|
||||
this.time.TabIndex = 0;
|
||||
this.time.Text = "00:00:00";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(399, 299);
|
||||
this.Controls.Add(this.time);
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Name = "Form1";
|
||||
this.Text = "OpenVPN-GUI";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.NotifyIcon trayIcon;
|
||||
}
|
||||
private System.Windows.Forms.ColorDialog colorDialog1;
|
||||
private System.Windows.Forms.Label time;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,31 +5,26 @@ using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace testapp
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
UInt16 a = 0x1234;
|
||||
byte h = (byte)(a >> 8);
|
||||
byte l = (byte)a;
|
||||
Console.WriteLine(h + " " + l);
|
||||
}
|
||||
private void EventHandler_Resize(object sender, System.EventArgs e)
|
||||
{
|
||||
if (this.WindowState == FormWindowState.Minimized)
|
||||
{
|
||||
this.ShowInTaskbar = false;
|
||||
this.WindowState = FormWindowState.Minimized;
|
||||
}
|
||||
}
|
||||
private System.Drawing.Icon getTrayIcon()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
}
|
||||
namespace testapp {
|
||||
public partial class Form1 : Form {
|
||||
public Form1() {
|
||||
this.InitializeComponent();
|
||||
Thread t = new Thread(this.TimeRunner);
|
||||
t.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private void TimeRunner() {
|
||||
while(true) {
|
||||
try {
|
||||
this.time.BeginInvoke((MethodInvoker)delegate {
|
||||
this.time.Text = DateTime.Now.ToLongTimeString();
|
||||
});
|
||||
Thread.Sleep(500);
|
||||
} catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -120,4 +120,7 @@
|
||||
<metadata name="trayIcon.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="colorDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>128, 17</value>
|
||||
</metadata>
|
||||
</root>
|
@ -15,7 +15,7 @@
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<StartAction>Program</StartAction>
|
||||
<StartAction>Project</StartAction>
|
||||
<StartProgram>G:\Programme\GoproStudio\GoPro\Tools\GoPro Studio.exe</StartProgram>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user