Exemplo n.º 1
0
 public SerifuWindow()
 {
     InitializeComponent();
     w     = (int)Width;
     h     = (int)Height;
     brain = SeyanaBrain.SeyanaBrainFactory;
 }
Exemplo n.º 2
0
 public Clock()
 {
     InitializeComponent();
     w = (int)Width;
     Task.Factory.StartNew(run);
     brain = SeyanaBrain.SeyanaBrainFactory;
 }
Exemplo n.º 3
0
 public ConfigWindow(double scale, double speed, double randomWalkThreshold) : this()
 {
     brain      = SeyanaBrain.SeyanaBrainFactory;
     this.scale = scale;
     this.speed = speed;
     this.randomWalkThreshold = randomWalkThreshold;
     for (int i = 0; i < scaleList.Count; ++i)
     {
         if (scale == scaleList[i])
         {
             cScale.SelectedIndex = i;
         }
     }
     for (int i = 0; i < speedList.Count; ++i)
     {
         if (speed == speedList[i])
         {
             cSpeed.SelectedIndex = i;
         }
     }
     for (int i = 0; i < rwtList.Count; ++i)
     {
         if (randomWalkThreshold == rwtList[i])
         {
             cRWT.SelectedIndex = i;
         }
     }
 }
Exemplo n.º 4
0
 public ConfigWindow(SeyanaBrain brain) : this()
 {
     this.brain = brain;
     for (int i = 0; i < scaleList.Count; ++i)
     {
         if (brain.scale == scaleList[i])
         {
             cScale.SelectedIndex = i;
         }
     }
     for (int i = 0; i < speedList.Count; ++i)
     {
         if (brain.speed == speedList[i])
         {
             cSpeed.SelectedIndex = i;
         }
     }
     for (int i = 0; i < rwtList.Count; ++i)
     {
         if (brain.randomWalkThreshold == rwtList[i])
         {
             cRWT.SelectedIndex = i;
         }
     }
 }
Exemplo n.º 5
0
        public MainWindow()
        {
            InitializeComponent();

            Show();

            brain = SeyanaBrain.SeyanaBrainFactory;
            sw    = new SerifuWindow();
            ebi   = new ebifry();

            brain.init(this, sw, ebi);
            sw.Owner  = this;
            ebi.Owner = this;

            x = 100;
            y = 200;

            Width  = WIDTH;
            Height = HEIGHT;
            var p0 = PointToScreen(new Point(0, 0));
            var p1 = PointToScreen(new Point(Width, Height));

            w = (int)(p1.X - p0.X);
            h = (int)(p1.Y - p0.Y);

            setPosition();
        }
Exemplo n.º 6
0
        public ebifry()
        {
            InitializeComponent();

            brain = SeyanaBrain.SeyanaBrainFactory;

            Show();
            var p0 = PointToScreen(new Point(0, 0));
            var p1 = PointToScreen(new Point(Width, Height));

            w = (int)(p1.X - p0.X);
            h = (int)(p1.Y - p0.Y);
            Hide();

            live = false;
        }