示例#1
0
 private bool CheckSWClosed(StreamWindow obj)
 {
     if (obj.IsClosed)
     {
         return(true);
     }
     return(false);
 }
        private void StreamWindowLunchButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                this.CheckStreamWindows();
                if (this.TextBox_FinalFileName.Text == "")
                {
                    this.Button_NameUpdate_Click(sender, e);
                }
                #region StreamClientSetting

                StreamClient SC = new StreamClient();
                SC.name       = this.textbox_clientname.Text;
                SC.myport     = int.Parse(this.textbox_clientmyport.Text);
                SC.serverIP   = this.remoteIP.Text;
                SC.serverport = int.Parse(this.textbox_serverport.Text);
                if (this.radiobutton_sender.IsChecked == true)
                {
                    SC.mode = MODE.Sender;
                }
                else if (this.radiobutton_receiver.IsChecked == true)
                {
                    SC.mode = MODE.Receiver;
                }
                else
                {
                    MessageBox.Show("error." + this.ToString());
                }
                SC.fps      = int.Parse(this.textbox_fps.Text);
                SC.filename = this.TextBox_FinalFileName.Text;
                #endregion

                StreamWindow sw = new StreamWindow(this, SC);
                this.List_SW.Add(sw);
                sw.Show();
                this.ListProvider_SW.Refresh();
                this.textbox_clientmyport.Text = (int.Parse(this.textbox_clientmyport.Text) + 1).ToString();
                this.AutoFileNameNumber++;
                this.TextBlock_AutoNumber.Text = this.AutoFileNameNumber.ToString();
                this.Button_NameUpdate_Click(sender, e);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#3
0
        private void StreamWindowLunchButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                this.CheckStreamWindows();

                #region StreamClientSetting

                StreamClient SC = new StreamClient();
                SC.name       = this.textbox_clientname.Text;
                SC.myport     = int.Parse(this.textbox_clientmyport.Text);
                SC.serverIP   = this.remoteIP_1.Text + "." + this.remoteIP_2.Text + "." + this.remoteIP_3.Text + "." + this.remoteIP_4.Text;
                SC.serverport = int.Parse(this.textbox_serverport.Text);
                if (this.radiobutton_sender.IsChecked == true)
                {
                    SC.mode = MODE.Sender;
                }
                else if (this.radiobutton_receiver.IsChecked == true)
                {
                    SC.mode = MODE.Receiver;
                }
                else
                {
                    MessageBox.Show("error." + this.ToString());
                }
                SC.fps      = int.Parse(this.textbox_fps.Text);
                SC.filename = this.textbox_filename.Text;
                #endregion

                StreamWindow sw = new StreamWindow(this, SC);
                sw.Show();
                this.List_SW.Add(sw);
                this.textbox_clientmyport.Text = (int.Parse(this.textbox_clientmyport.Text) + 1).ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#4
0
        private void StreamWindowLunchButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                this.CheckStreamWindows();
                if (this.TextBox_FinalFileName.Text == "")
                {
                    this.Button_NameUpdate_Click(sender, e);
                }
                #region StreamClientSetting

                StreamClient SC = new StreamClient();
                SC.name = this.textbox_clientname.Text;
                SC.myport = int.Parse(this.textbox_clientmyport.Text);
                SC.serverIP = this.remoteIP.Text;
                SC.serverport = int.Parse(this.textbox_serverport.Text);
                if (this.radiobutton_sender.IsChecked == true)
                {
                    SC.mode = MODE.Sender;
                }
                else if (this.radiobutton_receiver.IsChecked == true)
                {
                    SC.mode = MODE.Receiver;
                }
                else
                {
                    MessageBox.Show("error." + this.ToString());
                }
                SC.fps = int.Parse(this.textbox_fps.Text);
                SC.filename = this.TextBox_FinalFileName.Text;
                #endregion

                StreamWindow sw = new StreamWindow(this, SC);
                this.List_SW.Add(sw);
                sw.Show();
                this.ListProvider_SW.Refresh();
                this.textbox_clientmyport.Text = (int.Parse(this.textbox_clientmyport.Text) + 1).ToString();
                this.AutoFileNameNumber++;
                this.TextBlock_AutoNumber.Text = this.AutoFileNameNumber.ToString();
                this.Button_NameUpdate_Click(sender, e);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        private void Button_ALL_RESET_Click(object sender, RoutedEventArgs e)
        {
            this.Button_ALL_STOP_Click(sender, e);

            try
            {
                this.UpdateStatusCaption(this.List_SW.FindAll(k => (!k.IsRecStarted || !k.IsSendStarted)).Count.ToString() + "個のクライアントを終了します");
                List<StreamWindow> StreamWindowList = new List<StreamWindow>();
                foreach (var p in this.List_SW)
                {
                    if (!p.IsRecStarted || !p.IsSendStarted)
                    {
                        var SC = p.SC;
                        p.Button_Click(sender, e);

                        Thread.Sleep(100);
                        Regex reg = new Regex("_\\d\\d_\\d\\d_\\d\\d_\\d\\d_\\d\\d_\\d\\d_\\d\\d.scd$");
                        SC.filename = reg.Replace(SC.filename, DateTime.Now.ToString("_yy_MM_dd_HH_mm_ss_ff") +".scd");
                        StreamWindow sw = new StreamWindow(this, SC);
                        StreamWindowList.Add(sw);
                        sw.Show();
                    }
                }
                this.List_SW.AddRange(StreamWindowList);

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#6
0
        private void StreamWindowLunchButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                this.CheckStreamWindows();

                #region StreamClientSetting

                StreamClient SC = new StreamClient();
                SC.name = this.textbox_clientname.Text;
                SC.myport = int.Parse(this.textbox_clientmyport.Text);
                SC.serverIP = this.remoteIP_1.Text + "." + this.remoteIP_2.Text + "." + this.remoteIP_3.Text + "." + this.remoteIP_4.Text;
                SC.serverport = int.Parse(this.textbox_serverport.Text);
                if (this.radiobutton_sender.IsChecked == true)
                {
                    SC.mode = MODE.Sender;
                }
                else if (this.radiobutton_receiver.IsChecked == true)
                {
                    SC.mode = MODE.Receiver;
                }
                else
                {
                    MessageBox.Show("error." + this.ToString());
                }
                SC.fps = int.Parse(this.textbox_fps.Text);
                SC.filename = this.textbox_filename.Text;
                #endregion

                StreamWindow sw = new StreamWindow(this, SC);
                sw.Show();
                this.List_SW.Add(sw);
                this.textbox_clientmyport.Text = (int.Parse(this.textbox_clientmyport.Text) + 1).ToString();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
示例#7
0
 private bool CheckSWClosed(StreamWindow obj)
 {
     if (obj.IsClosed)
     {
         return true;
     }
     return false;
 }