示例#1
0
        private void OnOpenClick()
        {
            PressOperation selectedEntity = SelectedEntity;

            if (selectedEntity == null)
            {
                MessageBox.Show(@"Пожалуйста, выберите операцию.");
                return;
            }

            if (selectedEntity.PressOperationData == null)
            {
                Dal.LoadPressOperationData(selectedEntity);//загрузим данные длял опреции
            }

            ChartForm form = (ChartForm)UiHelper.GetFormSingle(typeof(ChartForm));

            form.ChartFormShowMode = ChartFormShowMode.ShowSavedOperation;

            ChartFormViewModel viewModel = new ChartFormViewModel {
                PressOperation = selectedEntity
            };

            form.buttonSaveOperation.Visible = true;
            viewModel.CanSaveOperation       = true;
            form.ViewModel = viewModel;

            UiHelper.ShowForm(form, UiHelper.GetMdiContainer(this));
        }
示例#2
0
        private void ShowChartForm()
        {
            Form      mdiParent = UiHelper.GetMdiContainer(this);
            ChartForm form      = (ChartForm)UiHelper.GetFormSingle(typeof(ChartForm));

            UiHelper.ShowForm(form, mdiParent);
        }
示例#3
0
        private void ShowChartForm()
        {
            Form mdiParent = UiHelper.GetMdiContainer(this);

            ChartForm form = (ChartForm)UiHelper.GetFormSingle(typeof(ChartForm));

            ChartFormViewModel viewModel = new ChartFormViewModel
            {
                PressOperation = OpcLayer.CurrentPressOperation//TODO: подумать как лучше брать текущую операцию
            };

            form.buttonSaveOperation.Visible = false;
            viewModel.CanSaveOperation       = false;
            form.ViewModel = viewModel;


            form.ChartFormShowMode = ChartFormShowMode.ShowCurrentOperation;

            UiHelper.ShowForm(form, mdiParent);
        }