public void AddSelectionView(IResizableView view, string caption, ApplicationIcon icon) { var group = layoutMainGroup.AddGroup(); var layoutControlItem = group.AddItem(); layoutControlItem.Control = view.DowncastTo <Control>(); layoutControlItem.TextVisible = false; layoutControlItem.SizeConstraintsType = SizeConstraintsType.Custom; group.Text = caption; group.CaptionImageIndex = ApplicationIcons.IconIndex(icon); view.HeightChanged += (o, e) => adjustLayoutItemSize(layoutControlItem, view, e.Height); }
private void initView(IResizableView view) { var page = _pageCache[view]; var tileItem = _tileItemCache[page]; page.FillWith(view); tileItem.Text = view.Caption.ToUpperInvariant(); view.HeightChanged += (o, e) => updateNavigationFrameHeight(page, e.Height); tileItem.AppearanceItem.Normal.Font = new Font("Arial", 10, FontStyle.Bold); layoutItemButtonStart.AdjustSize(UIConstants.Size.LARGE_BUTTON_WIDTH, Constants.BUTTON_HEIGHT); startButton.InitWithImage(ApplicationIcons.Run, IconSizes.Size32x32, Captions.SnapshotStart); layoutItemButtonStop.AdjustSize(UIConstants.Size.LARGE_BUTTON_WIDTH, Constants.BUTTON_HEIGHT); stopButton.InitWithImage(ApplicationIcons.Stop, IconSizes.Size32x32, Captions.SnapshotStop); }
public void AddMoleculeParametersView(IView view) { _view = view as IResizableView; AddViewTo(layoutItemMoleculeParameters, view); }
protected override void AdjustLayoutItemSize(LayoutControlItem layoutControlItem, IResizableView view, int height) { base.AdjustLayoutItemSize(layoutControlItem, view, height); HeightChanged(this, new ViewResizedEventArgs(OptimalHeight)); }
public void AddFormulationMappingView(IView view) { _resizableView = view as IResizableView; AddViewToGroup(layoutControlGroup, view); }
public void AddCalculationMethodsView(IView view) { _resizableView = view as IResizableView; AddViewToGroup(layoutControlGroup, view); layoutControlGroup.Visibility = LayoutVisibility.Always; }
protected override void AdjustLayoutItemSize(LayoutControlItem layoutControlItem, IResizableView view, int height) { base.AdjustLayoutItemSize(layoutControlItem, view, height); raiseHeightChangedEvent(); }
public void AddSingleFolderView(IResizableView view) { _pageCache[view] = singleFolderPage; initView(view); }
public void AddParameterAlernativesView(IResizableView view) { _subViews.Add(view); AddViewTo(layoutMainGroup, view); }
private void adjustHeight(IResizableView view, int height) { layoutItemProperties.AdjustControlHeight(height); view.Repaint(); }
public void AddResultPropertiesView(IResizableView view) { panelProperties.FillWith(view); view.HeightChanged += (o, e) => OnEvent(() => adjustHeight(view, e.Height)); }
public void AddProcessView(IResizableView view) { _subViews.Add(view); AddViewTo(layoutMainGroup, view); }
public void AddOntogenyView(IResizableView view) { OntogenyVisible = true; _ontogenyView = view; AddViewTo(layoutItemOntogeny, view); }
public void AddFolderListView(IResizableView view) { _pageCache[view] = folderListPage; initView(view); }
private void adjustLayoutItemSize(LayoutControlItem layoutControlItem, IResizableView view, int height) { layoutControlItem.AdjustControlHeight(height); view.Repaint(); }
public void AddCalculationMethodsView(IResizableView view) { _subViews.Add(view); AddViewTo(layoutMainGroup, view); }
protected virtual void AdjustLayoutItemSize(LayoutControlItem layoutControlItem, IResizableView view, int height) { if (layoutControlItem == null || layoutControlItem.Parent == null) { return; } try { layoutControlItem.Owner.BeginUpdate(); layoutControlItem.AdjustControlHeight(height); var group = layoutControlItem.Parent; //only one item in the group and the view should be hidden group.Visibility = LayoutVisibilityConvertor.FromBoolean(height > 0 || group.Items.Count > 1); view.Repaint(); } finally { layoutControlItem.Owner.EndUpdate(); } }
public void AddFormulationMappingView(IView view) { _resizableView = view as IResizableView; AddViewTo(layoutItemFormulation, view); }