Exemplo n.º 1
0
 void Lyap_AreaCompleted(object src, Generator.ProgressedEventArgs e)
 {
     if (_Image == null)
     {
         return;
     }
     progress = e.Progress;
     AddArea(e.X, e.Y, e.Z, e.Image);
     //ImageUpdateEventArgs args = new ImageUpdateEventArgs();
     //args.X = e.X;
     //args.Column = e.Column;
     //pictureBox1.Image = e.Column;
     if (waitrefresh >= refreshrate)
     {
         waitrefresh = 0;
         _output_pb.BackgroundImage = _Image;
         UICallerDelegate dlg = new UICallerDelegate(UpdatePicBox);
         BeginInvoke(dlg, null);
     }
     else
     {
         waitrefresh++;
     }
     try
     {
         UICallerDelegate delg = new UICallerDelegate(UpdateProgBar);
         BeginInvoke(delg, null);
     }
     catch { }
 }
Exemplo n.º 2
0
        void Lyap_PicCompleted(object src, EventArgs e)
        {
            //completed = true;
            prog_pri.Value             = 0;
            btn_start.Text             = "Start";
            _output_pb.BackgroundImage = _Image;
            UICallerDelegate dlg = new UICallerDelegate(UpdatePicBox);

            BeginInvoke(dlg, null);

            bool alldone = true;

            foreach (LyapunovGenerator lyap in Lyaps)
            {
                if (!lyap.IsComplete)
                {
                    alldone = false;
                }
            }

            if (alldone)
            {
                colsDone = 0;
                UICallerDelegate delg = new UICallerDelegate(UpdateProgBar);
                BeginInvoke(delg, null);
            }
        }
Exemplo n.º 3
0
        void Lyap_PicCompleted(object src, EventArgs e)
        {
            _output_pb.BackgroundImage = _Image;
            UICallerDelegate dlg = new UICallerDelegate(UpdatePicBox);

            BeginInvoke(dlg, null);
            bool complete = true;

            foreach (Generator Lyap in Lyaps)
            {
                if (!Lyap.IsComplete)
                {
                    complete = false;
                    break;
                }
            }
            if (complete)
            {
                string msgText = "Completed in: " + CalcDuration();
                toolStripStatusLabel1.Text = msgText;
                MessageBox.Show(msgText);
                progress = 0;
                UICallerDelegate delg = new UICallerDelegate(UpdateProgBar);
                BeginInvoke(delg, null);
            }
        }
Exemplo n.º 4
0
 private void SetStatusText(string status)
 {
     if (this.InvokeRequired)
     {
         UICallerDelegate dlg = new UICallerDelegate(SetStatusText);
         BeginInvoke(dlg, status);
     }
     else
     {
         this.Lbl_Status.Text = status;
     }
 }
Exemplo n.º 5
0
 private void SetText(string message)
 {
     if (this.InvokeRequired == true)
     {
         UICallerDelegate dlg = new UICallerDelegate(SetText);
         BeginInvoke(dlg, new object[] { message });
     }
     else
     {
         this.txtLog.Text += message;
     }
 }
Exemplo n.º 6
0
 private void SetStatusText(string status)
 {
     if (this.InvokeRequired)
     {
         UICallerDelegate dlg = new UICallerDelegate(SetStatusText);
         BeginInvoke(dlg, status);
     }
     else
     {
         this.Lbl_CurrentState.Text = status;
     }
 }
Exemplo n.º 7
0
 public void OnClientConnect(IAsyncResult asyn)
 {
     try
     {
         Lyaps.Add(new NetworkGenerator(_mainSocket.EndAccept(asyn)));
         _mainSocket.BeginAccept(new AsyncCallback(OnClientConnect), null);
         InitLyap(Lyaps[Lyaps.Count - 1]);
         UICallerDelegate dlg = new UICallerDelegate(UpdateStatusStripNC);
         BeginInvoke(dlg, null);
     }
     catch (SocketException se)
     {
         MessageBox.Show(se.Message);
     }
 }
Exemplo n.º 8
0
 void Lyap_PicCompleted(object src, EventArgs e)
 {
     _output_pb.BackgroundImage = _Image;
     UICallerDelegate dlg = new UICallerDelegate(UpdatePicBox);
     BeginInvoke(dlg, null);
     bool complete = true;
     foreach (Generator Lyap in Lyaps)
     {
         if (!Lyap.IsComplete)
         {
             complete = false;
             break;
         }
     }
     if (complete)
     {
         string msgText = "Completed in: " + CalcDuration();
         toolStripStatusLabel1.Text = msgText;
         MessageBox.Show(msgText);
         progress = 0;
         UICallerDelegate delg = new UICallerDelegate(UpdateProgBar);
         BeginInvoke(delg, null);
     }
 }
Exemplo n.º 9
0
 void Lyap_AreaCompleted(object src, Generator.ProgressedEventArgs e)
 {
     if (_Image == null) return;
     progress = e.Progress;
     AddArea(e.X, e.Y, e.Z, e.Image);
     //ImageUpdateEventArgs args = new ImageUpdateEventArgs();
     //args.X = e.X;
     //args.Column = e.Column;
     //pictureBox1.Image = e.Column;
     if (waitrefresh >= refreshrate)
     {
         waitrefresh = 0;
         _output_pb.BackgroundImage = _Image;
         UICallerDelegate dlg = new UICallerDelegate(UpdatePicBox);
         BeginInvoke(dlg, null);
     }
     else
     {
         waitrefresh++;
     }
     try
     {
         UICallerDelegate delg = new UICallerDelegate(UpdateProgBar);
         BeginInvoke(delg, null);
     }
     catch { }
 }
Exemplo n.º 10
0
 public void OnClientConnect(IAsyncResult asyn)
 {
     try
     {
         Lyaps.Add(new NetworkGenerator(_mainSocket.EndAccept(asyn)));
         _mainSocket.BeginAccept(new AsyncCallback(OnClientConnect), null);
         InitLyap(Lyaps[Lyaps.Count - 1]);
         UICallerDelegate dlg = new UICallerDelegate(UpdateStatusStripNC);
         BeginInvoke(dlg, null);
     }
     catch (SocketException se)
     {
         MessageBox.Show(se.Message);
     }
 }
Exemplo n.º 11
0
        void Lyap_PicCompleted(object src, EventArgs e)
        {
            //completed = true;
                prog_pri.Value = 0;
                btn_start.Text = "Start";
                _output_pb.BackgroundImage = _Image;
                 UICallerDelegate dlg = new UICallerDelegate(UpdatePicBox);
                BeginInvoke(dlg, null);

            bool alldone = true;

            foreach (LyapunovGenerator lyap in Lyaps) if (!lyap.IsComplete) alldone = false;

            if (alldone)
            {
                colsDone = 0;
                UICallerDelegate delg = new UICallerDelegate(UpdateProgBar);
                BeginInvoke(delg, null);
            }
        }