private void previewButton_Click(object sender, RoutedEventArgs e) { MyContainer previewCanvas = CreateLayout.previewCanvasContent(this.myContainer); preViewWindow = new Window(); preViewWindow.Background = Brushes.Black; preViewWindow.Content = previewCanvas; //window.WindowStyle = WindowStyle.None; preViewWindow.WindowState = WindowState.Maximized; preViewWindow.Show(); //window.ShowDialog(); setTimer(this.myContainer.Timer); }
private List <IAppender> ReadAppenders(int count) { var appenders = new List <IAppender>(); for (int i = 0; i < count; i++) { string[] inputData = reader.ReadLine().Split(" ", StringSplitOptions.RemoveEmptyEntries); ILayout layout = CreateLayout.GetLayout(inputData[1]); IAppender appender = CreateAppender.GetAppender(inputData[0], layout); appender.ReportLevel = (inputData.Length == 3) ? Enum.Parse <ReportLevel>(inputData[2], true) : ReportLevel.Info; appenders.Add(appender); } return(appenders); }
public async Task <Guid> Execute(CreateLayout command) { var layout = new SurveyLayout { UID = Guid.NewGuid(), NmLayout = command.LayoutName }; layout.SurveyLayoutTag = CreateTags(layout.UID, command.Tags) .ToList(); await writeContext.SurveyLayout.AddAsync(layout); await writeContext.SaveChangesAsync(); return(layout.UID); }
private void Scenes_SelectionChanged(object sender, SelectionChangedEventArgs e) { ListBox listBox = sender as ListBox; int index; if (listBox.Items.Count < 1) { return; } if (listBox.SelectedItem == null) { index = 0; } else { index = listBox.SelectedIndex; } string scenePath = (listBox.Items[index] as ListBoxItem).DataContext as string; CreateLayout.showScene(this.myContainer, scenePath); AttributeLayout.InitSceneAttributeLayout(this, myContainer); }
public async Task <IActionResult> PostLayout([FromBody] CreateLayout command) { await rules .NoDuplicateLayoutName() .Apply(command, ModelState); if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var createdLayoutId = await service.Execute(command); var uri = Url.Action("Get", new { id = createdLayoutId }); return(Created(uri, new LayoutDto { LayoutId = createdLayoutId, LayoutName = command.LayoutName, Tags = command.Tags.ToList(), Items = new List <LayoutItemDto>() })); }
private void Canvas_Drop(object sender, DragEventArgs e) { string tag = e.Data.GetData("Tag") as string; CreateLayout.CreateControlByTag(tag, e, this.myContainer, this); }