示例#1
0
 public GuiForm(CString cs)
 {
     InitializeComponent();
     this.time = new CString();
     this.cs = cs;
     this.BackgroundImage = new Bitmap(this.Width, this.Height);
     g = Graphics.FromImage(this.BackgroundImage);
     this.con = new DrawContextGraphics(new float[] { 0, this.Width }, new float[] { 0, this.Height }, 0, 0, g, Pens.Black);
     drawAgain();
 }
示例#2
0
 private void textBox1_TextChanged(object sender, EventArgs e)
 {
     g.Clear(Color.White);
     CString cs = new CString(textBox1.Text);
     cs.OnImage(g, 10, 10, 1000, Pens.Black);
     StringBuilder sb = new StringBuilder();
     cs.ExplainToStringbuilder(sb);
     this.textBox2.Text = sb.ToString();
     pictureBox1.Refresh();
 }
示例#3
0
 /// <summary>
 /// Kopiert alle Member von a
 /// </summary>
 /// <param name="a"></param>
 public void Einverleiben(CString a)
 {
     List<IDrawable>.Enumerator wortEN = a.list.GetEnumerator();
     while (wortEN.MoveNext())
     {
         this.list.Add(wortEN.Current.Clone());
     }
 }
示例#4
0
 public IDrawable Clone()
 {
     CString cs = new CString();
     cs.Einverleiben(this);
     return cs;
 }
示例#5
0
 public void addCString(CString cs)
 {
     this.list.Add(cs);
 }
示例#6
0
 public static CString operator +(string b, CString a)
 {
     CString c = new CString();
     c.addWort(b);
     c.Einverknupfen(a);
     return c;
 }
示例#7
0
 public static CString operator +(CString a, CString b)
 {
     CString c = new CString();
     c.Einverknupfen(a);
     c.Einverknupfen(b);
     return c;
 }
示例#8
0
 public static CString operator *(CString a, CString b)
 {
     CString c = new CString();
     c.Einverknupfen(a);
     if (!c.endetMitAbsatz())
     {
         c.addAbsatz();
     }
     c.Einverknupfen(b);
     return c;
 }
示例#9
0
 public static GuiForm start(CString cs)
 {
     GuiForm f = new GuiForm(cs);
     f.ShowDialog();
     return f;
 }