Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 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);
 }
Exemple #6
0
 public void AddCalculationMethodsView(IView view)
 {
     _resizableView = view as IResizableView;
     AddViewToGroup(layoutControlGroup, view);
     layoutControlGroup.Visibility = LayoutVisibility.Always;
 }
Exemple #7
0
 protected override void AdjustLayoutItemSize(LayoutControlItem layoutControlItem, IResizableView view, int height)
 {
     base.AdjustLayoutItemSize(layoutControlItem, view, height);
     raiseHeightChangedEvent();
 }
Exemple #8
0
 public void AddSingleFolderView(IResizableView view)
 {
     _pageCache[view] = singleFolderPage;
     initView(view);
 }
Exemple #9
0
 public void AddParameterAlernativesView(IResizableView view)
 {
     _subViews.Add(view);
     AddViewTo(layoutMainGroup, view);
 }
Exemple #10
0
 private void adjustHeight(IResizableView view, int height)
 {
     layoutItemProperties.AdjustControlHeight(height);
     view.Repaint();
 }
Exemple #11
0
 public void AddResultPropertiesView(IResizableView view)
 {
     panelProperties.FillWith(view);
     view.HeightChanged += (o, e) => OnEvent(() => adjustHeight(view, e.Height));
 }
Exemple #12
0
 public void AddProcessView(IResizableView view)
 {
     _subViews.Add(view);
     AddViewTo(layoutMainGroup, view);
 }
 public void AddOntogenyView(IResizableView view)
 {
     OntogenyVisible = true;
     _ontogenyView   = view;
     AddViewTo(layoutItemOntogeny, view);
 }
Exemple #14
0
 public void AddFolderListView(IResizableView view)
 {
     _pageCache[view] = folderListPage;
     initView(view);
 }
Exemple #15
0
 private void adjustLayoutItemSize(LayoutControlItem layoutControlItem, IResizableView view, int height)
 {
     layoutControlItem.AdjustControlHeight(height);
     view.Repaint();
 }
Exemple #16
0
 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();
            }
        }
Exemple #18
0
 public void AddFormulationMappingView(IView view)
 {
     _resizableView = view as IResizableView;
     AddViewTo(layoutItemFormulation, view);
 }