public frmMain() { InitializeComponent(); listItemDelegate = new AddListItem(AddListItemMethod); AddTextDelegate = new AddText(AddtextMethod); resetButtonDelegate = new ResetButton(ResetButtonMethod); }
public Form1() { //myTimer = new PrecisionTimer.Timer(); //myTimer.period //chartViewer = new ChartDirector.WinChartViewer(); InitializeComponent(); var ports = SerialPort.GetPortNames(); SerialPort_List.Items.AddRange(ports); SerialPort_List.DataSource = ports; threshold_value.Text = ((UInt16)(Threshold_Limit.Maximum - Threshold_Limit.Value)).ToString(); myDelegate = new AddListItem(AddListItemMethod); //display.Smoothing = System.Drawing.Drawing2D.SmoothingMode.None; this.Load += Form1_Load; // Data generation rate dataRateTimer.Interval = 250; Countdown = COUNTDOWN_VALUE; // Initialize data buffer to no data. for (int i = 0; i < timeStamps.Length; ++i) { timeStamps[i] = DateTime.MinValue; } // Now can start the timers for data collection and chart update dataRateTimer.Start(); }
public MainForm() { InitializeComponent(); ///Register Debug or Trace listener. Debug.Listeners.Add(new MyTraceListener(Mode.Debug)); //Trace.Listeners.Add(new MyTraceListener(Mode.Trace)); pluginLoader = new PluginLoader(); ///Watch over base directory for dll files. pluginWatcher = new FileSystemWatcher(AppDomain.CurrentDomain.BaseDirectory, "*.dll"); pluginWatcher.Created += PlugginAdded; pluginWatcher.Deleted += PlugginDeleted; pluginWatcher.EnableRaisingEvents = true; ///Bitmap used to draw stuff. bitmap = new Bitmap(canvas.Width, canvas.Height); ///Load plugins. pluginLoader.LoadPlugins(); ///Register delegates. addListItemDelegate = AddListItemMethod; removePluginsDelegate = RemoveAllPluginButtons; addPluginButtonsDelegate = AddPlugingButtons; ///Set different culture info. (Default and cs are avaible.) //Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo("en-GB"); }
public ScannerBox(ScannerDashboard sd) { InitializeComponent(); if (dtFeed.Columns.Contains("Time") == false) { var colTime = dtFeed.Columns.Add("Time"); var colSymbol = dtFeed.Columns.Add("Symbol"); var colExpiry = dtFeed.Columns.Add("Expiry"); var colStrike = dtFeed.Columns.Add("Strike", typeof(int)); var colPC = dtFeed.Columns.Add("PC"); var colExch = dtFeed.Columns.Add("Exch"); var colClosePrice = dtFeed.Columns.Add("ClosePrice", typeof(double)); var colLTP = dtFeed.Columns.Add("LTP", typeof(double)); var colQuantity = dtFeed.Columns.Add("Quantity", typeof(int)); // set primary key constain so we can search for specific rows dtFeed.PrimaryKey = new[] { colSymbol, colExpiry, colStrike, colPC, colExch }; } dataGridView1.DataSource = dtFeed; foreach (DataGridViewColumn column in dataGridView1.Columns) { column.SortMode = DataGridViewColumnSortMode.Automatic; } parentSD = sd; ScannerBox.openedMainForm = true; myDelegate = new AddListItem(AddListItemMethod); myThread = new Thread(new ThreadStart(ThreadFunction)); myThread.Start(); }
public Form1() { InitializeComponent(); //listView1.Items.Add("google"); myDelegate = new AddListItem(AddListItemMethod); myDelegatemsg = new getmsg(getnewmsg); }
public frmMain() { InitializeComponent(); listItemDelegate = new AddListItem(AddListItemMethod); AddTextDelegate = new AddText(AddtextMethod); resetButtonDelegate = new ResetButton(ResetButtonMethod); }
public ShoppingCart() { InitializeComponent(); addTag = new AddListItem(addTagMethod); Thread readerThread = new Thread(startScanning); readerThread.Start(); }
public TeacherWord() { InitializeComponent(); this.Group = "導師的話"; this.PrimaryKeyChanged += new EventHandler(TeacherWord_PrimaryKeyChanged); if (FISCA.Permission.UserAcl.Current["TeacherWord"].Editable) { //this.addbutton.Visible = true; //this.editbutton.Visible = true; //this.delbutton.Visible = true; } else if (FISCA.Permission.UserAcl.Current["TeacherWord"].Viewable) { //this.addbutton.Visible = false; //this.editbutton.Visible = false; //this.delbutton.Visible = false; } //-------- _Loader.DoWork += new DoWorkEventHandler(_Loader_DoWork); _Loader.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_Loader_RunWorkerCompleted); //NewStudent.Instance.ItemUpdated += //然候按兩下tab //NewStudent.Instance.ItemUpdated += new EventHandler<Framework.ItemUpdatedEventArgs>(Instance_ItemUpdated); myDelegate = new AddListItem(changeText); }
//Trainer tr = new BackPropagationTrainer(new HandWriting()); public Form1() { InitializeComponent(); tr.Init(); mydelegate = new AddListItem(AddProgress); }
//private string _rtk; //private string token; public AddFriendForm(string Cookiesstr, CookieContainer cc, string _rtk, string token) { InitializeComponent(); listView1.View = View.Details; AddFriendDelegate = new AddListItem(AddFriendListItemMethod); SetLabelDelegate = new SetLabel(SetFriendCountLabel); FriendDelegate = new AddListItem(FriendListItemMethod); }
public MainForm() { InitializeComponent(); m_addMessageDelegate = new AddListItem(this.addMessage); m_removeMessageDelegate = new RemoveListItem(this.removeMessage); m_initMessageListDelegate = new InitList(this.initializeMessageList); m_updateStatusDelegate = new UpdateStatus(this.updateStatus); m_dispErrorMessageDelegate = new DispErrorMessage(this.displayErrorMessage); }
public UredjivanjeLinije(Linija l, PregledLinija pl) { InitializeComponent(); linija = l; pozvanOd = pl; myDelegate = new AddListItem(AddListItemMethod); myDelegate1 = new AddListItem1(AddListItemMethod1); popuniKomponente(); }
public Form1() { InitializeComponent(); myDelegate = new AddListItem(AddListItemMethod); myDelegate2 = new AddListItem(AddVelocidad); // myDelegate3 = new AddListItem(AddPosicion); myDelegate4 = new AddListItem(AddIp); myDelegate5 = new AddListItem(AddPseu); CoorX2 = -1632751; }
public void AddListItemMethod(String myString) { if (this.cboClient.InvokeRequired) { AddListItem myDelegate = new AddListItem(AddListItemMethod); this.Invoke(myDelegate, new object[] { myString }); } else { cboClient.Items.Add(myString); } }
public LogForm() { InitializeComponent(); ILogManager lm = l as ILogManager; if (lm != null) lm.SetLevel(LogLevel.Debug); addListItem = new AddListItem(AddListItemMethod); l.LogEvent += new LogEventHandler(l_LogEvent); l.Debug("LogForm()"); }
// Use this for initialization void Start() { pf = FindObjectOfType <Camera>().GetComponent <PlayerFollow>(); UICanvasPerder = UICanvasMenu = transform.Find("Canvas").transform.Find("Panel Perder").gameObject; UICanvasMenu = transform.Find("Canvas").transform.Find("Panel Menu").gameObject; ali = UICanvasMenu.transform.Find("Lista de Salas").transform.Find("ElementGrid").GetComponent <AddListItem>(); spawnPoints = transform.GetComponentsInChildren <Transform>(); if (!PhotonNetwork.connected) { PhotonNetwork.ConnectUsingSettings("1.0a"); } typedLobby = new TypedLobby("Main", LobbyType.Default); }
private void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e) { try { SerialPort sp = (SerialPort)sender; string indata = sp.ReadLine(); myDelegate = new AddListItem(AddListItemMethod); listBox_portLogs.Invoke(myDelegate, new Object[] { "[" + DateTime.Now.Hour + ":" + DateTime.Now.Minute + ":" + DateTime.Now.Second + "] : " + indata }); } catch (Exception ex) { MessageBox.Show(ex.Message, "Erreur !", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public FormMain() { if (!string.IsNullOrEmpty(Properties.Settings.Default.Language)) { Thread.CurrentThread.CurrentUICulture = System.Globalization.CultureInfo.GetCultureInfo(Properties.Settings.Default.Language); Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo(Properties.Settings.Default.Language); } is_en_culture = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName == "en"; InitializeComponent(); tbLog = new FormMainLog(this); fc = new FileCollection(tbLog); tbPath.Text = fc.GetDefaultDirectory(); myDelegate = new AddListItem(AddListItemMethod); }
public LogForm() { InitializeComponent(); ILogManager lm = l as ILogManager; if (lm != null) { lm.SetLevel(LogLevel.Debug); } addListItem = new AddListItem(AddListItemMethod); l.LogEvent += new LogEventHandler(l_LogEvent); l.Debug("LogForm()"); }
public MainForm() { InitializeComponent(); xPosBox.Value = Properties.Settings.Default.OverlayXPos; yPosBox.Value = Properties.Settings.Default.OverlayYPos; widthBox.Value = Properties.Settings.Default.OverlayWidth; heightBox.Value = Properties.Settings.Default.OverlayHeight; fontSizeBox.Value = (decimal)Properties.Settings.Default.OverlayFontSize; setOverlayLocation(); m_overlayForm.setFontSize(Properties.Settings.Default.OverlayFontSize); m_overlayForm.Width = Properties.Settings.Default.OverlayWidth; m_overlayForm.Height = Properties.Settings.Default.OverlayHeight; m_addMessageDelegate = new AddListItem(this.addMessageToList); m_removeMessageDelegate = new RemoveListItem(this.removeMessageFromList); setOverlayVisible(false); }
public AddListItem myDelegate; //Экземпляр Делегата дял записи в текстбокс public FormClient(Socket socket, IAsyncResult ar) { myDelegate = new AddListItem(addTextMethod); buffer = new byte[1024]; s = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); Thread th = new Thread(recive); //Поток для приема даннх th.Start(); Thread th2 = new Thread(connectionFlag); //Поток для проверки доступности клиента th2.Start(); try { s = socket.EndAccept(ar); } catch (Exception e) { MessageBox.Show(e.Message); } if (this.IsHandleCreated) { this.Text = s.RemoteEndPoint.ToString(); insertDb(s.RemoteEndPoint.ToString(), s.RemoteEndPoint.ToString(), DateTime.Now.ToString()); } else { Thread.Sleep(500); try { this.Text = s.RemoteEndPoint.ToString(); insertDb(s.RemoteEndPoint.ToString(), s.RemoteEndPoint.ToString(), DateTime.Now.ToString()); } catch (Exception e) { //MessageBox.Show(e.Message); } } links.EventHandler(s); InitializeComponent(); }
public MyFormControl() { myButton = new Button(); myListBox = new ListBox(); myButton.Location = new Point(72, 160); myButton.Size = new Size(152, 32); myButton.TabIndex = 1; myButton.Text = "Add items in list box"; myButton.Click += new EventHandler(Button_Click); myListBox.Location = new Point(48, 32); myListBox.Name = "myListBox"; myListBox.Size = new Size(200, 95); myListBox.TabIndex = 2; ClientSize = new Size(292, 273); Controls.AddRange(new Control[] {myListBox,myButton}); Text = " 'Control_Invoke' example "; myDelegate = new AddListItem(AddListItemMethod); }
public MyFormControl() { myButton = new Button(); myListBox = new ListBox(); myButton.Location = new Point(72, 160); myButton.Size = new Size(152, 32); myButton.TabIndex = 1; myButton.Text = "Add items in list box"; myButton.Click += new EventHandler(Button_Click); myListBox.Location = new Point(48, 32); myListBox.Name = "myListBox"; myListBox.Size = new Size(200, 95); myListBox.TabIndex = 2; ClientSize = new Size(292, 273); Controls.AddRange(new Control[] { myListBox, myButton }); Text = " 'Control_Invoke' example "; myDelegate = new AddListItem(AddListItemMethod); }
public DefaultGui(IBackend backend) : base() { if (backend == null) { throw new ArgumentNullException("invalid value for 'backend': null"); } this.ba = backend; myDelegate = new AddListItem(repaint); InitializeComponent(); // we usually don't have a console in a form-project. This enables us to see debug-output anyway AllocConsole(); this.board.Paint += board_PaintMap; this.board.Paint += board_PaintEntities; this.chatInput.KeyPress += chat_KeyPress; this.board.KeyPress += board_KeyPress; int map_XKoord = backend.getTilesOfMap()[0].Length; int map_YKoord = backend.getTilesOfMap().Length; }
public PFWaitBox(Action doAction, string waitMsg = "请等待", Action <PFWaitBox> formAction = null) : base() { myButton = new Label(); //myButton.Location = new Point(72, 160); myButton.Location = new Point(72, 72); //myButton.Size = new Size(152, 32); myButton.TabIndex = 1; myButton.Text = waitMsg; myButton.Width = int.Parse(PFDataHelper.GetWordsWidth(waitMsg).Replace("px", "")); var lab = myButton; var waitForm = this; waitForm.Width = lab.Width + 200; waitForm.Height = lab.Height + 100; //waitForm.FormBorderStyle = FormBorderStyle.FixedSingle; int windowBorder = (waitForm.Width - waitForm.ClientRectangle.Width) / 2; int topHeight = (waitForm.Height - waitForm.ClientRectangle.Height - windowBorder); lab.Location = new Point((waitForm.Width - lab.Width) / 2, (waitForm.Height - topHeight - lab.Height) / 2); //ClientSize = new Size(292, 273); //ClientSize = new Size(292, 185); Controls.AddRange(new Control[] { myButton }); //Text = " 'Control_Invoke' example"; Text = "稍后"; #region by wxj action = doAction; if (formAction != null) { formAction(this); } #endregion myDelegate = new AddListItem(AddListItemMethod); //myThread = new Thread(new ThreadStart(ThreadFunction)); //myThread.Start(); }
public Form1() { InitializeComponent(); m_ReaderAPI = new RFIDReader("localhost", 5084, 0); m_ReaderAPI.Connect(); m_IsConnected = true; m_ReaderAPI.Events.NotifyInventoryStartEvent = true; m_ReaderAPI.Events.NotifyInventoryStopEvent = true; m_ReaderAPI.Events.NotifyAccessStartEvent = true; m_ReaderAPI.Events.NotifyAccessStopEvent = true; m_ReaderAPI.Events.NotifyAntennaEvent = true; m_ReaderAPI.Events.NotifyBufferFullEvent = true; m_ReaderAPI.Events.NotifyBufferFullWarningEvent = true; m_ReaderAPI.Events.NotifyReaderExceptionEvent = true; m_ReaderAPI.Events.NotifyReaderDisconnectEvent = true; m_ReaderAPI.Events.StatusNotify += new Events.StatusNotifyHandler(Events_StatusNotify); m_ReaderAPI.Events.ReadNotify += new Events.ReadNotifyHandler(Events_ReadNotify); myDelegate = new AddListItem(addTag); labelLog.Text = "Probando " + EpcTools.getUpc("E20068060000000000000000"); }
public MyFormControl() { this.button1 = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // button1 // this.button1.Location = new System.Drawing.Point(622, 205); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(612, 178); this.textBox1.Name = "textBox1"; myButton = new Button(); myListBox = new ListBox(); myButton.Location = new Point(72, 160); myButton.Size = new Size(152, 32); myButton.TabIndex = 1; myButton.Text = "Add items in list box"; myButton.Click += new EventHandler(Button_Click); myListBox.Location = new Point(48, 32); myListBox.Name = "myListBox"; myListBox.Size = new Size(200, 95); myListBox.TabIndex = 2; ClientSize = new Size(292, 273); Controls.AddRange(new Control[] { myListBox, myButton, button1, textBox1 }); Text = " 'Control_Invoke' example"; myDelegate = new AddListItem(AddListItemMethod); }
public Form1() { InitializeComponent(); myDelegate = new AddListItem(AddListItemMethod); peersListe.FullRowSelect = true; }
public MainForm() { InitializeComponent(); AddListItemDelegate = AddListItemMethod; }
public Form1() { InitializeComponent(); myDelegate = new AddListItem(AddListItemMethod); }
void Xor() { mydelegate = new AddListItem(AddProgress); for (int j = 0; j < 10000; j++) { DateTime start = DateTime.Now; for (int i = 0; i < iteracciones; i++) { tr.TrainNetwork(); } timeItTook = DateTime.Now - start; if (iteracciones == 100000) { //iteracciones = 1000 * iteracciones / timeItTook.Milliseconds; } try { Invoke(mydelegate); Invalidate(); } catch { return; } } }
public MyThreadClass(UredjivanjeLinije myForm, AddListItem m) { myFormControl1 = myForm; myDelegate = m; }
public frmSerialInspection() { InitializeComponent(); dlgAddResult = new AddListItem(addResult); }
public FindFileForm(string StartPath) { path = StartPath; Height = 400; Width = 600; FileList = new ListView(); FileList.Dock = DockStyle.Fill; FileList.View = View.Details; FileList.Columns.Add("Название", 550); this.Controls.Add(FileList); ControlPanel = new Panel(); this.Controls.Add(ControlPanel); ControlPanel.Dock = DockStyle.Top; ControlPanel.Size = new Size(0, 50); CloseBtn = new Button(); CloseBtn.Location = new Point(450, 3); CloseBtn.Size = new Size(72, 23); CloseBtn.Text = "Закрыть"; ControlPanel.Controls.Add(CloseBtn); Label txtLabel = new Label(); txtLabel.Location = new Point(0, 0); txtLabel.Size = new System.Drawing.Size(175, 23); txtLabel.Text = "Введите шаблон поиска"; ControlPanel.Controls.Add(txtLabel); mask = new TextBox(); mask.Location = new Point(0, 23); mask.Size = new System.Drawing.Size(185, 23); mask.Text = "*.*"; ControlPanel.Controls.Add(mask); mask.KeyDown += Mask_KeyDown; Label txtLabel2 = new Label(); txtLabel2.Location = new Point(190, 0); txtLabel2.Size = new System.Drawing.Size(175, 23); txtLabel2.Text = "Папка начала поиска:"; ControlPanel.Controls.Add(txtLabel2); dir = new TextBox(); dir.Location = new Point(190, 23); dir.Size = new System.Drawing.Size(185, 23); dir.Text = path; ControlPanel.Controls.Add(dir); dir.KeyDown += Mask_KeyDown; FindBtn = new Button(); FindBtn.Location = new Point(450, 25); FindBtn.Size = new System.Drawing.Size(72, 23); FindBtn.Text = "Найти"; ControlPanel.Controls.Add(FindBtn); FindBtn.MouseDown += FindBtn_MouseDown; FindBtn.Click += FindBtn_Click; CloseBtn.Click += CloseBtn_Click; //создаём делегат для добавления в ListView новой строки myDeligate = new AddListItem(AddListItemMethod); InitializeComponent(); }
public fghj() { InitializeComponent(); myDelegate = new AddListItem(AddListItemMethod); MyUDPServer.Start(this); }
public Form1() { myDelegate = new AddListItem(makeGraph); InitializeComponent(); }
public frmMain() { InitializeComponent(); m_addToLogDelegate = new AddListItem(AddToLog); }
private void dl_config() { AddText method = new AddText(this.add_text); AddListItem item = new AddListItem(this.add_list_item); base.Invoke(method, new object[] { "检测是否有新版本..." }); base.Invoke(method, new object[] { "读取远程配置文件..." }); ini_config _config = new ini_config("config.ini"); try { bool flag = false; Thread thread = new Thread(new ThreadStart(this.GetAddress)) { IsBackground = true }; thread.Start(); thread.Join(); if (!string.IsNullOrEmpty(this.text)) { if (this.text.IndexOf("#END#") == -1) { throw new Exception(); } string[] strArray = this.text.Split(Environment.NewLine.ToCharArray()); string str = string.Empty; string str2 = _config.read_ini("VeryPdf", "App"); string str3 = string.Empty; string str4 = ""; for (int i = 0; i < (strArray.Length - 1); i++) { if (strArray[i] != string.Empty) { if (strArray[i].Contains("#END#")) { break; } if (strArray[i].Contains("version")) { str = strArray[i].Split(new char[] { ',' })[1]; } else if (strArray[i].Contains("veryPdf")) { str3 = strArray[i].Split(new char[] { ',' })[1]; } else { string[] strArray2 = strArray[i].Split(new char[] { ',' }); if (!(PDF_Convert.Version.dic_ver.TryGetValue(strArray2[0], out str4) && (System.Convert.ToInt32(PDF_Convert.Version.dic_ver[strArray2[0]].Replace(".", "")) >= System.Convert.ToInt32(strArray2[1].Replace(".", ""))))) { this.dl_lst.Add(new detail_list(strArray2[2], System.Convert.ToInt32(strArray2[3]))); base.Invoke(item); flag = true; } } } } if (!string.IsNullOrEmpty(str3)) { try { if (string.IsNullOrEmpty(str2) || (System.Convert.ToDouble(str2) < System.Convert.ToDouble(str3))) { this.dl_lst.Add(new detail_list("VeryPdf.rar", 0x4f832a)); base.Invoke(item); flag = true; } } catch { } } if (flag) { base.Invoke(new _Show(this.show_this_window)); base.Invoke(method, new object[] { "开始下载新文件..." }); Thread thread2 = new Thread(new ThreadStart(this.dl_file)) { IsBackground = true }; thread2.Start(); thread2.Join(); ProcessStartInfo startInfo = new ProcessStartInfo(Application.StartupPath + @"\PDF Update.exe") { Arguments = "Madoka " + Process.GetCurrentProcess().Id.ToString() }; foreach (detail_list _list in this.dl_lst) { startInfo.Arguments = startInfo.Arguments + string.Format(" \"{0}\"", _list.file_name); } Process.Start(startInfo); base.Invoke(method, new object[] { "下载新文件成功,程序即将退出以便进行更新" }); Thread.Sleep(0x3e8); _config.write_ini("Version", str, "App"); _config.write_ini("VeryPdf", str3, "App"); } base.Invoke(new _Exit(this.Close)); } } catch { base.Invoke(new _Exit(this.Close)); } }
private void buttonSearch_Click(object sender, EventArgs e) { try { Cursor = Cursors.WaitCursor; listViewFlight.Items.Clear(); addListItem = new AddListItem(AddListItemMethod); SAPFlightConnection _flightConnection = new SAPFlightConnection(Config.SAPUserName, Config.SAPPassword); string airlineID = string.Empty; string travelAgency = string.Empty; if (comboBoxAirline.SelectedIndex > -1) { airlineID = (string)comboBoxAirline.SelectedValue; } if (comboBoxTravelAgency.SelectedIndex > -1) { travelAgency = (string)comboBoxTravelAgency.SelectedValue; } PseudoProgressForm progress = new PseudoProgressForm(); progress.ProgressLabel = "Querying SAP..."; BackgroundWorker bgWorker = new BackgroundWorker(); string destinationTo = comboBoxTo.Text; string destinationFrom = textBoxCity.Text; bgWorker.DoWork += delegate(object senderWorker, DoWorkEventArgs eWorker) { if (_flightConnection.GetList( airlineID, travelAgency, destinationFrom, destinationTo)) { _flConn = _flightConnection._bapiConnectionList; _connectionList = new List <FlightConnectionList>(); foreach (BAPISCODAT item in _flConn) { Invoke(addListItem, item); } } }; bgWorker.RunWorkerCompleted += delegate(object senderWorker, RunWorkerCompletedEventArgs eWorker) { progress.Close(); progress.Dispose(); if (listViewFlight.Items.Count == 0) { Message.DisplayMessage("No records found."); } }; bgWorker.RunWorkerAsync(); progress.ShowDialog(); } catch (Exception ex) { ErrorForm errorForm = new ErrorForm(ex.Message, ex.ToString()); errorForm.ShowDialog(this); errorForm.Close(); } finally { Cursor = Cursors.Default; } }
public Form1() { // Start GUI form InitializeComponent(); /* Below here resides the initialization code for the voice communication section in the peer interface. */ // Set default values on form load CmbBox_SampleRate.SelectedIndex = 7; CmbBox_BitDepth.SelectedIndex = 1; CmbBox_BitDepth.Enabled = false; Txt_ServAddress.Text = "127.0.0.1"; Txt_ServPort.Text = "6700"; // List input devices on form load GetInputDevices(); GetInputDevicesList(); /* Stop audio section */ // Show peer address to user Txt_Address.Text = GetIpAddress(); //setServerAddress("10.134.172.46"); Txt_LoginServAddress.Text = getServerAddress(); Thread.Sleep(3000); sendThread = new Thread(new ThreadStart(UdpSender)); listenThread = new Thread(new ThreadStart(UdpListener)); // Start sender and listener threads //sendThread.Start(); listenThread.Start(); // Set the delegate myDelegate = new AddListItem(AddListItemMethod); requestDelegate = new AddRequestListItem(AddRequestMethod); }
public void AddTextToElement(string textToAdd) { myDelegate = AddListItemMethod; _box.Invoke(myDelegate, new object[] { textToAdd }); }
private System.Windows.Forms.TextBox txtServerInfo; // workaround to show SelServer Form on applic. start #endregion Fields #region Constructors public MainForm() { thisprocess = Process.GetCurrentProcess(); // see DoConnect for client-name Computer myComp = new Computer(); sCompName = myComp.Name; // HOST-Name InitializeComponent(); lbLoggDelegate = new AddListItem(AddlbLoggItemMethod); setTextInTxbDelegate = new setTextInTxb(setTextInTxbMethod); }