private void button15_Click(object sender, EventArgs e) { //this.CreateNewItemPanel1.Visible = false; doClearCreateForm(); this.CreateNewBarcodeTB.Text = ""; this.Close(); form1 lb = new form1(); //lb.m_sTotalPoint //this.barcode.Focus(); }
private void FormAddNewItem_Load(object sender, EventArgs e) { //this.CreateNewItemPanel.Visible = true; doBuideBrands(); doBuideCat(); doBuideSCat(); doBuideSSCat(); form1 Form1 = new form1(); this.CreateNewBarcodeTB.Text = Form1.barcode.Text; }
public void VerificarCambioTiro() { form1 form = new form1(); string[,] tablero = new string[, ] { { "x", "o" } }; Assert.True(form.EsTiroValido("x", tablero)); Assert.False(form.EsTiroValido("x", tablero)); Assert.True(form.EsTiroValido("o", tablero)); Assert.False(form.EsTiroValido("o", tablero)); }
public FormAddNewItem() { InitializeComponent(); // myConnection = new SqlConnection("Initial Catalog=" + Program.m_sCompanyName + Program.m_sDataSource + Program.m_sSecurityString); doBuideBrands(); doBuideCat(); doBuideSCat(); doBuideSSCat(); form1 Form1 = new form1(); this.CreateNewBarcodeTB.Text = Program.m_Barcode; }
public void TestKnownJSONInput() { //Arrange string jsonInput = "{\"completed_in\":0.047,\"max_id\":317531419280818176,\"max_id_str\":\"317531419280818176\",\"page\":1,\"query\":\"%22excel+services%22+since%3A2013-3-29+until%3A2013-3-31\",\"refresh_url\":\"?since_id=317531419280818176&q=%22excel%20services%22%20since%3A2013-3-29%20until%3A2013-3-31&result_type=mixed&include_entities=1\",\"results\":[{\"created_at\":\"Fri, 29 Mar 2013 06:59:24 +0000\",\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"http://t.co/eWqi37v6An\",\"expanded_url\":\"http://sco.lt/8JFoTB\",\"display_url\":\"sco.lt/8JFoTB\",\"indices\":[115,137]}],\"user_mentions\":[{\"screen_name\":\"scoopit\",\"name\":\"Scoop.it\",\"id\":209484168,\"id_str\":\"209484168\",\"indices\":[106,114]}]},\"from_user\":\"PlexHosted\",\"from_user_id\":259377740,\"from_user_id_str\":\"259377740\",\"from_user_name\":\"PlexHosted\",\"geo\":null,\"id\":317531419280818176,\"id_str\":\"317531419280818176\",\"iso_language_code\":\"en\",\"metadata\":{\"result_type\":\"recent\"},\"profile_image_url\":\"http://a0.twimg.com/profile_images/1258848358/Logo_plex_ball_normal.jpg\",\"profile_image_url_https\":\"https://si0.twimg.com/profile_images/1258848358/Logo_plex_ball_normal.jpg\",\"source\":\"<a href="http://www.scoop.it">Scoop.it</a>\",\"text\":\"Best Business Intelligence SharePoint 2013 Hosting Provider,PowerPivot SharePoint 2013 Hosting Provider | @scoopit http://t.co/eWqi37v6An\"}],\"results_per_page\":100,\"since_id\":0,\"since_id_str\":\"0\"}"; //string jsonInput = "foo"; form1 dog = new form1(); //Act - return the results in a UserStatus List object List <Twitter.TwitSearchResult> users = dog.GetSearchResultsObj(jsonInput); //Assert Assert.Equal(users.Count, 1); Assert.Equal(users[0].UserName, "PlexHosted"); Assert.Equal(users[0].CreatedAt.ToString(), "3/29/2013 6:59:24 AM"); Assert.Equal(users[0].Status, "Best Business Intelligence SharePoint 2013 Hosting Provider,PowerPivot SharePoint 2013 Hosting Provider | @scoopit http://t.co/eWqi37v6An"); Assert.Equal(users[0].LanguageCode, "en"); Assert.Equal(users[0].Id, 317531419280818176); }
/// <summary> /// Returns a memory stream by serializing the form1 xml /// </summary> /// <returns></returns> private MemoryStream GetXmlStream(DataRow[] rows) { // form1 is the base Xsd Schema node which holds the respondent and shipdata form1 f = form1.GetForm1WithProvidedDataRows(rows); // serialize the xml data and return a memory stream var builder = new StringBuilder(); var settings = new XmlWriterSettings { OmitXmlDeclaration = true, Indent = false }; var ns = new XmlSerializerNamespaces(); ns.Add("", "http://ferc.gov/549D.xsd"); var s = new XmlSerializer(typeof(form1)); using (var writer = XmlWriter.Create(builder, settings)) { s.Serialize(writer, f, ns); } return(new MemoryStream(Encoding.UTF8.GetBytes(builder.ToString()))); }
private void button16_Click(object sender, EventArgs e) { if (MessageBox.Show("Are you sure to create the New Item with the Barcode???", "", MessageBoxButtons.YesNo) == DialogResult.Yes) { if (!doCreateNewItem()) { MessageBox.Show("Error, New Item Creation Failed"); } else { MessageBox.Show("New Item Creation Complete!"); this.Close(); //this.CreateNewItemPanel1.Visible = false; //this.barcode.Text = this.CreateNewBarcodeTB.Text.Trim(); doClearCreateForm(); form1 lb = new form1(); lb.barcode.Text = CreateNewBarcodeTB.Text; this.CreateNewBarcodeTB.Text = ""; return; //DoScanBarcode(); } } }
private form1 form; // Or whatever class you form1 is supposed to be public Combat(Form form) { InitializeComponent(); this.form = form; }
private void btnLanuch_Click(object sender, EventArgs e) { form1 fm = new form1(); fm.ShowDialog(); }
public form2(form1 form1) { _form1 = form1; }