Mercurial > defical
annotate defical-sharp/libsemtd/Semtd.cs @ 1:758381a85d76 default tip
Incorrect printf format.
author | Edho Prima Arief <me@myconan.net> |
---|---|
date | Mon, 28 Jun 2010 14:52:19 +0700 |
parents | ebed2bd0d300 |
children |
rev | line source |
---|---|
0
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
1 using System; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
2 using System.Collections.Generic; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
3 using System.Linq; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
4 using System.Text; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
5 |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
6 namespace libsemtd |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
7 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
8 public partial class Semtd |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
9 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
10 public Semtd() |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
11 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
12 throw new NotSupportedException(); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
13 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
14 public Semtd(string graphType, int numVerMain, int numVerDef) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
15 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
16 switch (graphType) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
17 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
18 case "wheel": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
19 case "fan": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
20 case "doublefan": |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
21 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
22 this.graphType = graphType; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
23 break; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
24 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
25 default: |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
26 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
27 throw new NotSupportedException(); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
28 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
29 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
30 if ((numVerDef < 0) || (numVerMain < 4)) |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
31 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
32 throw new NotSupportedException(); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
33 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
34 else |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
35 { |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
36 this.numVerMain = numVerMain; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
37 this.numVerDef = numVerDef; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
38 this.numVerTotal = this.numVerMain + this.numVerDef; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
39 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
40 this.numEdges = 0; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
41 this.graphConn = new bool[this.numVerMain, this.numVerMain]; |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
42 draw(this.graphType, 0, this.numVerMain - 1); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
43 labelReset(); |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
44 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
45 } |
ebed2bd0d300
Initial import from svn. History be damned.
Edho P. Arief <me@myconan.net>
parents:
diff
changeset
|
46 } |