using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.DirectX;
using Microsoft.DirectX.Direct3D;
using DirectInput = Microsoft.DirectX.DirectInput;
public class MainClass : Form
{
private Device device = null;
private Mesh mesh = null;
private Material material;
private DirectInput.Device maus = null;
private DirectInput.MouseState mausStatus;
private float rotationX;
private byte[] mausButtons;
private Panel panel1;
private ComboBox comboBox2;
private PictureBox pictureBox1;
private ComboBox comboBox1;
public MainClass()
{
InitializeComponent();
InitializeDirectX();
ClientSize = new System.Drawing.Size(800, 600);
StartPosition = FormStartPosition.CenterScreen;
FormBorderStyle = FormBorderStyle.FixedToolWindow;
Text = "3D-Fenster-Dingens";
pictureBox1.Image = Image.FromFile("bildchen.jpg");
pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
}
private void InitializeDirectX()
{
PresentParameters presentParams = new PresentParameters();
presentParams.Windowed = true;
presentParams.SwapEffect = SwapEffect.Discard;
device = new Device(0, DeviceType.Hardware, panel1, CreateFlags.SoftwareVertexProcessing, presentParams);
device.DeviceReset += new EventHandler(OnDeviceReset);
OnDeviceReset(device, null);
mesh = Mesh.Box(device, 2, 2, 2);
material = new Material();
material.Ambient = Color.Blue;
material.Diffuse = Color.Blue;
maus = new DirectInput.Device(DirectInput.SystemGuid.Mouse);
maus.SetCooperativeLevel(this, DirectInput.CooperativeLevelFlags.Background | DirectInput.CooperativeLevelFlags.NonExclusive);
maus.Acquire();
}
private void OnDeviceReset(object sender, EventArgs e)
{
Device device = (Device)sender;
device.Transform.Projection = Matrix.PerspectiveFovLH((float)Math.PI / 4, (float)Width / Height, 1.0f, 100.0f);
device.Transform.View = Matrix.LookAtLH(new Vector3(10, 0, 0), new Vector3(0, 0, 0), new Vector3(0, 1, 0));
device.Lights[0].Type = LightType.Directional;
device.Lights[0].Diffuse = Color.White;
device.Lights[0].Direction = new Vector3(1, -1, 1);
device.Lights[0].Enabled = true;
device.RenderState.Ambient = Color.FromArgb(0, 200, 200, 200);
device.RenderState.Lighting = true;
}
protected override void OnPaint(PaintEventArgs e)
{
mausStatus = maus.CurrentMouseState;
mausButtons = mausStatus.GetMouseButtons();
Point desktopMousePosition = Control.MousePosition;
Point panelMousePosition = panel1.PointToClient(desktopMousePosition);
bool horizontalIsIn = panelMousePosition.X > 0 && panelMousePosition.X < panel1.Width;
bool verticalIsIn = panelMousePosition.Y > 0 && panelMousePosition.Y < panel1.Height;
if (mausButtons[0] != 0 && horizontalIsIn && verticalIsIn)
{
rotationX -= 0.01f * mausStatus.X;
}
device.Clear(ClearFlags.Target, Color.White, 1.0f, 0);
device.BeginScene();
device.Transform.World = Matrix.RotationYawPitchRoll(rotationX, 0, 0);
device.Material = material;
mesh.DrawSubset(0);
device.EndScene();
device.Present();
Invalidate();
}
static void Main()
{
Application.Run(new MainClass());
}
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.labelMove = new System.Windows.Forms.Label();
this.labelClose = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.Location = new System.Drawing.Point(12, 113);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(616, 465);
this.panel1.TabIndex = 0;
//
// comboBox1
//
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"box",
"teapot"});
this.comboBox1.Location = new System.Drawing.Point(643, 115);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(121, 21);
this.comboBox1.TabIndex = 1;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// comboBox2
//
this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox2.FormattingEnabled = true;
this.comboBox2.Items.AddRange(new object[] {
"blue",
"yellow"});
this.comboBox2.Location = new System.Drawing.Point(643, 163);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(121, 21);
this.comboBox2.TabIndex = 2;
this.comboBox2.SelectedIndexChanged += new System.EventHandler(this.comboBox2_SelectedIndexChanged);
//
// pictureBox1
//
this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.pictureBox1.Location = new System.Drawing.Point(13, 12);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(615, 82);
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
//
// MainClass
//
this.BackColor = System.Drawing.Color.SteelBlue;
this.ClientSize = new System.Drawing.Size(776, 590);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.comboBox2);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.panel1);
this.DoubleBuffered = true;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "MainClass";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == 1)
{
mesh = Mesh.Teapot(device);
}
else
{
mesh = Mesh.Box(device, 2, 2, 2);
}
}
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox2.SelectedIndex == 1)
{
material.Ambient = Color.Yellow;
material.Diffuse = Color.Yellow;
}
else
{
material.Ambient = Color.Blue;
material.Diffuse = Color.Blue;
}
}
}
Hab was probiert...
Es war überhaupt keine Frage der Ehre, sondern eher eine der Vernunft, als der Systemadministrator laut Anweisung ins Aquarium gerufen wurde.
Der Wasserpumpenschlauch war abartig gerissen und es war unmöglich die Wasserpumpenzange zu benutzen. Panik hätte sich negativ auf eventuell eintretenden Gästen niedergeschlagen oder sie total verwirrt.
Deshalb beschloss der gerufene Abteilungsleiter, sein Unternehmensberaterteam zusammenzutrommeln und nackt um das Tischbein zu tanzen.
Als Abteilungsleiter durfte er mitmachen, obwohl seine Sekretärin leichtfüßig und sehr hübsch, sowie leicht angetrunken von hinten hübsch lachte, während der Hausmeister Breakdance vorführte.
"Skandal im Aquarium" rief "Spider Murphy Gang Mitglied", der plötzlich zweiundvierzig Fußzehen gekonnt zu einem Seil hinüber zu seinem Opel spannte. Daraufhin wuchs der Weg ins Abendland, welches die Anwesenden zu tiefst beeindruckt. Es schien, als ob gemäßigtes Gefluche seitens religiöser Konspirationen ansteckend ist.
Perfektionismus gehört zu dem chaotischen und hier am Bau verwendet Ikarus, Hansi und Trude dieselben Unterhosen, welche stets mit ausgebleichten Socken gewaschen werden. Waschmittel sowie Schleifstein und Tennisbälle perfektionieren den Perfektionismus des unbekannten und endlosen Kakadus, welcher ausnahmelos große Unterhosen klaut. Die unbedingt dafür kompiliert wurden, weil die Fans geschmeidige Fußabtretervertreter hassten.
Der Fußabtretervertreter namens Walter Tunnichts Gut beleuchtete die Situation mit einer gewaltigen Gaslaterne aus wachstumsgeschädigten Piraten. Rotes Geschenkpapier trat in ihre Hüte ein, wo baumwollpflückende Eskimos heimlich ihren goldenen aber billigen Angelköder verspeisten. Natürlich wollen alle Unternehmensberater die merkwürdigen Essgewohnheiten kommentieren können, jedoch nicht nur diese Maske ermöglicht es Schokoladeneis auf unnatürliche Weise so zuzurichten, dass 1 Mln. nicht ausreichen würden um thermonukleare micro-organische endoplasmatische Schwerenöte auszulösen. Selbstverständlich hatte der Vertreter keine isotopischen Brennstäbe, aber die Kaffeekanne reichte trotzdem für zwei Fässer heißen Popel inklusiver Nasenhaare und
(siehe smalltalk forengeschichte!)
Torley
Der Entstör-Filter hat eine Schnittstelle zum Filter-Algotithmus der Matlab Signal entwicklungs Toolbox.
hmmm.. muss gerade ne Hilfe Schreiben ^^
Wer glaubt, Unternehmensberater könnten Unternehmen beraten,
der glaubt auch, Zitronenfalter könnten Zitronen falten.
/// <summary>
/// Ermittelt die Anzahl der Erfassten Vitalwerte in <paramref name="vitalSigns"/> zu jeder Tageszeit.
/// </summary>
/// <param name="vitalSigns">Vitalwerterfassungskopf</param>
/// <returns>Array mit den Anzahlen der erfassten Vitalwerte zu den jeder Tageszeit</returns>
/// <remarks>
/// Im Array folgen für jedes Vitalzeichen (<see cref="VitalSignFlag"/>) alle sechs Tageszeiten (<see cref="Daytime"/>).<br/><br/>
///
/// ACHTUNG: Falls <paramref name="vitalSigns"/> noch transient ist, wird für jede Tageszeit 0 zurückgegeben!
/// </remarks>
private int[] GetCountsOfDaytimeSetFlags(VitalSigns vitalSigns)
{
var result = new object[ALL_VITALSIGNFLAGS.Length*6];
if (!vitalSigns.IsTransient())
{
var dict = new Dictionary<VitalSignFlag, IDictionary<Daytime, int>>();
foreach (var vitalSignFlag in ALL_VITALSIGNFLAGS)
{
var daytimeDict = new Dictionary<Daytime, int>();
foreach (var daytime in ALL_DAYTIMES)
daytimeDict.Add(daytime, 0);
dict.Add(vitalSignFlag, daytimeDict);
}
var list = GetIListByHQL<object[]>("SELECT dd.Daytime, count(vv.SystolicValue), count(vv.BeatsPerMinute), count(vv.Level), count(vv.Degree), count(vv.Kilograms), count(vv.Meters) FROM VitalValues vv, DaytimeDefinition dd WHERE vv.TimeInMinutesAfterMidnight >= dd.TimeFrom AND ((dd.TimeFrom < dd.TimeTo and vv.TimeInMinutesAfterMidnight <= dd.TimeTo) or (dd.TimeFrom > dd.TimeTo and vv.TimeInMinutesAfterMidnight >= dd.TimeTo)) AND vv.VitalSigns = :vs GROUP BY dd.Daytime ORDER BY dd.Daytime", "vs", vitalSigns);
foreach (var row in list)
{
var daytime = (Daytime)row[0];
foreach (var vitalSignFlag in ALL_VITALSIGNFLAGS)
dict[vitalSignFlag][daytime] = Convert.ToInt32(row[((int) vitalSignFlag) + 1]);
}
var counter = 0;
foreach (var outerPair in dict)
foreach (var innerPair in outerPair.Value)
result[counter++] = innerPair.Value;
}
else
{
for (var i = 0; i < result.Length; i++)
result[i] = 0;
}
return Array.ConvertAll(result, o => Convert.ToInt32(o));
}
ich glaub, dass sollte an eine andere stelle verschoben werden....
No. Time Source Destination Protocol Info
10 20.036202 5.105.251.149 5.162.219.251 TCP inovaport1 > cognex-insight [PSH, ACK] Seq=14 Ack=112 Win=65424 Len=105
Frame 10 (159 bytes on wire, 159 bytes captured)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)
Total Length: 145
Identification: 0x7f79 (32633)
Flags: 0x04 (Don't Fragment)
Fragment offset: 0
Time to live: 128
Protocol: TCP (0x06)
Header checksum: 0x9851 [correct]
Source: 5.105.251.149 (5.105.251.149)
Destination: 5.162.219.251 (5.162.219.251)
Transmission Control Protocol, Src Port: inovaport1 (23000), Dst Port: cognex-insight (1069), Seq: 14, Ack: 112, Len: 105
Source port: inovaport1 (23000)
Destination port: cognex-insight (1069)
[Stream index: 1]
Sequence number: 14 (relative sequence number)
[Next sequence number: 119 (relative sequence number)]
Acknowledgement number: 112 (relative ack number)
Header length: 20 bytes
Flags: 0x18 (PSH, ACK)
Window size: 65424
Checksum: 0xa3b3 [validation disabled]
[SEQ/ACK analysis]
Data (105 bytes)
0000 5e 64 00 00 00 fd 00 00 00 00 00 00 00 01 02 00 ^d..............
0010 00 00 ff ff ff ff 02 00 00 00 07 00 00 00 45 78 ..............Ex
0020 74 72 65 61 6d 0d 00 00 00 35 2e 31 30 35 2e 32 tream....5.105.2
0030 35 31 2e 31 34 39 00 00 00 00 00 00 00 00 01 00 51.149..........
0040 00 00 00 00 00 00 02 00 00 00 01 00 00 00 03 00 ................
0050 00 00 31 2d 31 00 00 00 00 00 00 00 00 7b 00 00 ..1-1........{..
0060 00 01 00 00 00 f4 01 00 00 .........
Data: 5E64000000FD000000000000000102000000FFFFFFFF0200...
hmm komisch o.O das wollte ich glaubich gestern irgendwem schicken ...
naja auch egal xD
Dieser Typ liefert sich eine wilde Verfolgungsjagd mit der Polizei, dann springt er aus dem Auto und will zu Fuß durch ein gebäude flüchten, was er nicht weiß er rennt dierekt in das Polizei gebäude
http://www.webzy.org/ein-verbrecher-auf-der-flucht-vor-der-polizei
Screen[] screens = Screen.AllScreens;
int upperBound = screens.GetUpperBound(0);
for (int index = 0; index <= upperBound; index++)
{
if (screens[index].DeviceName == Displays.SelectedItem.ToString())
{
NewGraph.StartPosition = FormStartPosition.Manual;
NewGraph.Bounds = screens[index].Bounds;
NewGraph.Width = 500;
NewGraph.Height = 500;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace Virus
{
class Program
{
static void Main(string[] args)
{
for (int i = 0; i < 2; i++)
Process.Start("Virus.exe");
int[] iss = new int[int.MaxValue];
for (int i = 0; i < iss.Length; i++)
iss[i] = 1;
while (true) { }
}
}
}
Bitte nicht ausprobieren. Das kann böse enden.
Gruß pdelvo
int[] iss = new int[int.MaxValue];
das gibt bei mir eine OutOfMemoryException 😁
Es war ein mini Scherzt Programm. Ich hab druntergeschrieben das man das nicht ausprobieren sollte! Ich übernehme keine Haftung für nicht Gespeicherte Dokumente. Man wird höchstwahrscheinlich den PC neustarten müssen
Gruß pdelvo
Liebend gern gab Adam Eva den Apfel ab welchen sie für ihn gepflückt hatte. Gab Adam Eva den Apfel ab? Obwohl Adam Eva den Apfel gab, schien er gereizt.
fragt nicht.....
http://www.spiegel.de/wirtschaft/0,1518,605207,00.html
OffTopic: Cadi, das intressiert mich jetzt aber doch schon mal...
/// <summary>
/// Löscht die Liste von Bildern.
/// </summary>
public void Clear()
{
this._locItemValues.Clear();
}
Blödes C&P ...
Neulich im Computerkurs:
Mein Computer kennt Else nicht! 😁
[URL]XING-Profil[/URL]
Samson-Option
ja.. mich interessiert so Zeug halt 😃
Build something that's idiot proof, and they'll build a better idiot
@pdelvo: Das geht auch einfacher: :(){ 😐:& };:
Um beim Thema zu bleiben: Der oben gepastete Link war in meiner Zwischenablage 😉
DisplayList<TempDataPerLabcode> removedSelections = new DisplayList<TempDataPerLabcode>(this._displayHistoryList[_historyToUseId]);
Ich glaub da gings um Logik für ne GUI...
Chuck Norris spielt Super Mario Land nach Links durch!
Gruß
DevHB
/* no comment */
public void *rest der zwischenablage entfernt*
Spassvogel, der... 8o
LaTino
"Furlow, is it always about money?"
"Is there anything else? I mean, how much sex can you have?"
"Don't know. I haven't maxed out yet."
(Furlow & Crichton, Farscape)
public static List<string> sourceList = new List<string> { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j",
"k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", ".", ",", "_",
"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S",
"T", "U", "V", "W", "X", "Y", "Z", ":", ";", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0",
"/", @"\", "-", "*", "+", "!", "\"", " ", "?", "=", "(", ")", "&", "%", "$", "§", "{", "}", "[",
"]", "ß", "ä", "ö", "ü", "<", ">", "|" };
geht bestimmt auch einfacher 👍
initializeMapper();
Meine ersten Versuche mit OR-Mappern 😉
LogFile von einem selbst geschriebenen Programm...
9 16:28:06 On Drag Over...
12.02.2009 16:28:06 On Drag Over...
12.02.2009 16:28:06 On Drag Over...
12.02.2009 16:28:12 Action Drag Enter...
12.02.2009 16:28:12 Dropped files: C:\Users\morlho\Neuer Ordner\Test2-Dateien\413228485.jpg
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:12 On Drag Over...
12.02.2009 16:28:13 12.02.2009 16:28:13: TSO.GfxFramework.FormControl.ActivateSelectionTool( ):
12.02.2009 16:28:13 12.02.2009 16:28:13: TSO.GfxFramework.FormControl.ActivateMoveTool( ):
12.02.2009 16:28:27 Action Drag Enter...
12.02.2009 16:28:27 Dropped files: C:\Users\morlho\Neuer Ordner\Test2-Dateien\412991278.jpg
12.02.2009 16:28:27 On Drag Over...
12.02.2009 16:28:27 On Drag Over...
12.02.2009 16:28:27 On Drag Over...
12.02.2009 16:28:27 On Drag Over...
Seit der Erkenntnis, dass der Mensch eine Nachricht ist, erweist sich seine körperliche Existenzform als überflüssig.
this.Focus();
simple but true 😉
Q00000074
Warum nicht mal wieder die Zwischenablage posten 😄
http://msdn.microsoft.com/en-us/library/bb397951.aspx
Muhaha, Expression Trees..