Пример #1
0
        ///<summary>
        ///</summary>
        private void UpdateInformation()
        {
            if (elementHost.Child == null)
            {
                elementHost.Child = new DamageChartControl();
            }
            if (_currentDocument == null || _currentAircraft == null)
            {
                return;
            }

            //extendableRichContainer1.Caption = _currentDocument.DamageDocFile != null
            //                                       ? _currentDocument.DamageDocFile.FileName
            //                                       : "Please, add file";
            extendableRichContainer1.Caption = string.IsNullOrEmpty(_currentDocument.DamageChart2DImageName)
                                                   ? "Please, add file"
                                                   : _currentDocument.DamageChart2DImageName;

            DamageChartControl dcc = elementHost.Child as DamageChartControl;

            if (dcc != null)
            {
                dcc.DamageDocument = _currentDocument;
            }
            //comboBoxDamageCharts.Items.Clear();
            //comboBoxDamageCharts.Items.AddRange(damageCharts.ToArray());
            //comboBoxDamageCharts.SelectedItem =
            //    damageCharts.GetItemById(_currentDocument.DamageChartId);

            //fileControlChartFile.UpdateInfo(_currentDocument.DamageDocFile,
            //                                "Adobe PDF Files|*.pdf",
            //                                "This record does not contain a file proving the Chart file. Enclose PDF file to prove the compliance.",
            //                                "Attached file proves the Chart file.");
            //textBoxLocation.Text = _currentDocument.Location;
        }
Пример #2
0
        ///<summary>
        ///</summary>
        ///<returns></returns>
        public bool GetChangeStatus()
        {
            DamageChartControl dcc = elementHost.Child as DamageChartControl;

            if (dcc == null)
            {
                return(false);
            }
            return(dcc.GetChangeStatus());
        }
Пример #3
0
        ///<summary>
        ///</summary>
        ///<returns></returns>
        public void SaveData()
        {
            DamageChartControl dcc = elementHost.Child as DamageChartControl;

            if (dcc == null)
            {
                return;
            }
            dcc.SaveData();

            //_currentDocument.DamageChartId = comboBoxDamageCharts.SelectedItem != null
            //                                     ? ((DamageChart) comboBoxDamageCharts.SelectedItem).ItemId
            //                                     : -1;
            //if (fileControlChartFile.GetChangeStatus() || (fileControlChartFile.AttachedFile != null && fileControlChartFile.AttachedFile.ItemId <= 0))
            //{
            //    fileControlChartFile.ApplyChanges();
            //    fileControlChartFile.Save();
            //    _currentDocument.DamageDocFile = fileControlChartFile.AttachedFile;
            //}
            //else if (fileControlChartFile.AttachedFile != null)
            //    _currentDocument.DamageDocFile = fileControlChartFile.AttachedFile;

            //_currentDocument.Location = textBoxLocation.Text;
        }