void Start() { Form = gameObject.GetComponentInParent <SelectForm>(); player = gameObject.GetComponent <PlayerController> (); pMana = gameObject.GetComponentInParent <Mana> (); ammo = gameObject.GetComponentInParent <Ammo>(); Cam = GameObject.FindGameObjectWithTag("ScreenShake").GetComponent <ShakeControl>(); }
public void loadSBML(string sSBML) { if (InvokeRequired) { Invoke(new VoidStringDelegate(loadSBML), new object[] { sSBML }); } else { try { if (sSBML.Contains("jd:") && !sSBML.Contains("xmlns:jd = ")) { sSBML = sSBML.Replace("xmlns:jd2", "xmlns:jd = \"http://www.sys-bio.org/sbml\" xmlns:jd2"); } chkTakeAsIs.Checked = false; Simulator.model = null; Simulator.modelLoaded = false; Simulator.loadSBML(sSBML); CurrentModel = Simulator.model; _InitialState = new ModelState(CurrentModel); txtCode.Text = Simulator.getCSharpCode(); SelectForm.InitializeFromModel(CurrentModel); var oList = new ArrayList(new[] { "Time" }); oList.AddRange(Simulator.getFloatingSpeciesNames()); FormChangeTimeCoursePlot.Instance.XAxisValues = oList.ToArray(); if (CurrentModel != null) { setupControl1.Parameters = SelectForm.Parameters.ToArray(); } else { setupControl1.ParameterAvailable = false; } //_SelectForm.Show(); //_SelectForm.Focus(); SBML = sSBML; txtSBML.Text = SBML; txtJarnac.Text = Util.ConvertToJarnac(sSBML); SetTitle("SBML.xml"); } catch (SBWException ex) { MessageBox.Show(ex.Message + Environment.NewLine + Environment.NewLine + ex.DetailedMessage, "Loading the model failed", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public void TestThatSelectLabelDisplaysItemSelected() { selectForm = new SelectForm(); selectForm.ShowInTaskbar = false; selectForm.ShowDialog(); string outputString = selectForm.SelectLabel.Text; Assert.AreEqual("Asus G71GX-RXO5 $719.97", outputString); }
/// <summary> /// 当用户点击筛选按钮后,会调用该方法,对相应资源按标准进行筛选 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ChoseButton_Click(object sender, EventArgs e) { //每一次点击筛选按钮都要重置值 formatLabel.Text = null; SelectForm SelectForm = new SelectForm(CrawlerProject); SelectForm.resForm = this; SelectForm.Show(); //展示筛选条件的窗口 }
public void TestSelectFormHasLoadedDataSource() { // Arrange // Act selectForm = new SelectForm(); // Assert Assert.IsTrue(selectForm.HasLoadedDataSource()); }
public void TestThatSelectFormHasConnectionToDB() { //arange SelectForm selectForm; //act selectForm = new SelectForm(); //assert Assert.IsTrue(selectForm.isConnectedToDatabase()); }
// Use this for initialization void Start() { canMove = true; rb = GetComponent <Rigidbody2D>(); Forms = gameObject.GetComponent <SelectForm>(); animator = gameObject.GetComponent <AnimatorController>(); maxJumps = 2; jumpsLeft = maxJumps; }
public void TestSelectFormHasLoadedDataSource() { selectForm = new SelectForm(); //selectForm.ShowInTaskbar = false; //selectForm.ShowDialog(); selectForm = new SelectForm(); Assert.IsTrue(selectForm.HasLoadedDataSource()); }
public void TestThatSelectFormHasLoadedDataSource() { //arrange SelectForm selectForm; //act selectForm = new SelectForm(); //assert Assert.IsTrue(selectForm.HasLoadedDataSource()); }
/// <summary> /// 体重按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnWeight_Click(object sender, EventArgs e) { SelectForm select = new SelectForm(this.Model.IDCardNo, "22") { StartPosition = FormStartPosition.CenterScreen }; if (select.ShowDialog() == DialogResult.OK) { this.txtWeight.Text = select.m_Result.value1; } }
private void Edit_Delegate_ButtonPressed(Object sender, ButtonPressedEventArgs e) { SelectForm Form = new SelectForm("Выберите сотрудника для делегирования...", CardHost, Context, SelectionType.StaffEmployee, Guid.Empty, Edit_Delegate.Text); switch (Form.ShowDialog()) { case DialogResult.OK: Edit_Delegate.EditValue = Form.SelectedItem.Name; Edit_Delegate.Tag = Form.SelectedItem.Id; break; } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); product = new Product(); splashScreen = new SplashScreen(); startForm = new StartForm(); selectForm = new SelectForm(); productInfoForm = new ProductInfoForm(); orderForm = new OrderForm(); aboutForm = new AboutForm(); Application.Run(splashScreen); }
public void TestThatSelectFormHasLoadedDataSource() { // arrange // act selectForm = new SelectForm(); //selectForm.ShowInTaskbar = false; //selectForm.ShowDialog(); // assert Assert.IsTrue(selectForm.HasLoadedDataSource()); }
public void TestMethod1() { // arrange SelectForm selectForm; //act selectForm = new SelectForm(); selectForm.ShowInTaskbar = false; selectForm.ShowDialog(); //assert Assert.IsTrue(selectForm.HasLoadedDataSource()); }
public void TestSelectLabelDisplayItemSelected() { //Arrange string outputString; //Act selectForm = new SelectForm(); selectForm.ShowInTaskbar = false; selectForm.ShowDialog(); outputString = selectForm.SelectLabel.Text; //Assert Assert.AreEqual("Asus G71GX-RX05 $719.97", outputString); }
/// <summary> /// 血氧按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnBloodOxygen_Click(object sender, EventArgs e) { SelectForm select = new SelectForm(this.Model.IDCardNo, "32") { StartPosition = FormStartPosition.CenterScreen }; if (select.ShowDialog() == DialogResult.OK) { this.txtBloodOxygen.Text = select.m_Result.value1; this.txtPulseRate.Text = select.m_Result.value2; } }
private void Form_OnExportData(object sender, ResultEventArgs e) { if (this._exporters.Count > 1) { var ttl = "Exporters"; var msg = "Select the target to export data to."; var frm = new SelectForm(ttl, msg, this._exporters.Keys.Select(x => x.ToString())); var result = frm.ShowDialog(); if (result != DialogResult.OK) { return; } ControllerType type; if (Enum.TryParse(frm.SelectedItems[0], out type)) { this._selectedExporter = this._exporters[type]; } } if (this._selectedExporter == null) { return; } string target; switch (this._selectedExporter.Type) { case ControllerType.EXCEL: SaveFileDialog dialog = new SaveFileDialog { Filter = "Excel Files|*.xlsx" }; if (dialog.ShowDialog() != DialogResult.OK) { return; } target = dialog.FileName; break; //case ControllerType.JSON: // break; //case ControllerType.SQL: // break; default: throw new ArgumentOutOfRangeException(); } //e.Result = this._controller.ExportData(this._selectedExporter, target); }
static void Main() { //instantiate all forms here Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); startForm = new StartForm(); splashForm = new SplashForm(); selectForm = new SelectForm(); orderForm = new OrderForm(); productInfoForm = new ProductInfoForm(); aboutForm = new AboutForm(); product = new Product(); Application.Run(splashForm); }
private void OnMultipleExcelPages(object sender, MuliPageEventArgs e) { var title = "Select Excel Sheets"; var message = "The selected file contains multiple sheets. Please specify which sheet(s) to use!"; var frm = new SelectForm(title, message, e.Pages); if (frm.ShowDialog() == DialogResult.OK) { e.Pages = frm.SelectedItems.ToList(); } else { e.Cancel = true; } }
public void TestThatSelectLabelDisplaysItemSelected() { // arrange string outputString; // act selectForm = new SelectForm(); selectForm.ShowInTaskbar = false; selectForm.ShowDialog(); outputString = selectForm.SelectionTextbox.Text; // assert Assert.AreEqual("Asus G71GX-RX05 719.97", outputString); }
// Use this for initialization void Start() { Cam = GameObject.FindGameObjectWithTag("ScreenShake").GetComponent <ShakeControl>(); currentHealth = maxHealth; player = gameObject.GetComponent <PlayerMovement> (); animator = gameObject.GetComponent <AnimatorController>(); select = gameObject.GetComponent <SelectForm>(); MAattack = gameObject.GetComponentInChildren <MeleeAttack>(); AimAttack = gameObject.GetComponentInChildren <Aimming>(); UpdateHealthBar(); if (changescene == null) { changescene = GameObject.Find("SceneManager").GetComponent <SceneTransition>(); } }
public void addRole(Form parent) { SelectForm sf = new SelectForm(new SelectFormViewModel(DBRoleStorage.Instance.GetView())); sf.DGVData.Columns["creator"].Visible = sf.DGVData.Columns["create_date"].Visible = sf.DGVData.Columns["modifier"].Visible = sf.DGVData.Columns["modify_date"].Visible = false; sf.DGVData.Columns["name"].HeaderText = "Наименование"; sf.DGVData.Columns["description"].HeaderText = "Описание"; if (sf.ShowDialog(parent) == DialogResult.OK) { Role role = DBRoleStorage.Instance.GetRole(sf.SelectedId); DataRow row = Roles.NewRow(); row["id"] = role.Id; row["name"] = role.Name; Roles.Rows.Add(row); } }
public static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); splashScreenForm = new SplashScreenForm(); startForm = new StartForm(); selectForm = new SelectForm(); productInfoForm = new ProductInfoForm(); orderForm = new OrderForm(); dollarComputersAboutBox = new DollarComputersAboutBox(); product = new Product(); Application.Run(new SplashScreenForm()); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); product = new Product(); //This intializes each of the forms splashScreenForm = new SplashScreenForm(); startForm = new StartForm(); selectForm = new SelectForm(); productInfoForm = new ProductInfoForm(); orderForm = new OrderForm(); aboutForm = new AboutForm(); //Runs the Splash Screen First Application.Run(new SplashScreenForm()); }
protected override bool RunDialog(IntPtr hwndOwner) { using (SelectForm frm = new SelectForm()) { frm.Text = this.Title; frm.Items = this.Items; frm.Selected = this.Selected; frm.DropDownStyle = this.DropDownStyle; bool flag = frm.ShowDialog() == DialogResult.OK; if (flag) { this.Selected = frm.Selected; this.SelectedIndex = frm.SelectedIndex; } return(flag); } }
public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { using (Transaction transaction = new Transaction(commandData.Application.ActiveUIDocument.Document, "WalterSelect")) { try { transaction.Start(); SelectForm frmSelect = new SelectForm(commandData.Application); frmSelect.ShowDialog(); transaction.Commit(); } catch (Exception) { return(Result.Failed); } } return(Result.Succeeded); }
protected override bool RunDialog(IntPtr hwndOwner) { using (SelectForm frm = new SelectForm()) { frm.Text = this.Title; frm.Items = this.Items; if (this.Selected != null) { frm.Selected = this.Selected; } else { frm.SelectedIndex = this.SelectedIndex; } frm.CanEdit = this.CanEdit; bool flag = frm.ShowDialog() == DialogResult.OK; if (flag) { this.Selected = frm.Selected; this.SelectedIndex = frm.SelectedIndex; } return(flag); } }
private void Form_OnMapFields(object sender, CancelEventArgs e) { if (this._selectedExporter == null || (this._exporters.Count > 1 && MessageBox.Show("Reset Exporter?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)) { var ttl = "Exporters"; var msg = "Select the target to map to."; var frm = new SelectForm(ttl, msg, this._exporters.Keys.Select(x => x.ToString())); var result = frm.ShowDialog(); if (result != DialogResult.OK) { return; } ControllerType type; if (Enum.TryParse(frm.SelectedItems[0], out type)) { this._selectedExporter = this._exporters[type]; } this._target = null; } if (this._selectedExporter == null) { return; } if (string.IsNullOrWhiteSpace(this._target) || MessageBox.Show("Reset Export Target?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { switch (this._selectedExporter.Type) { case ControllerType.EXCEL: this._selectedExporter.MultiplePages += this.OnMultipleExcelPages; OpenFileDialog dialog = new OpenFileDialog { Filter = "Excel Files|*.xls;*.xlsx;*.xlsm" }; if (dialog.ShowDialog() != DialogResult.OK) { return; } this._target = dialog.FileName; break; //case ControllerType.JSON: // break; //case ControllerType.SQL: // break; default: throw new ArgumentOutOfRangeException(); } } finally { switch (this._selectedImporter.Type) { case ControllerType.EXCEL: this._selectedImporter.MultiplePages -= this.OnMultipleExcelPages; break; //case ControllerType.JSON: // break; //case ControllerType.SQL: // break; default: throw new ArgumentOutOfRangeException(); } } //this._controller.LoadTargetSchema(this._selectedExporter, this._target); this._controller.Pages = null; } if (this._controller.Pages == null || MessageBox.Show("Reset Configuration?", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { this._controller.Pages = new List <PageConfig>(); //foreach (SchemaInfo schema in this._controller.TargetSchema) //{ // this._controller.Pages.Add(new PageConfig(schema.Name, schema.Fields.ToArray())); //} } using (var controller = new MapFieldsController(this._controller)) { controller.ShowDialog(); } }
private void Form_OnLoadData(object sender, ResultEventArgs e) { this._form = new MainForm(); if (this._importers.Count > 1) { var ttl = "Data Source"; var msg = "Select the source from which to copy data."; var frm = new SelectForm(ttl, msg, this._importers.Keys.Select(x => x.ToString())); if (frm.ShowDialog() != DialogResult.OK) { return; } ControllerType type; if (Enum.TryParse(frm.SelectedItems[0], out type)) { this._selectedImporter = this._importers[type]; } } if (this._selectedImporter == null) { return; } try { switch (this._selectedImporter.Type) { case ControllerType.EXCEL: this._selectedImporter.MultiplePages += this.OnMultipleExcelPages; OpenFileDialog dialog = new OpenFileDialog { Filter = "Excel Files|*.xls;*.xlsx;*.xlsm" }; if (dialog.ShowDialog() != DialogResult.OK) { return; } this._source = dialog.FileName; break; //case ControllerType.JSON: // break; //case ControllerType.SQL: // break; default: throw new ArgumentOutOfRangeException(); } //e.Result = this._controller.ImportData(this._selectedImporter, this._source); } finally { switch (this._selectedImporter.Type) { case ControllerType.EXCEL: this._selectedImporter.MultiplePages -= this.OnMultipleExcelPages; break; //case ControllerType.JSON: // break; //case ControllerType.SQL: // break; default: throw new ArgumentOutOfRangeException(); } } }
private void contextMenu_createStatement(object sender, EventArgs e) { SelectForm createStmForm = new SelectForm(selectedDatabase, tcpClient); createStmForm.ShowDialog(this); }