protected virtual void OnHidden() => Hidden?.Invoke();
void DismissedHandler(object sender, EventArgs e) { Hidden?.Invoke(this, EventArgs.Empty); }
protected void OnHidden() { Hidden?.Invoke(this, EventArgs.Empty); }
/// <summary> /// Raises the Hidden event. /// </summary> private void OnHidden() => Hidden?.Invoke(this);
//public void AddNewShareSkill() internal void AddNewSkill() { { #region Enter the deatils //Click on Share Skill button Thread.Sleep(1000); ShareSkills.Click(); Thread.Sleep(1000); //Populate the excel data GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ShareSkills"); // Enter Title Title.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Title")); Base.test.Log(LogStatus.Info, "Title has been successfully entered"); //Enter description Description.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Description")); Base.test.Log(LogStatus.Info, "Description has been successfully entered"); //click on category dropdown menu Thread.Sleep(500); Category.Click(); Thread.Sleep(1000); //Select the category Thread.Sleep(500); ProgrammingandTech.Click(); Thread.Sleep(500); //Click on subcatogory drop down option Thread.Sleep(1000); SubCategory.Click(); //Select the Sub-Category option Thread.Sleep(500); QA.Click(); Thread.Sleep(500); //Enter Tags Tags.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Tags")); Tags.SendKeys(Keys.Enter); Base.test.Log(LogStatus.Info, "TagName has been successfully entered"); //Select service type //ServiceTypeHourly.Click(); if (GlobalDefinitions.ExcelLib.ReadData(2, "Service Type") == "Hourly basis service") { ServiceTypeHourly.Click(); } else if (GlobalDefinitions.ExcelLib.ReadData(2, "Service Type") == "One-off service") { ServiceTypeOneOff.Click(); } //Select Location Type //LocationTypeOnline.Click(); if (GlobalDefinitions.ExcelLib.ReadData(2, "Location Type") == "Online") { LocationTypeOnline.Click(); } else if (GlobalDefinitions.ExcelLib.ReadData(2, "Location Type") == "On-site") { LocationTypeOnsite.Click(); } //Select the date Thread.Sleep(1000); StartDate.SendKeys(Keys.Delete); Thread.Sleep(2000); StartDate.SendKeys(Keys.Backspace); Thread.Sleep(1000); StartDate.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Start Date")); Console.WriteLine("Start date is : " + GlobalDefinitions.ExcelLib.ReadData(2, "Start Date")); //StartDate.SendKeys("25-07-2019"); ////Select the end Date //EndDate.SendKeys("21-08-2019"); Thread.Sleep(1000); EndDate.SendKeys(Keys.Delete); EndDate.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "End Date")); Thread.Sleep(2000); Console.WriteLine("End date is : " + GlobalDefinitions.ExcelLib.ReadData(2, "End Date")); //Select the Days available SelectDays.Click(); Thread.Sleep(500); //Select starttime Thread.Sleep(1000); StartTime.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Start Time")); Thread.Sleep(2000); Console.WriteLine("Start Time is : " + GlobalDefinitions.ExcelLib.ReadData(2, "Start Time")); //StartTime.SendKeys("12:00PM"); //Select EndTime Thread.Sleep(1000); EndTime.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "End Time")); Console.WriteLine("End Time is : " + GlobalDefinitions.ExcelLib.ReadData(2, "End Time")); //EndTime.SendKeys("3:00PM"); //Select Skill Trade Credit.Click(); Thread.Sleep(500); if (GlobalDefinitions.ExcelLib.ReadData(2, "Skill Trade") == "Skill-exchange") { Skillstrade.Click(); Skillstrade.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill Trade")); Skillstrade.SendKeys(Keys.Enter); } else if (GlobalDefinitions.ExcelLib.ReadData(2, "Skill Trade") == "Credit") { CreditAmount.Click(); CreditAmount.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Credit Amount")); CreditAmount.SendKeys(Keys.Enter); //Enter credit amount // CreditAmount.SendKeys(Global.GlobalDefinitions.ExcelLib.ReadData(2, "Credit Amount")); //Select the stats // StatusActive.Click(); //Thread.Sleep(500); //select Work Sample Sample.Click(); AutoItX3 fileupload = new AutoItX3(); fileupload.WinActivate("Open"); Thread.Sleep(3000); fileupload.Send(@"C:\Users\harpr\OneDrive\Documents\Testing.jpg"); Thread.Sleep(1000); fileupload.Send("{ENTER}"); //Thread.Sleep(4000); Console.WriteLine("File has been uploaded successfully"); if (GlobalDefinitions.ExcelLib.ReadData(2, "Status") == "Active") { Active.Click(); } else if (GlobalDefinitions.ExcelLib.ReadData(2, "Status") == "Hidden") { Hidden.Click(); } //Save the Share Skill Thread.Sleep(500); Save.Click(); Thread.Sleep(500); //Verify if newShared skill is saved Thread.Sleep(3000); string ShareSkillSucess = Global.GlobalDefinitions.driver.FindElement(By.XPath("//th[contains(text(),'Image')]")).Text; if (ShareSkillSucess == "Image") { Global.Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Pass, "Saved Skill Successful"); } else { Global.Base.test.Log(RelevantCodes.ExtentReports.LogStatus.Fail, "Saving Skill Unsuccessful"); } } } #endregion }
public static Form GetForm() { /* * This method sets up the Form and Field objects that * are needed to dynamically generate html forms at runtime. * * Of course, there are other ways of going about defining your forms and their fields. * I used a static class in this demo application for simplicity. * In the real world, you could store your field definitions anywhere. * * For example, you could create a database table to store all * of the data needed to create the form fields below. * Some of your end users could have access to some kind of interface to create, update, * or delete the form field definitions in the database. * This described scenario was actually the inspiration for this project. * * There are 7 different Field types that can be used to construct the form: * - TextBox (single line text input) * - Textarea (multi line text input) * - Checkbox * - CheckboxList * - RadioList * - Select (Drop down lists and List boxes) * - Literal (Any custom html at all. For display purposes only (no user input)) * * Each Field type have a few things in common: * - Title property: Used when storing end user's responses. * - Prompt property: Question asked to the user for each field. * - DisplayOrder property: The order that the field is displayed to the user. * - Required property: Is the user required to complete the field? * - InputHtmlAttributes: Allows the developer to set the input elements html attributes * * There are other properties and behaviors that some Field types do not share with each other. * Take a look through the members of each Type to see what you can do. * Much of each type's unique functionality is demonstrated below. * Feel free to tinker around in this file, changing and adding fields. * Don't forget to add newly created fields to the Form. * * The Form object is the object that contains all of your Field objects, * triggers validation and rendering, and lets the developer access user responses. * When constructing your form, you can use Form.AddFields() to get your Fields * into the form (imagine that!). * * Check out * /Controllers/HomeController.cs * /Views/Home/Demo.cshtml * /Views/Home/Responses.cshtml * to learn how to use the Form object in your web application. */ // create fields var description = new Literal { Key = "description", Template = String.Format("<p>{0}</p>", PlaceHolders.Literal), DisplayOrder = 10, Html = "This is a dynamically generated form. All of the input fields on this form are generated at runtime." }; var name = new TextBox { ResponseTitle = "Name", Prompt = "Enter your full name:", DisplayOrder = 20, Required = true, RequiredMessage = "Your full name is required", }; var gender = new RadioList { DisplayOrder = 30, ResponseTitle = "Gender", Prompt = "Select your gender:", Required = true, Orientation = Orientation.Vertical }; gender.AddChoices("Male,Female", ","); var email = new TextBox { DisplayOrder = 25, ResponseTitle = "Email Address", Prompt = "Enter your email address:", Required = true, RegexMessage = "Must be a valid email address", RegularExpression = @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" }; var sports = new CheckBoxList { DisplayOrder = 40, ResponseTitle = "Favorite Sports", Prompt = "What are your favorite sports?", Orientation = Orientation.Horizontal }; sports.AddChoices("Baseball,Football,Soccer,Basketball,Tennis,Boxing,Golf", ","); var states = new Select { DisplayOrder = 50, ResponseTitle = "Visited States", MultipleSelection = true, Size = 10, Prompt = "What US states have you visited? (Use the ctrl key to select multiple states.)" }; states.AddChoices( "Alabama,Alaska,Arizona,Arkansas,California,Colorado,Connecticut,Delaware,Florida,Georgia,Hawaii,Idaho,Illinois,Indiana,Iowa,Kansas,Kentucky,Louisiana,Maine,Maryland,Massachusetts,Michigan,Minnesota,Mississippi,Missouri,Montana,Nebraska,Nevada,New Hampshire,New Jersey,New Mexico,New York,North Carolina,North Dakota,Ohio,Oklahoma,Oregon,Pennsylvania,Rhode Island,South Carolina,South Dakota,Tennessee,Texas,Utah,Vermont,Virginia,Washington,West Virginia,Wisconsin,Wyoming", ","); var bio = new TextArea { DisplayOrder = 60, ResponseTitle = "Bio", Prompt = "Describe yourself:" }; bio.InputHtmlAttributes.Add("cols", "40"); bio.InputHtmlAttributes.Add("rows", "6"); var month = new Select { DisplayOrder = 70, ResponseTitle = "Month Born", Prompt = "What month were you born in?", ShowEmptyOption = true, EmptyOption = "- Select One - " }; month.AddChoices("January,February,March,April,May,June,July,August,September,October,November,December", ","); var agree = new CheckBox { DisplayOrder = 80, ResponseTitle = "Agrees To Terms", Prompt = "I agree to all of the terms in the EULA.", Required = true, RequiredMessage = "You must agree to the EULA!" }; var eula = new Literal { DisplayOrder = 75, Html = string.Format(@"<textarea readonly=""readonly"" rows=""8"" cols=""60"">{0}</textarea>", GetEULA()) }; var file = new FileUpload { Prompt = "Your photo", InvalidExtensionError = "Image files only.", ValidExtensions = ".jpg,.gif,.png", Required = true, DisplayOrder = 73, UseMultiple = true }; file.Validated += new ValidatedEventHandler(file_Validated); file.Posted += new FilePostedEventHandler(file_Posted); var hidden = new Hidden { ResponseTitle = "A Hidden Field", Value = "some value" }; // create form and add fields to it var form = new Form(); form.AddFields(description, name, gender, email, sports, states, bio, month, agree, eula, file, hidden); return(form); }
public override void RenderView(System.Web.Mvc.ViewContext viewContext, System.IO.TextWriter writer) { RenderMain(writer); var _formPanel = new ValidatedForm(); _formPanel.BodyPadding = 10; _formPanel.Layout = "table"; _formPanel.LayoutConfig.Add(new TableLayoutConfig() { Columns = 2 }); _formPanel.ID = "addForm"; _formPanel.DefaultAnchor = "100%"; var _txtUsername = new TextField(); _txtUsername.ID = "txtUsername"; _txtUsername.Name = "Username"; _txtUsername.SetValue(Model.Username); _txtUsername.ColSpan = 1; _txtUsername.Width = 300; _txtUsername.AllowBlank = false; _txtUsername.FieldLabel = "用户名"; _txtUsername.EmptyText = "输入用户名"; _formPanel.Add(_txtUsername); var _comboStatus = new ComboBox(); _comboStatus.EmptyText = "选择状态"; _comboStatus.ValueHiddenName = "Status"; _comboStatus.SimpleSubmit = true; var _comboStatusStore = new Store(); _comboStatusStore.ID = "comboStoreStatus"; _comboStatusStore.Model.Add(ComponentHelper.GetModel( new Dictionary <string, ModelFieldType>() { { "Id", ModelFieldType.Int }, { "Name", ModelFieldType.String } })); _comboStatusStore.DataSource = EnumHelper.GetList(typeof(BaseStatuses), (k, v) => { return(new { Id = k, Name = v }); }); _comboStatusStore.DataBind(); _comboStatus.SetValue(Model.Status.GetHashCode()); _comboStatus.DisplayField = "Name"; _comboStatus.ValueField = "Id"; _comboStatus.Store.Add(_comboStatusStore); _comboStatus.FieldLabel = "状态"; _comboStatus.Editable = false; _formPanel.Add(_comboStatus); var _txtMemo = new TextArea(); _txtMemo.SetValue(Model.Description); _txtMemo.Width = 750; _txtMemo.Name = "Description"; _txtMemo.ColSpan = 2; _txtMemo.EmptyText = "简单描述一下用户的职责"; _txtMemo.FieldLabel = "描述"; _txtMemo.Height = 70; _formPanel.Add(_txtMemo); var _treeRoleSelector = new TreePanelNodeMover(); _treeRoleSelector.LeftReadProxy.Url = Url.Action("GetNotAddedRoles"); _treeRoleSelector.LeftReadProxy.ExtraParams.Add(new Parameter("accountId", Model.Id.ToString(), ParameterMode.Raw)); _treeRoleSelector.RightReadProxy.Url = Url.Action("GetAddedRoles"); _treeRoleSelector.RightReadProxy.ExtraParams.Add(new Parameter("accountId", Model.Id.ToString(), ParameterMode.Raw)); _treeRoleSelector.Height = 180; _treeRoleSelector.Width = 750; _treeRoleSelector.ColSpan = 2; _treeRoleSelector.ID = "treeRoles"; _formPanel.Add(_treeRoleSelector); var _btnSave = new Button(); _btnSave.Icon = Icon.DatabaseSave; _btnSave.Text = "保存"; _formPanel.Buttons.Add(_btnSave); var _hidId = new Hidden(); _hidId.Name = "Id"; _formPanel.Controls.Add(_hidId); writer.Write(_formPanel.ToBuilder().ToHtmlString()); }
private void OnSerializing(Dictionary <string, string> data) { HiddenText = Hidden.ToString(); OnSerializingCalled = true; }
/// <summary> /// Raises the <see cref="Hidden"/> event. /// </summary> /// <param name="eventArgs"> /// <see cref="EventArgs"/> object that provides the arguments for the event. /// </param> /// <remarks> /// <strong>Notes to Inheritors: </strong>When overriding <see cref="OnHidden"/> in a /// derived class, be sure to call the base class's <see cref="OnHidden"/> method so that /// registered delegates receive the event. /// </remarks> protected virtual void OnHidden(EventArgs eventArgs) { Hidden?.Invoke(this, eventArgs); }
protected virtual void OnHidden() { Hidden?.Invoke(this, new EventArgs()); }
// Module defining this command // Optional custom code for this activity /// <summary> /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run. /// </summary> /// <param name="context">The NativeActivityContext for the currently running activity.</param> /// <returns>A populated instance of Sytem.Management.Automation.PowerShell</returns> /// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks> protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context) { System.Management.Automation.PowerShell invoker = global::System.Management.Automation.PowerShell.Create(); System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName); // Initialize the arguments if (Path.Expression != null) { targetCommand.AddParameter("Path", Path.Get(context)); } if (LiteralPath.Expression != null) { targetCommand.AddParameter("LiteralPath", LiteralPath.Get(context)); } if (Filter.Expression != null) { targetCommand.AddParameter("Filter", Filter.Get(context)); } if (Include.Expression != null) { targetCommand.AddParameter("Include", Include.Get(context)); } if (Exclude.Expression != null) { targetCommand.AddParameter("Exclude", Exclude.Get(context)); } if (Recurse.Expression != null) { targetCommand.AddParameter("Recurse", Recurse.Get(context)); } if (Depth.Expression != null) { targetCommand.AddParameter("Depth", Depth.Get(context)); } if (Force.Expression != null) { targetCommand.AddParameter("Force", Force.Get(context)); } if (Name.Expression != null) { targetCommand.AddParameter("Name", Name.Get(context)); } if (Attributes.Expression != null) { targetCommand.AddParameter("Attributes", Attributes.Get(context)); } if (Directory.Expression != null) { targetCommand.AddParameter("Directory", Directory.Get(context)); } if (File.Expression != null) { targetCommand.AddParameter("File", File.Get(context)); } if (Hidden.Expression != null) { targetCommand.AddParameter("Hidden", Hidden.Get(context)); } if (ReadOnly.Expression != null) { targetCommand.AddParameter("ReadOnly", ReadOnly.Get(context)); } if (System.Expression != null) { targetCommand.AddParameter("System", System.Get(context)); } return(new ActivityImplementationContext() { PowerShellInstance = invoker }); }
protected override bool HandleMessage(WidgetMessage message, Widget widget, IntPtr param1, IntPtr param2) { bool handled = false; switch (message) { case WidgetMessage.Create: Created?.Invoke(widget, param1 != default, ref handled); break; case WidgetMessage.Destroy: Destroyed?.Invoke(widget, param1 != default, ref handled); break; case WidgetMessage.Paint: Paint?.Invoke(widget, ref handled); break; case WidgetMessage.Draw: Draw?.Invoke(widget, ref handled); break; case WidgetMessage.KeyPress: KeyPressed?.Invoke(widget, ref AsRef <KeyState>(param1), ref handled); break; case WidgetMessage.KeyTakeFocus: TakingFocus?.Invoke(widget, param1 != default, ref handled); break; case WidgetMessage.KeyLoseFocus: LostFocus?.Invoke(widget, param1 != default, ref handled); break; case WidgetMessage.MouseDown: MouseDown?.Invoke(widget, ref AsRef <MouseState>(param1), ref handled); break; case WidgetMessage.MouseDrag: MouseDrag?.Invoke(widget, ref AsRef <MouseState>(param1), ref handled); break; case WidgetMessage.MouseUp: MouseUp?.Invoke(widget, ref AsRef <MouseState>(param1), ref handled); break; case WidgetMessage.Reshape: Reshape?.Invoke(widget, Widget.GetOrCreate(param1), ref AsRef <WidgetGeometryChange>(param2), ref handled); break; case WidgetMessage.ExposedChanged: ExposedChanged?.Invoke(widget, ref handled); break; case WidgetMessage.AcceptChild: ChildAdded?.Invoke(widget, Widget.GetOrCreate(param1), ref handled); break; case WidgetMessage.LoseChild: ChildRemoved?.Invoke(widget, Widget.GetOrCreate(param1), ref handled); break; case WidgetMessage.AcceptParent: ParentChanged?.Invoke(widget, param1 != default ? Widget.GetOrCreate(param1) : null, ref handled); break; case WidgetMessage.Shown: Shown?.Invoke(widget, Widget.GetOrCreate(param1), ref handled); break; case WidgetMessage.Hidden: Hidden?.Invoke(widget, Widget.GetOrCreate(param1), ref handled); break; case WidgetMessage.DescriptorChanged: DescriptorChanged?.Invoke(widget, ref handled); break; case WidgetMessage.PropertyChanged: PropertyChanged?.Invoke(widget, param1.ToInt32(), param2, ref handled); break; case WidgetMessage.MouseWheel: MouseWheel?.Invoke(widget, ref AsRef <MouseState>(param1), ref handled); break; case WidgetMessage.CursorAdjust: CursorAdjust?.Invoke(widget, ref AsRef <MouseState>(param1), ref AsRef <CursorStatus>(param2), ref handled); break; } return(handled); }
public void model_password_renders_with_id_and_name() { Expression<Func<FakeModel, object>> expression = x => x.Person.FirstName; var html = new Hidden(expression.GetNameFor(), expression.GetMemberExpression(), null).ToString(); html.ShouldHaveHtmlNode("Person_FirstName").ShouldHaveAttribute(HtmlAttribute.Name).WithValue("Person.FirstName"); }
private void InitComponents() { #region Header #region Button btnSave = new Button { ID = "btnSave", Icon = Icon.Disk, Text = "Save", ToolTip = "Save" }; btnPost = new Button { ID = "btnPost", Icon = Icon.PackageAdd, Text = "Post Receive", ToolTip = "Post Receive" }; topBar = new Toolbar { ID = "topBar", Items = { btnSave, btnPost } }; #endregion Button #region Fields txtKey = new Hidden { DataIndex = "Key", Name = "Key", LabelWidth = 150, Anchor = "100%", FieldLabel = "Key", ID = "Key" }; txtNo = new TextField { LabelWidth = 150, Anchor = "100%", FieldLabel = "No.", DataIndex = "No", Name = "No", ID = "txtNo", ReadOnly = true }; txtBuy_from_Vendor_No = new TextField { LabelWidth = 150, Anchor = "100%", FieldLabel = "Buy-from Vendor No.", DataIndex = "Buy_from_Vendor_No", Name = "Buy_from_Vendor_No", ID = "txtBuy_from_Vendor_No", ReadOnly = true }; txtBuy_from_Vendor_Name = new TextField { LabelWidth = 150, Anchor = "100%", FieldLabel = "Buy-from Vendor Name", DataIndex = "Buy_from_Vendor_Name", Name = "Buy_from_Vendor_Name", ID = "txtBuy_from_Vendor_Name", ReadOnly = true }; txtOrder_Date = new DateField { LabelWidth = 150, FieldLabel = "Order Date", Anchor = "100%", Format = "dd/MM/yyyy", SubmitFormat = "dd/MM/yyyy", DataIndex = "Order_Date", Name = " Order_Date", SelectOnFocus = true, ID = "txtOrder_Date", ReadOnly = true }; txtDocument_Date = new DateField { LabelWidth = 150, FieldLabel = "Document Date", Anchor = "100%", Format = "dd/MM/yyyy", SubmitFormat = "dd/MM/yyyy", DataIndex = "Document_Date", Name = " Document_Date", SelectOnFocus = true, ID = "txtDocument_Date", ReadOnly = true }; txtPosting_Date = new DateField { LabelWidth = 150, FieldLabel = "Posting Date", Anchor = "100%", Format = "dd/MM/yyyy", SubmitFormat = "dd/MM/yyyy", DataIndex = "Posting_Date", Name = " Posting_Date", SelectOnFocus = true, ID = "txtPosting_Date", AllowBlank = false, MsgTarget = MessageTarget.Side }; txtVietnamese_Desc = new TextField { LabelWidth = 150, FieldLabel = "Vietnamese Description", Anchor = "100%", DataIndex = "Vietnamese_Description", Name = " Vietnamese_Description", SelectOnFocus = true, ID = "txtVietnamese_Desc", AllowBlank = false, MsgTarget = MessageTarget.Side }; txtVAT_Desc = new TextField { LabelWidth = 150, FieldLabel = "VAT Description", Anchor = "100%", DataIndex = "VAT_Description", Name = " VAT_Description", SelectOnFocus = true, ID = "txtVAT_Desc", AllowBlank = false, MsgTarget = MessageTarget.Side }; cboReceive = new Checkbox { LabelWidth = 150, FieldLabel = "Receive", Anchor = "100%", DataIndex = "Receive", Name = " Receive", ID = "cboReceive" }; #endregion Fields #region FormPanel frmHeader = new FormPanel { //Margins = "10 10 0 10", Region = Region.North, Icon = Ext.Net.Icon.ApplicationForm, Title = "General", Border = true, CollapseMode = CollapseMode.Header, Collapsible = true, ID = "frmHeader", TrackResetOnLoad = true, Layout = "Hbox", Items = { new Panel { Layout = "Anchor", Flex = 1, BodyPaddingSummary = "10 10 0 10", Border = false, Items = { txtKey, txtNo, txtBuy_from_Vendor_No, txtBuy_from_Vendor_Name, txtOrder_Date } }, new Panel { Layout = "Anchor", Flex = 1, BodyPaddingSummary = "10 10 0 10", Border = false, Items = { txtPosting_Date, txtVietnamese_Desc, txtVAT_Desc, cboReceive } } } }; #endregion FormPanel #endregion Header #region Line #region GridLine dataTemplateLine = BuilDataTemplateLine(); grdLine = new GridPanelEditBase { ID = "grdLine", Border = false, TitleAlign = Ext.Net.TitleAlign.Center, ProxyUrl = @"..//..//..//..//PurchaseOrder//SvcPurchaseOrder.asmx/GetPOLine", DocumentType = "", DocumentNo = DocumentNo, CurCompany = GlobalVariable.CompanyName, SCOPE = this.SCOPE, DataTemplate = dataTemplateLine, }; #endregion GridLine #region pnlLine pnlLine = new Panel { ID = "pnlLine", Region = Ext.Net.Region.Center, Layout = "Fit", Icon = Ext.Net.Icon.Group, Title = "Lines", Border = true, //Margins = "10 10 5 10", Split = true, Items = { grdLine } }; #endregion pnlLine #endregion Line #region Windows this.ID = "winCard"; this.Maximizable = false; this.Minimizable = false; this.CloseAction = CloseAction.Destroy; this.Icon = Icon.ApplicationEdit; this.TopBar.Add(topBar); this.Layout = "Border"; this.Items.AddRange(new ItemsCollection <Ext.Net.AbstractComponent> { this.frmHeader, this.pnlLine }); #endregion Windows }
static void Main(string[] args) { int dataSize = 10000000; using (MPI.Environment env = new MPI.Environment(ref args)) { if (Communicator.world.Size != 2) { System.Console.WriteLine("The Datatypes test must be run with two processes."); System.Console.WriteLine("Try: mpiexec -np 2 datatypes.exe"); } else if (Communicator.world.Rank == 0) { // Send an object that contains a "fixed" field Dimensions dims; unsafe { for (int i = 0; i < 11; ++i) { dims.values[i] = (float)i; } } Communicator.world.Send(dims, 1, 0); // Send an object that contains non-public fields Secretive secret = new Secretive(17, 25); Communicator.world.Send(secret, 1, 1); // Send an object with complex data AggregateData aggregate = new AggregateData(dataSize); Communicator.world.Send(aggregate, 1, 2); // Send an object with a private type Hidden hidden = new Hidden(17, 25); Communicator.world.Send(hidden, 1, 3); // Send a struct that requires serialization. ContainsBool containsBool = new ContainsBool(17); Communicator.world.Send(containsBool, 1, 4); } else { // Receive and check an object that contains a "fixed" field Dimensions dims; Communicator.world.Receive(0, 0, out dims); unsafe { for (int i = 0; i < 11; ++i) { System.Console.WriteLine(dims.values[i].ToString() + " "); Debug.Assert(dims.values[i] == (float)i); } } // Receive and check an object that contains non-public fields Secretive secret; Communicator.world.Receive(0, 1, out secret); System.Console.WriteLine(secret); Debug.Assert(secret == new Secretive(17, 25)); // Receive and check the "complex data" AggregateData aggregate = Communicator.world.Receive <AggregateData>(0, 2); if (!aggregate.Check(dataSize)) { System.Console.Error.WriteLine("Error: complex data not properly transmitted"); MPI.Environment.Abort(1); } // Receive and check an object with a private type Hidden hidden; Communicator.world.Receive(0, 3, out hidden); System.Console.WriteLine(hidden); Debug.Assert(hidden == new Hidden(17, 25)); // Receive and check a struct that requires serialization ContainsBool containsBool; Communicator.world.Receive(0, 4, out containsBool); System.Console.WriteLine(containsBool); Debug.Assert(containsBool == new ContainsBool(17)); } } }
public void Hide() { gameObject.SetActive(false); Hidden?.Invoke(); }
public static Hidden <THelper> SetName <THelper>(this Hidden <THelper> hidden, string name) where THelper : BootstrapHelper <THelper> { return(hidden.MergeAttribute("name", name == null ? null : hidden.Helper.GetFullHtmlFieldName(name))); }
public void Hide() { Hidden?.Invoke(this); }
protected virtual void OnHidden(GameObjectUI arg1) { Hidden?.Invoke(arg1, EventArgs.Empty); }
public void ShareskillListings() { //Populate the Excel Sheet GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "ShareSkill"); Thread.Sleep(1000); //Click on Share Skill Button Shareskillbutton.Click(); Thread.Sleep(1000); //Enter the Details //Enter Title from Excel Sheet Title.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title")); Thread.Sleep(1000); //Enter Description from Excel Sheet Description.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description")); Thread.Sleep(1000); //Click on Category dropdown box Category.Click(); Thread.Sleep(1000); //Select cartegory option from excel sheet by iterating the list of elements //I have declared CategoryOption as a IList<Iwebelement> int count = CategoryOption.Count; for (int i = 0; i < count; i++) { if (CategoryOption[i].Text == GlobalDefinitions.ExcelLib.ReadData(2, "CategoryOption")) { CategoryOption[i].Click(); } } Thread.Sleep(500); //Click on subcategory drop down box Subcategory.Click(); Thread.Sleep(1000); //Click on 3 option from the dropdown int countsubcat = SubcategoryOption.Count; for (int i = 0; i < countsubcat; i++) { if (SubcategoryOption[i].Text == GlobalDefinitions.ExcelLib.ReadData(2, "SubCategoryOption")) { SubcategoryOption[i].Click(); } } Thread.Sleep(500); //Enter Tag from the Excel sheet Tag.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Tags")); Thread.Sleep(500); Tag.SendKeys(Keys.Enter); //Service Type as One-off service if (GlobalDefinitions.ExcelLib.ReadData(2, "ServiceType") == "Oneoff service") { OneOffService.Click(); } else { HourlyBasisService.Click(); } Thread.Sleep(500); //Location Type as On-site if (GlobalDefinitions.ExcelLib.ReadData(2, "LocationType") == "Onsite") { OnSite.Click(); } else { Online.Click(); } Thread.Sleep(500); //Enter Strt and End dates of Available days startDate.Click(); Thread.Sleep(500); startDate.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "StartDate")); Thread.Sleep(500); endDate.Click(); endDate.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "EndDate")); Thread.Sleep(500); //Enter the Available days and their Start and End Time from the Excel Sheet String availabledays = GlobalDefinitions.ExcelLib.ReadData(2, "Available"); String starttimes = GlobalDefinitions.ExcelLib.ReadData(2, "StartTime"); String endtimes = GlobalDefinitions.ExcelLib.ReadData(2, "EndTime"); String[] availabledaysarray = new String[] { }; availabledaysarray = availabledays.Split(','); int arraycount = availabledaysarray.Count(); String[] starttimesarray = new String[] { }; starttimesarray = starttimes.Split(','); int starttimecount = starttimesarray.Count(); String[] endtimesarray = new String[] { }; endtimesarray = endtimes.Split(','); int endtimecount = endtimesarray.Count(); for (int i = 0; i < arraycount; i++) { switch (availabledaysarray[i]) { case "sun": sunday.Click(); sunstarttime.SendKeys(starttimesarray[i]); sunendTime.SendKeys(endtimesarray[i]); break; case "mon": monday.Click(); monstarttime.SendKeys(starttimesarray[i]); monendTime.SendKeys(endtimesarray[i]); break; case "tue": tuesday.Click(); tuestarttime.SendKeys(starttimesarray[i]); tueendTime.SendKeys(endtimesarray[i]); break; case "wed": wednesday.Click(); wedstarttime.SendKeys(starttimesarray[i]); wedendTime.SendKeys(endtimesarray[i]); break; case "thu": thursday.Click(); thustarttime.SendKeys(starttimesarray[i]); thuendTime.SendKeys(endtimesarray[i]); break; case "fri": friday.Click(); fristarttime.SendKeys(starttimesarray[i]); friendTime.SendKeys(endtimesarray[i]); break; case "sat": saturday.Click(); satstarttime.SendKeys(starttimesarray[i]); satendTime.SendKeys(endtimesarray[i]); break; } } //Skill Trade as Credit/SkillExchange if (GlobalDefinitions.ExcelLib.ReadData(2, "SkillTrade") == "Credit") { credit.Click(); Thread.Sleep(500); //Credit charge as 6 per hour from Excel sheet creditCharge.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CreditCharges")); Thread.Sleep(500); } else { skillExchange.Click(); Thread.Sleep(500); skillexchangetag.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "SkillExchangetag")); Thread.Sleep(500); } //Work samples workSample.Click(); AutoItX3 autolt = new AutoItX3(); autolt.WinActivate("Open"); autolt.Send(GlobalDefinitions.ExcelLib.ReadData(2, "WorkSample")); //autolt.Send(@"E:\Competition Task1\Mars Automation framework\MarsFramework\MarsFramework\Empty.docx"); Thread.Sleep(1000); autolt.Send("{ENTER}"); //Set Active as Hidden/Active if (GlobalDefinitions.ExcelLib.ReadData(2, "ActiveService") == "Hidden") { Hidden.Click(); } else { Active.Click(); } //Save the form Save.Click(); Thread.Sleep(1000); }
public override void Render(StringBuilder sb) { X3DControl shape = new X3DControl();// <Cube slm:href='holochatspace/holochatspace.x3d' slm:target='_blank'/> string prefix = ""; var tagName = ShapeType.ToString(); if (ShapeType == ShapeType.Prefab || ShapeType == ShapeType.Empty) { prefix = "slm:"; } shape.TagName = prefix + tagName; shape.AddProperty("name", Name); shape.AddProperty("group", Group); shape.AddProperty("bundle", Bundle); shape.AddProperty("item", Item); shape.AddProperty("slm:href", Url); shape.AddProperty("slm:formfield", FormField); shape.AddProperty("slm:formvalue", FormValue); shape.AddProperty("slm:walkfloor", WalkFloor.ToSlamString()); shape.AddProperty("length", RectLength.ToSlamString()); shape.AddProperty("height", RectHeight.ToSlamString()); shape.AddProperty("slm:favorite", Favorite.ToSlamString()); shape.AddProperty("slm:history", History.ToSlamString()); shape.AddProperty("slm:toolTip", ToolTip); if (Target != Target.None) { shape.AddProperty("slm:target", Target.ToString()); } shape.AddProperty("slm:hidden", Hidden.ToSlamString()); if (ShapeType == ShapeType.Text) { shape.AddProperty("string", Text); if (InputType != InputType.None) { shape.AddProperty("slm:input", InputType.ToString()); } } switch (FaceCamera) { case FaceCamera.face: shape.AddProperty("slm:facecamera", "face"); break; case FaceCamera.back: shape.AddProperty("slm:facecamera", "back"); break; case FaceCamera.back_lock_y: shape.AddProperty("slm:facecamera", "back/lock-y"); break; case FaceCamera.face_lock_y: shape.AddProperty("slm:facecamera", "face/lock-y"); break; case FaceCamera.parent_back: shape.AddProperty("slm:facecamera", "parent/back"); break; case FaceCamera.parent_face: shape.AddProperty("slm:facecamera", "parent/face"); break; case FaceCamera.parent_back_lock_y: shape.AddProperty("slm:facecamera", "parent/back/lock-y"); break; case FaceCamera.parent_face_lock_y: shape.AddProperty("slm:facecamera", "parent/face/lock-y"); break; } AddChild(shape); AddChild(Appearance); AddChild(IndexedTriangleSet); shape.AddChild(FontStyle); base.Render(sb); }
protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); _formPanel = new FormPanel(); _formPanel.BodyPadding = 10; _formPanel.Layout = "table"; _formPanel.LayoutConfig.Add(new TableLayoutConfig() { Columns = 2 }); _formPanel.ID = "addForm"; _formPanel.DefaultAnchor = "100%"; _txtUsername = new TextField(); _txtUsername.ID = "txtUsername"; _txtUsername.Name = "Username"; _txtUsername.ColSpan = 1; _txtUsername.Width = 300; _txtUsername.AllowBlank = false; _txtUsername.FieldLabel = "用户名"; _txtUsername.EmptyText = "输入用户名"; _formPanel.Add(_txtUsername); _comboStatus = new ComboBox(); _comboStatus.EmptyText = "选择状态"; _comboStatus.ValueHiddenName = "Status"; _comboStatus.SimpleSubmit = true; _comboStatusStore = new Store(); _comboStatusStore.ID = "comboStoreStatus"; _comboStatusStore.Model.Add(ComponentHelper.GetModel( new Dictionary <string, ModelFieldType>() { { "Id", ModelFieldType.Int }, { "Name", ModelFieldType.String } })); _comboStatus.DisplayField = "Name"; _comboStatus.ValueField = "Id"; _comboStatus.Store.Add(_comboStatusStore); _comboStatus.FieldLabel = "状态"; _comboStatus.Editable = false; _formPanel.Add(_comboStatus); _txtMemo = new TextArea(); _txtMemo.Width = 750; _txtMemo.Name = "Description"; _txtMemo.ColSpan = 2; _txtMemo.EmptyText = "简单描述一下用户的职责"; _txtMemo.FieldLabel = "描述"; _txtMemo.Height = 70; _formPanel.Add(_txtMemo); _treeRoleSelector = new TreePanelNodeMover(); _treeRoleSelector.LeftReadData += _treeRoleSelector_LeftReadData; _treeRoleSelector.RightReadData += _treeRoleSelector_RightReadData; _treeRoleSelector.Height = 180; _treeRoleSelector.Width = 750; _treeRoleSelector.ColSpan = 2; _treeRoleSelector.ID = "treeRoles"; _formPanel.Add(_treeRoleSelector); _btnSave = new Button(); _btnSave.Icon = Icon.DatabaseSave; _btnSave.Text = "保存"; _btnSave.DirectEvents.Click.Event += SaveUser; _btnSave.DirectEvents.Click.EventMask.Set("正在添加"); _formPanel.Buttons.Add(_btnSave); _hidId = new Hidden(); _hidId.Name = "Id"; _formPanel.Controls.Add(_hidId); MainForm.Controls.Add(_formPanel); }
private void OnHideNative(IntPtr handle, IntPtr userdata) { Log.Debug(LogTag, "OnHideNative()"); Hidden?.Invoke(this, EventArgs.Empty); }
static void Main(string[] args) { int dataSize = 10000000; using (MPI.Environment env = new MPI.Environment(ref args)) { if (Communicator.world.Size != 2) { System.Console.WriteLine("The Datatypes test must be run with two processes."); System.Console.WriteLine("Try: mpiexec -np 2 datatypes.exe"); } else if (Communicator.world.Rank == 0) { // Send an object that contains a "fixed" field Dimensions dims; unsafe { for (int i = 0; i < 11; ++i) dims.values[i] = (float)i; } Communicator.world.Send(dims, 1, 0); // Send an object that contains non-public fields Secretive secret = new Secretive(17, 25); Communicator.world.Send(secret, 1, 1); // Send an object with complex data AggregateData aggregate = new AggregateData(dataSize); Communicator.world.Send(aggregate, 1, 2); // Send an object with a private type Hidden hidden = new Hidden(17, 25); Communicator.world.Send(hidden, 1, 3); // Send a struct that requires serialization. ContainsBool containsBool = new ContainsBool(17); Communicator.world.Send(containsBool, 1, 4); } else { // Receive and check an object that contains a "fixed" field Dimensions dims; Communicator.world.Receive(0, 0, out dims); unsafe { for (int i = 0; i < 11; ++i) { System.Console.WriteLine(dims.values[i].ToString() + " "); Debug.Assert(dims.values[i] == (float)i); } } // Receive and check an object that contains non-public fields Secretive secret; Communicator.world.Receive(0, 1, out secret); System.Console.WriteLine(secret); Debug.Assert(secret == new Secretive(17, 25)); // Receive and check the "complex data" AggregateData aggregate = Communicator.world.Receive<AggregateData>(0, 2); if (!aggregate.Check(dataSize)) { System.Console.Error.WriteLine("Error: complex data not properly transmitted"); MPI.Environment.Abort(1); } // Receive and check an object with a private type Hidden hidden; Communicator.world.Receive(0, 3, out hidden); System.Console.WriteLine(hidden); Debug.Assert(hidden == new Hidden(17, 25)); // Receive and check a struct that requires serialization ContainsBool containsBool; Communicator.world.Receive(0, 4, out containsBool); System.Console.WriteLine(containsBool); Debug.Assert(containsBool == new ContainsBool(17)); } } }
public void Hide() { Model.Hide(); Hidden?.Invoke(this); }