public static void enablingFormWorkingControls(IForm originForm, bool enabled) { foreach (Control ctrl in originForm.getWorkingControls()) { ctrl.Enabled = enabled; } }
public void _showGraceful(string nWindowUrl, string nFormDescriptorUrl) { WindowSingleton windowSingleton_ = __singleton<WindowSingleton>._instance(); mForm = windowSingleton_._loadForm(nFormDescriptorUrl); mDockPanel = mForm._childControl("dockPanel1") as IDockPanel; mForm._appShow(); }
public SubChart(IForm fm1) { form1 = fm1; TotalChartArea = form1.ClientRectangle; totalChartBackColor = fm1.BackColor; totalChartBorderColor = fm1.BackColor; }
public void Setup() { _f = Substitute.For<IForm<object>>(); _f.Template.BeginNavigation().Returns(_beginHtml); _f.Template.EndNavigation().Returns(_endHtml); _f.Template.Button(null, null, null, null, null).ReturnsForAnyArgs(new HtmlString(ButtonHtml)); }
public SettingGame(int wh, int ht, IForm gameForm) { draw = new Paint(wh, ht); StructMap.BlockSize = 30; map = new StructMap(); form = gameForm; ship1 = ship2 = ship3 = ship4 = 0; }
public IMaterial CreateMaterial(IForm item, int count) { return (IMaterial)context.Rule.Engine.ProxyProvider.CreateFieldProxy(new Cobj.MaterialData() { Item = item.ToFormId(), Quantity = (uint)count }, ProxyMode.Target); }
public void Setup() { _f = Substitute.For<IForm<object, IFormTemplate>>(); _f.Template.BeginSection(Arg.Is<IHtmlString>(h => h.ToHtmlString() == _title.ToHtmlString()), Arg.Any<IHtmlString>(), Arg.Any<HtmlAttributes>()).Returns(_beginHtml); _f.Template.EndSection().Returns(_endHtml); _f.Template.BeginNestedSection(Arg.Is<IHtmlString>(h => h.ToHtmlString() == _title.ToHtmlString()), Arg.Any<IHtmlString>(), Arg.Any<HtmlAttributes>()).Returns(_nestedBeginHtml); _f.Template.EndNestedSection().Returns(_nestedEndHtml); }
public AddControl(IForm form) { InitializeComponent(); entityForm = form; UIElement uiForm = (UIElement)form; DockPanel.SetDock(uiForm, Dock.Top); AddControlDockPanel.Children.Add(uiForm); }
/// ------------------------------------------------------------------------------------------------- /// <summary> Begins accept TCP client. </summary> /// /// <remarks> Justin, 7/11/2015. </remarks> /// <param name="byteArrLength"> Length of the byte array. </param> /// <param name="form1"> The first form. </param> /// <returns> A TcpState. </returns> /// ------------------------------------------------------------------------------------------------- public ITcpResponse BeginAcceptTcpClient(long byteArrLength, IForm form1) { //async operation to accept incoming requests ITcpResponse response = new TcpListenerResponse { Result = string.Empty, State = TcpState.NotReady }; response = AcceptTcpClient(byteArrLength, form1, response); return response; }
public ChartStyle(IForm fm1) { form1 = fm1; chartArea = form1.ClientRectangle; chartBackColor = fm1.BackColor; chartBorderColor = fm1.BackColor; PlotArea = chartArea; tickFont = form1.Font; }
public ActGameForm(IForm formGame) { map = new MapStruct(); map.InitMap(); form = formGame; draw = new PaintGame(form.sizeForm.Width, form.sizeForm.Height); selectCapital = firstShip = true; game = new GameLogic(map.MapObject); }
public override void Setup() { base.Setup(); Mock<IForm> form = Mockery.Create<IForm>(); form.Setup( f => f.Xpath).Returns(FormXpath); _form = form.Object; }
// ------- Конструктор ------- protected Manager(IForm frm) { share = new List<Packet>(); working = new List<Packet>(); mutex = new Mutex(false); timer = new Timer(new TimerCallback(SendToPlugins), null, Timeout.Infinite, SpeedSurvey); form = frm; }
public static String GetFormDataTag(TagType type, IForm fd) { switch (type) { case TagType.Tile: return String.Format("tile-data-{0}-form_type-{1}", fd.id, fd.form.form_type_id); case TagType.Document: return String.Format("doc-data-{0}-form_type-{1}", fd.id, fd.form.form_type_id); case TagType.Container: return String.Format("container-data-{0}-form_type-{1}", fd.id, fd.form.form_type_id); default: return null; } }
public Spinner(List<IController> controller, SheetMap map, IConnectionInfo connectionInfo, IPrinter printer, IForm form) { _mainForm = form; _connectionInfo = connectionInfo; _controllers = controller; _map = map; _printer = printer; _controllers.ForEach( ctrl => ctrl.SheetRequest.Subscribe( wnd => CurrentController = _controllers.FirstOrDefault(_map.GetControllerPredicate(wnd)))); _controllers.ForEach(ctrl => WireUpModels(ctrl.GetCoreEventModel())); }
private async Task<object> LoadFormData(IForm formData, ISpreadsheetControl spreadsheetControl) { var data = await Repo.GetFile(formData.file_id); var excelData = data != null ? data.contents : null; if (excelData == null) { this.ShowFlyoutMessageBox("Информация", "Не удалось загрузить данные формы", FlyoutCommand.OK); spreadsheetControl.CreateNewDocument(); return null; } using (var ms = new MemoryStream(excelData)) { var format = DocumentFormat.OpenXml; spreadsheetControl.LoadDocument(ms, format); spreadsheetControl.Document.History.IsEnabled = true; spreadsheetControl.Document.Worksheets.ActiveWorksheet = spreadsheetControl.Document.Worksheets.FirstOrDefault(); } return null; }
public void Setup() { _fc = Substitute.For<IFieldConfiguration>(); _f = Substitute.For<IForm<TestFieldViewModel, IFormTemplate>>(); _f.Template.BeginField(_label, _field, _validation, _metadata, Arg.Any<IReadonlyFieldConfiguration>(), Arg.Any<bool>()).Returns(_beginHtml); _f.Template.Field(_label, _field, _validation, _metadata, Arg.Any<IReadonlyFieldConfiguration>(), Arg.Any<bool>()).Returns(_html); _f.Template.EndField().Returns(_endHtml); _g = Substitute.For<IFieldGenerator>(); _g.GetLabelHtml(Arg.Any<IReadonlyFieldConfiguration>()).Returns(_label); _g.GetFieldHtml(Arg.Any<IReadonlyFieldConfiguration>()).Returns(_field); _g.GetValidationHtml(Arg.Any<IReadonlyFieldConfiguration>()).Returns(_validation); _g.Metadata.Returns(_metadata); _g.GetFieldId().Returns(FieldId); var autoSubstitute = AutoSubstituteContainer.Create(); var helper = autoSubstitute.Resolve<HtmlHelpers<TestFieldViewModel>>(); _f.HtmlHelper.Returns(helper); _f.GetFieldGenerator(Arg.Any<Expression<Func<TestFieldViewModel, string>>>()).Returns(_g); }
public ActLevel(int wh, int ht, Editor form) { draw = new PaintEditor(wh, ht); map = new MapStruct(); mainForm = form; }
/// <summary> /// Construct a confirmation. /// </summary> /// <param name="prompt">Confirmation prompt expressed using \ref patterns.</param> /// <param name="condition">Delegate for whether confirmation applies.</param> /// <param name="dependencies">Fields that must have values before confirmation can run.</param> /// <param name="form">Form that contains confirmation.</param> public Confirmation(PromptAttribute prompt, ActiveDelegate <T> condition, IEnumerable <string> dependencies, IForm <T> form) : base("confirmation" + form.Steps.Count, FieldRole.Confirm) { SetPrompt(prompt); SetType(typeof(bool)); SetDependencies(dependencies.ToArray()); SetActive(condition); SetFieldDescription(new DescribeAttribute(form.Configuration.Confirmation) { IsLocalizable = false }); var noStep = (dependencies.Any() ? new NextStep(dependencies) : new NextStep()); _next = (value, state) => (bool)value ? new NextStep() : noStep; }
public Ellipse(IForm form) { this.form = form; temp = new Bitmap(form.WH, form.HT); }
public override void Initiate(IForm sender) { sender.Close(); _form.Show(); }
/// <summary> /// Converts this form to a <b>Static</b> form or returns <c>null</c> if this form is not a <b>Static</b> form. /// </summary> /// <param name="form"></param> /// <returns></returns> public static IStat AsStat(this IForm form) { return(As <IStat>(form)); }
public CategoriesController(MainDbContext context, IForm form) { _context = context; _form = form; _form.FormItems = new List <FormItem>() { new FormItem() { Type = "div", ClassName = "row", Props = new Dictionary <string, string>() { { "testProp1", "testProp1Value" }, { "testProp2", "testProp2Value" }, }, ChildrenFormItems = new List <FormItem>() { new FormItem() { Type = "BsCard", ClassName = "col-md-4", Props = new Dictionary <string, string>() { { "headerTitle", "Image" }, { "headerBg", "bg-primary" } }, ChildrenFormItems = new List <FormItem>() { new FormItem() { Type = "image", Label = "Image", CreateValidation = "required|max:1000", }, } }, new FormItem() { Type = "BsCard", ClassName = "col-md-8", Props = new Dictionary <string, string>() { { "headerTitle", "Information" }, { "headerBg", "bg-info" } }, ChildrenFormItems = new List <FormItem>() { new FormItem() { Type = "text", Label = "Name", CreateValidation = "required|min:3|max:10|unique", }, new FormItem() { Type = "checkbox", Label = "Activated", }, } } } }, }; }
public ICondition GetItemCount(IForm item) { return CreateConditionProxy(Function.GetItemCount).SetParam(0, item); }
/// <summary> /// Converts this form to a <b>Activation Rule</b> form or returns <c>null</c> if this form is not a <b>Activation Rule</b> form. /// </summary> /// <param name="form"></param> /// <returns></returns> public static IAoru AsAoru(this IForm form) { return(As <IAoru>(form)); }
public void addForm(String identifier, IForm form) { inControl.Add(identifier, form); }
public IField Get(IForm form, Guid fieldId) { return(form == null ? null : form.Field.FirstOrDefault(field => field.FieldId == fieldId)); }
#pragma warning disable CS0612 // 类型或成员已过时 public UploadDangerResourceFileCtrlAction(IBaseItem caller, IForm formClass) : base(caller: caller, formClass: formClass) #pragma warning restore CS0612 // 类型或成员已过时 { }
public void inicializar(IForm unForm) { controles = new List <IControlDeUsuario>(); errorProvider1 = new ErrorProvider(); miFormulario = unForm; }
/// <inheritdoc /> public ISection <TPartialModel> CreatePartialSection <TPartialModel>(IForm <TPartialModel> partialModelForm) { return(new PartialViewSection <TPartialModel>(partialModelForm)); }
/// <summary> /// Creates a top-level form section. /// </summary> /// <example> /// @using (var s = f.BeginSection("Section heading")) { /// @s.FieldFor(m => m.FirstName) /// } /// </example> /// <typeparam name="TModel">The view model type for the current view</typeparam> /// <param name="form">The form the section is being created in</param> /// <param name="heading">The heading for the section</param> /// <param name="leadingHtml">Any HTML to output at the start of the section</param> /// <param name="htmlAttributes">Any HTML attributes to apply to the section container</param> /// <returns>The form section</returns> public static Section <TModel> BeginSection <TModel>(this IForm <TModel> form, string heading = null, IHtmlString leadingHtml = null, HtmlAttributes htmlAttributes = null) { return(new Section <TModel>(form, heading.ToHtml(), false, leadingHtml, htmlAttributes)); }
public ICondition HasKeyword(IForm keyword) { return CreateConditionProxy(Function.HasKeyword).SetParam(0, keyword); }
public ICondition GetGlobalValue(IForm global) { return CreateConditionProxy(Function.GetGlobalValue).SetParam(0, global); }
public void FormMainMenu() { currentForm = d_FormMainMenu; }
public ICondition GetStageDone(IForm quest, int stage) { return CreateConditionProxy(Function.GetStageDone).SetParam(0, quest).SetParam(1, stage); }
public void FormStartServer() { currentForm = d_FormStartServer; }
internal FormProperties(IForm form) { Form = form; innerList.Add(_permissions); innerList.Add(_xPos); innerList.Add(_yPos); innerList.Add(_width); innerList.Add(_height); innerList.Add(_editable); innerList.Add(_backColor); innerList.Add(_caption); innerList.Add(_captionMl); innerList.Add(_borderStyle); innerList.Add(_captionBar); innerList.Add(_description); innerList.Add(_minimizable); innerList.Add(_minimizedOnOpen); innerList.Add(_maximizable); innerList.Add(_maximizedOnOpen); innerList.Add(_sizeable); innerList.Add(_activeControlOnOpen); innerList.Add(_saveControlInfo); innerList.Add(_saveValues); innerList.Add(_multipleNewLines); innerList.Add(_autoPosition); innerList.Add(_savePosAndSize); innerList.Add(_logWidth); innerList.Add(_logHeight); innerList.Add(_insertAllowed); innerList.Add(_deleteAllowed); innerList.Add(_modifyAllowed); innerList.Add(_linksAllowed); innerList.Add(_tableBoxId); innerList.Add(_lookupMode); innerList.Add(_sourceTable); innerList.Add(_autoSplitKey); innerList.Add(_sourceTablePlacement); innerList.Add(_saveTableView); innerList.Add(_dataCaptionExpr); innerList.Add(_updateOnActivate); innerList.Add(_delayedInsert); innerList.Add(_populateAllFields); innerList.Add(_sourceTableView); innerList.Add(_timerInterval); innerList.Add(_dataCaptionFields); innerList.Add(_sourceTableTemporary); innerList.Add(_refreshOnActivate); innerList.Add(_showFilter); innerList.Add(_sourceTableRecord); innerList.Add(_calcFields); innerList.Add(_horzGrid); innerList.Add(_vertGrid); innerList.Add(_saveColumnWidths); innerList.Add(_visible); innerList.Add(_onInit); innerList.Add(_onOpenForm); innerList.Add(_onCloseForm); innerList.Add(_onQueryCloseForm); innerList.Add(_onActivateForm); innerList.Add(_onFindRecord); innerList.Add(_onNextRecord); innerList.Add(_onAfterGetRecord); innerList.Add(_onAfterGetCurrRecord); innerList.Add(_onBeforePutRecord); innerList.Add(_onNewRecord); innerList.Add(_onInsertRecord); innerList.Add(_onModifyRecord); innerList.Add(_onDeleteRecord); innerList.Add(_onHyperlink); innerList.Add(_onCreateHyperlink); innerList.Add(_onTimer); innerList.Add(_onDeactivateForm); }
private void FormWorldOptions(int id) { currentForm = d_FormWorldOptions; d_FormWorldOptions.worldId = id; d_FormWorldOptions.Initialize(); //after worldId set. }
/// <summary> /// Converts this form to a <b>Shader Particle Geometry</b> form or returns <c>null</c> if this form is not a <b>Shader Particle Geometry</b> form. /// </summary> /// <param name="form"></param> /// <returns></returns> public static ISpgd AsSpgd(this IForm form) { return(As <ISpgd>(form)); }
public void FormJoinMultiplayer() { currentForm = d_FormJoinMultiplayer; }
/// <summary> /// Construct a confirmation dynamically. /// </summary> /// <param name="generateMessage">Delegate for building confirmation.</param> /// <param name="condition">Delegate to see if confirmation is active.</param> /// <param name="dependencies">Fields that must have values before confirmation can run.</param> /// <param name="form">Form that contains confirmation.</param> public Confirmation(MessageDelegate <T> generateMessage, ActiveDelegate <T> condition, IEnumerable <string> dependencies, IForm <T> form) : base("confirmation" + form.Steps.Count, FieldRole.Confirm) { SetDefine(async(state, field) => { field.SetPrompt(await generateMessage(state)); return(true); }); SetType(typeof(bool)); SetDependencies(dependencies.ToArray()); SetActive(condition); SetFieldDescription(new DescribeAttribute(form.Configuration.Confirmation) { IsLocalizable = false }); var noStep = (dependencies.Any() ? new NextStep(dependencies) : new NextStep()); SetNext((value, state) => (bool)value ? new NextStep() : noStep); }
public void FormLogin() { currentForm = d_FormLogin; }
// ------ инстанцировать менеджер ------- /// <summary> /// Инстанцировать менеджер /// </summary> /// <param name="frm">Форма с которой будет выполняться взаимодействие</param> /// <returns></returns> public static Manager GetManager(IForm frm) { if (manager == null) manager = new Manager(frm); return manager; }
public void FormConnectToIp() { currentForm = d_FormConnectToIp; }
/// <summary> /// Converts this form to a <b>Sound</b> form or returns <c>null</c> if this form is not a <b>Sound</b> form. /// </summary> /// <param name="form"></param> /// <returns></returns> public static ISndr AsSndr(this IForm form) { return(As <ISndr>(form)); }
public void Setup() { OpenForm(); var page = Browser.CurrentPage(); _form = page.Form(Id.Is("testform")); }
public ICondition GetVMQuestVariable(IForm quest, string variable) { return CreateConditionProxy(Function.GetVMQuestVariable).SetParam(0, quest).SetParam(1, variable); }
public IField Get(IForm form, Guid fieldId) { return form == null ? null : form.Field.FirstOrDefault(field => field.FieldId == fieldId); }
public ICondition HasPerk(IForm perk) { return CreateConditionProxy(Function.HasPerk).SetParam(0, perk); }
/// <summary> /// Converts this form to a <b>God Reys</b> form or returns <c>null</c> if this form is not a <b>God Reys</b> form. /// </summary> /// <param name="form"></param> /// <returns></returns> public static IGdry AsGdry(this IForm form) { return(As <IGdry>(form)); }
public ICondition GetInCurrentLoc(IForm location) { return CreateConditionProxy(Function.GetInCurrentLoc).SetParam(0, location); }
public FieldStep(string name, IForm <T> form) { _name = name; _field = form.Fields.Field(name); }
public ICondition GetQuestCompleted(IForm quest) { return CreateConditionProxy(Function.GetQuestCompleted).SetParam(0, quest); }
public override IStrategy CreatePrepareStrategy(IForm form) { return(form.GetCustomizedPrepareStrategy() != null ? form.GetCustomizedPrepareStrategy() : new DefaultShipmentPrepareStrategy(form)); }
/// <summary> /// Creates a standalone validation message to be output in a form for a field. /// </summary> /// <typeparam name="TModel">The view model type for the current view</typeparam> /// <typeparam name="TTemplate">The type of HTML template renderer the form is using</typeparam> /// <typeparam name="T">The type of the field being generated</typeparam> /// <param name="form">The form the label is being created in</param> /// <param name="property">A lamdba expression to identify the field to render the validation message for</param> /// <returns>The HTML for the validation message</returns> public static IFieldConfiguration ValidationMessageFor <TModel, TTemplate, T>(this IForm <TModel, TTemplate> form, Expression <Func <TModel, T> > property) where TTemplate : IFormTemplate { var config = new FieldConfiguration(); config.SetField(() => form.GetFieldGenerator(property).GetValidationHtml(config)); return(config); }
public override IStrategy CreateReportStrategy(IForm form) { return(form.GetCustomizedReportStrategy() != null ? form.GetCustomizedReportStrategy() : new DefaultShipmentReportStrategy(form)); }
/// <summary> /// Converts this form to a <b>Weather</b> form or returns <c>null</c> if this form is not a <b>Weather</b> form. /// </summary> /// <param name="form"></param> /// <returns></returns> public static IWthr AsWthr(this IForm form) { return(As <IWthr>(form)); }
/* Prepare method Create System here (add return, arguments and body)*/ static Ui.TaskSystem CreateSystem(IForm form, IDisplay display) { return(new Ui.TaskSystem(form, display)); }
public void FormGameOptions() { currentForm = d_FormGameOptions; }
/// <summary> /// Converts this form to a <b>Form List</b> form or returns <c>null</c> if this form is not a <b>Form List</b> form. /// </summary> /// <param name="form"></param> /// <returns></returns> public static IFlst AsFlst(this IForm form) { return(As <IFlst>(form)); }