private ISeries GetSeries(string studyInstanceUid, string seriesInstanceUid) { if (String.IsNullOrEmpty(studyInstanceUid) || String.IsNullOrEmpty(seriesInstanceUid)) { throw new ArgumentException("The study and series uids must be specified for an image level query."); } IStudy study = GetStudies(new StudyRootStudyIdentifier { StudyInstanceUid = studyInstanceUid }).FirstOrDefault(); if (study == null) { Platform.Log(LogLevel.Debug, "No study exists with the given study uid ({0}).", studyInstanceUid); return(null); } ISeries series = (from s in study.GetSeries() where s.SeriesInstanceUid == seriesInstanceUid select s).FirstOrDefault(); if (series == null) { Platform.Log(LogLevel.Debug, "No series exists with the given study and series uids ({0}, {1})", studyInstanceUid, seriesInstanceUid); } return(series); }
protected override int OnStart(StudyLoaderArgs studyLoaderArgs) { _sops = null; EventResult result = EventResult.Success; var loadedInstances = new AuditedInstances(); try { using (var context = new DataAccessContext()) { IStudy study = context.GetStudyBroker().GetStudy(studyLoaderArgs.StudyInstanceUid); if (study == null) { result = EventResult.MajorFailure; loadedInstances.AddInstance(studyLoaderArgs.StudyInstanceUid); throw new NotFoundLoadStudyException(studyLoaderArgs.StudyInstanceUid); } loadedInstances.AddInstance(study.PatientId, study.PatientsName, study.StudyInstanceUid); _sops = study.GetSopInstances().GetEnumerator(); return(study.NumberOfStudyRelatedInstances); } } finally { AuditHelper.LogOpenStudies(new[] { AuditHelper.LocalAETitle }, loadedInstances, EventSource.CurrentUser, result); } }
public void CreateBestServerStudy(ValueMatrixType valueMatrixType, StudyResultType studyResultType, string name, ref IStudy study) { if (name.Equals("Best Server")) { study = new LteBestServerStudy(); } }
public void CreateMcsStudy(ValueMatrixType valueMatrixType, StudyResultType studyResultType, string name, ref IStudy study) { if (name.Equals("PDSCH MCS") || name.Equals("PUSCH MCS") || name.Equals("RPDSCH MCS") || name.Equals("RPUSCH MCS")) { study = new LteMcsStudy(); } }
private List <DicomAttributeCollection> SeriesQuery(QueryCriteria queryCriteria) { string studyUid = queryCriteria[DicomTags.StudyInstanceUid]; if (String.IsNullOrEmpty(studyUid)) { throw new ArgumentException("The study uid must be specified for a series level query."); } IStudy study = GetStudy(studyUid); if (study == null) { throw new ArgumentException(String.Format("No study exists with the given study uid ({0}).", studyUid)); } try { QueryResultFilter <Series> filter = new QueryResultFilter <Series>(queryCriteria, Convert.Cast <Series>(study.GetSeries()), GetSpecificCharacterSet); return(filter.GetResults()); } catch (DataStoreException) { throw; } catch (Exception e) { throw new DataStoreException("An error occurred while performing the series query.", e); } }
[TestInitialize] //初始化测试用例 public void MyTestInitialize() { target = new BestServerStudyEditor(); study = new ShortDiscreteStudy(); CreatContext(); }
private IEnumerable <Series> GetSeries(SeriesEntry criteria) { try { string studyInstanceUid = null; if (criteria != null && criteria.Series != null) { studyInstanceUid = criteria.Series.StudyInstanceUid; } //This will throw when Uid parameter is empty. IStudy study = GetStudy(studyInstanceUid); if (study == null) { return(new List <Series>()); } //TODO (Marmot): make extended data queryable, too. var dicomCriteria = criteria.Series.ToDicomAttributeCollection(); var filters = new SeriesPropertyFilters(dicomCriteria); var results = filters.FilterResults(study.GetSeries().Cast <Series>()); return(results); } catch (Exception e) { throw new Exception("An error occurred while performing the series query.", e); } }
protected override int OnStart(StudyLoaderArgs studyLoaderArgs) { _sops = null; EventResult result = EventResult.Success; var loadedInstances = new AuditedInstances(); try { using (var context = new DataAccessContext()) { if (!studyLoaderArgs.Options.IgnoreInUse) { var workItemStatusFilter = WorkItemStatusFilter.StatusIn( WorkItemStatusEnum.Pending, WorkItemStatusEnum.InProgress, WorkItemStatusEnum.Idle, WorkItemStatusEnum.Failed); var updateItems = context.GetWorkItemBroker().GetWorkItems( WorkItemConcurrency.StudyUpdate, workItemStatusFilter, studyLoaderArgs.StudyInstanceUid); var deleteItems = context.GetWorkItemBroker().GetWorkItems( WorkItemConcurrency.StudyDelete, workItemStatusFilter, studyLoaderArgs.StudyInstanceUid); var updateTriggerItems = context.GetWorkItemBroker().GetWorkItems( WorkItemConcurrency.StudyUpdateTrigger, workItemStatusFilter, studyLoaderArgs.StudyInstanceUid); if (updateItems.Any() || deleteItems.Any() || updateTriggerItems.Any()) { var message = string.Format("There are work items actively modifying the study with UID '{0}'.", studyLoaderArgs.StudyInstanceUid); throw new InUseLoadStudyException(studyLoaderArgs.StudyInstanceUid, message); } } IStudy study = context.GetStudyBroker().GetStudy(studyLoaderArgs.StudyInstanceUid); if (study == null) { result = EventResult.MajorFailure; loadedInstances.AddInstance(studyLoaderArgs.StudyInstanceUid); throw new NotFoundLoadStudyException(studyLoaderArgs.StudyInstanceUid); } loadedInstances.AddInstance(study.PatientId, study.PatientsName, study.StudyInstanceUid); _sops = study.GetSopInstances().GetEnumerator(); return(study.NumberOfStudyRelatedInstances); } } finally { AuditHelper.LogOpenStudies(new[] { AuditHelper.LocalAETitle }, loadedInstances, EventSource.CurrentUser, result); } }
public DisciplineForm() { InitializeComponent(); study = new BSTUStudy(); studyPlane = new StudyPlane(); studyPlaneBuilder = new StudyPlaneBuilder(); formsStyle = FormsStyle.GetInstance(); }
public bool FillOut(List<Context> contextList, IStudy study) { ValueMatrixShort handOver = contextList[0][ContextKeys.GSMHandOver] as ValueMatrixShort; //if (handOver==null) //{ // return false; //} return study.SaveResult(handOver); }
public bool FillOut(List<Context> contextList, IStudy study) { ValueMatrixShort upPCHRSCP = contextList[0][ContextKeys.UpPCHRSCP] as ValueMatrixShort; if (upPCHRSCP == null) { return false; } return study.SaveResult(upPCHRSCP); }
public bool FillOut(List<Context> contextList, IStudy study) { ValueMatrixShort dlServiceCIR = contextList[0][ContextKeys.GSMDLServiceCIR] as ValueMatrixShort; //if (dlServiceCIR==null) //{ // return false; //} return study.SaveResult(dlServiceCIR); }
public bool FillOut(List<Context> contextList, IStudy study) { ValueMatrixShort geometry = contextList[0][ContextKeys.Geometry] as ValueMatrixShort; //if (geometry==null) //{ // return false; //} return study.SaveResult(geometry); }
public bool FillOut(List<Context> contextList, IStudy study) { ValueMatrixShort mos = contextList[0][ContextKeys.GSMMos] as ValueMatrixShort; //if (mos==null) //{ // return false; //} return study.SaveResult(mos); }
public bool FillOut(List<Context> contextList, IStudy study) { ValueMatrixShort dlDCHCIR = contextList[0][ContextKeys.DLDCHCIR] as ValueMatrixShort; if (dlDCHCIR == null) { return false; } return study.SaveResult(dlDCHCIR); }
/// <summary> /// 为小区的BestServer区域涂色 /// </summary> /// <param name="study"></param> /// <param name="bestServerCellID"></param> public void GetColorForCell(IStudy study, ValueMatrixShort bestServerCellID,List<IACell> cellList) { ((ShortDiscreteStudy)study).StyleList.Clear(); List<Color> colors = this.GenGeoDisplayColor(); foreach (IACell cell in cellList) { string cellName = cell.Name; GeoDiscreteSytle style = this.AllocateColorToCell(colors, cell.ID, cellName); ((ShortDiscreteStudy)study).StyleList.Add(style); } }
public AnonymizeStudyOutput AnonymizeStudy(AnonymizeStudyInput input) { // load study to anonymize IDataStoreReader reader = DataAccessLayer.GetIDataStoreReader(); IStudy study = reader.GetStudy(input.StudyInstanceUID); List <ISopInstance> sops = new List <ISopInstance>(study.GetSopInstances()); // ensure there is a valid output location if (string.IsNullOrEmpty(input.OutputDirectory)) { // create temp dir } string fullPath = Path.GetFullPath(input.OutputDirectory); if (!Directory.Exists(fullPath)) { Directory.CreateDirectory(fullPath); } // set up anonymization data StudyData studyData = new StudyData(); studyData.PatientId = input.PatientId; studyData.PatientsNameRaw = input.PatientsName; studyData.PatientsBirthDate = input.PatientsBirthDate; studyData.PatientsSex = input.PatientsSex; studyData.AccessionNumber = input.AccessionNumber; studyData.StudyDescription = input.StudyDescription; studyData.StudyDate = input.StudyDate; DicomAnonymizer anonymizer = new DicomAnonymizer(); anonymizer.StudyDataPrototype = studyData; //The default anonymizer removes the series data, so we just clone the original. anonymizer.AnonymizeSeriesDataDelegate = delegate(SeriesData original) { return(original.Clone()); }; // anonymize each image in the study for (int i = 0; i < sops.Count; ++i) { ISopInstance sop = sops[i]; DicomFile file = new DicomFile(sop.GetLocationUri().LocalDiskPath); anonymizer.Anonymize(file); file.Save(string.Format("{0}\\{1}.dcm", fullPath, i)); } return(new AnonymizeStudyOutput(sops.Count)); }
public bool FillOut(List<Context> contextList, IStudy study) { Context context = contextList[0]; ValueMatrixShort bestServerCellID = context[ContextKeys.TDBestServerCellID] as ValueMatrixShort; if (bestServerCellID == null) { return false; } List<IACell> m_CellList = (List<IACell>)context[ContextKeys.CellList]; GetColorForDiscreteStudy getColorCalc = new GetColorForDiscreteStudy(); getColorCalc.GetColorForCell(study, bestServerCellID,m_CellList); return study.SaveResult(bestServerCellID); }
public StudyPropertiesForm(StudyPropertyFormMgr studyFormMgr, IPredictionGroup group, IStudy study, IApplicationContext appContext) { this.InitializeComponent(); this.m_StudyPropertyMgr = studyFormMgr; this.m_StudyPropertyMgr.DataGridView = this.dgvLegend; this.m_Study = study; this.m_Group = group; this.m_AppContext = appContext; this.m_Saved = false; this.m_IsIntervalStudy = study is IIntervalStudy; this.m_ShadingConfig = new ShadingConfig(); this.CheckAll.CheckedChanged -= new EventHandler(this.CheckAll_CheckedChanged); this.Init(); this.CheckAll.CheckedChanged += new EventHandler(this.CheckAll_CheckedChanged); }
private string CreateExportLegendXml(IStudy study) { string str = string.Empty; string str2 = "<?xml version=\"1.0\" encoding=\"gb2312\"?>\r\n"; string str3 = string.Empty + "<STUDY>\r\n"; if (study is IIntervalStudy) { str3 = str3 + this.CreateExpLegendForStudyXml(study as IIntervalStudy); } else { str3 = str3 + this.CreateExpLegendForStudyXml(study as IDiscreteStudy); } str3 = str3 + "</STUDY>\r\n"; return (str + str2 + str3); }
private IStudy GetStudy(string studyInstanceUid) { if (String.IsNullOrEmpty(studyInstanceUid)) { throw new ArgumentException("The study uid must be specified for a series level query."); } IStudy study = GetStudies(new StudyRootStudyIdentifier { StudyInstanceUid = studyInstanceUid }).FirstOrDefault(); if (study == null) { Platform.Log(LogLevel.Debug, "No study exists with the given study uid ({0}).", studyInstanceUid); } return(study); }
private List <DicomAttributeCollection> ImageQuery(QueryCriteria queryCriteria) { string studyUid = queryCriteria[DicomTags.StudyInstanceUid]; string seriesUid = queryCriteria[DicomTags.SeriesInstanceUid]; if (String.IsNullOrEmpty(studyUid) || String.IsNullOrEmpty(seriesUid)) { throw new ArgumentException("The study and series uids must be specified for an image level query."); } IStudy study = GetStudy(studyUid); if (study == null) { throw new ArgumentException(String.Format("No study exists with the given study uid ({0}).", studyUid)); } ISeries series = CollectionUtils.SelectFirst(study.GetSeries(), delegate(ISeries test) { return(test.SeriesInstanceUid == seriesUid); }); if (series == null) { string message = String.Format("No series exists with the given study and series uids ({0}, {1})", studyUid, seriesUid); throw new ArgumentException(message); } try { QueryResultFilter <SopInstance> filter = new QueryResultFilter <SopInstance>(queryCriteria, Convert.Cast <SopInstance>(series.GetSopInstances()), GetSpecificCharacterSet); return(filter.GetResults()); } catch (DataStoreException) { throw; } catch (Exception e) { throw new DataStoreException("An error occurred while performing the image query.", e); } }
/// <summary> /// The to entity. /// </summary> /// <param name="study"> /// The study. /// </param> /// <returns> /// The <see cref="Study"/>. /// </returns> public static Study ToEntity(this IStudy study) { return(new Study { CreatedBy = study.CreatedBy, CreatedOn = study.CreatedOn, Description = study.Description, Id = study.Id, IsActive = study.IsActive, Name = study.Name, SortOrder = study.SortOrder, Status = study.Status, UpdatedBy = study.UpdatedBy, UpdatedOn = study.UpdatedOn, Budget = study.Budget, EndDate = study.EndDate, Goal = study.Goal, StartDate = study.StartDate, Target = study.Target }); }
public void MyTestInitialize() { m_index = 0; m_Name = "BestServer"; m_Context = new Context(); m_case = new BestServerCase(); m_study1 = new MockStudy(); m_study2 = new MockStudy(); m_study1.Name = "BestServer"; m_study2.Name = "Handover_Area"; TrueFalseMatrix tfMatrix = new TrueFalseMatrix(4, 4, 0.0, 200, 50, true); TDPredictionGroup group = MockGroupAndCell.MockTDPredicGroup(); IACell cell = MockGroupAndCell.CreateTDCell(); LinkLossAssist.Init(); group.StudyList.Add(m_study1); group.StudyList.Add(m_study2); m_Context.Add(ContextKeys.CurrentCalcCell, cell); m_Context.Add(ContextKeys.Group, group); m_Context.Add(ContextKeys.TFMatrix, tfMatrix); m_Context.Add(ContextKeys.ApplicationContext, ProjectSingleton.CurrentProject.AppContext); }
public StudyController(IStudy study, IStudy2 sutdy2) { this.study = study; this.sutdy2 = sutdy2; }
public void MyTestInitialize() { target = new DLDCHSINRStudyEditor(); study = new ShortIntervalStudy(); CreatContext(); }
public StudyProcess() { _study = new Study_TextFile(); }
public void MyTestInitialize() { target = new UpPCHRSCPStudyEditor(); study = new ShortDiscreteStudy(); CreatContext(); }
private void CreateLegendNodeOfOneStudy(IStudy study, IPredictionGroup group) { if (group.State == CalculateState.SuccessfulEnd) { TreeNode groupNode = this.FindGroupNode(group); TreeNode node2 = this.FindStudyNode(study, groupNode); MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new ClearTreeNode(this.ClearStudyLegendNodeArr), new object[] { node2 }); List<GeoRasterStyle> list = new List<GeoRasterStyle>(); if (study is IDiscreteStudy) { IDiscreteStudy study2 = study as IDiscreteStudy; list.AddRange(study2.StyleList.ConvertAll<GeoRasterStyle>(new Converter<GeoDiscreteSytle, GeoRasterStyle>(this.ConvertTo))); } else { IIntervalStudy study3 = study as IIntervalStudy; list.AddRange(study3.StyleList.ConvertAll<GeoRasterStyle>(new Converter<GeoIntervalSytle, GeoRasterStyle>(this.ConvertTo))); } TreeNode[] nodeArray = new TreeNode[list.Count]; int index = 0; foreach (GeoRasterStyle style in list) { TreeNode node = new TreeNode(); node.Name = style.FeatureName; node.Text = style.FeatureName; node.ImageKey = "Study"; node.SelectedImageKey = node.ImageKey; node.StateImageIndex = this.GetLegendNodeStateImageIndex(style); (this.m_RootNode.TreeView as ITriStateTreeViewContorller).SetTreeNodeDragdropable(node, false); nodeArray[index] = node; index++; } MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new AddRangeTreeNode(this.AddLegendNodeOfOneStudy), new object[] { node2, nodeArray }); MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new Huawei.UNet.Prediction.View.Controlls.RefreshNodeStateIndex(this.RefreshNodeStateIndex), new object[] { node2, study.CheckState }); MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new Huawei.UNet.Prediction.View.Controlls.RefreshNodeStateIndex(this.RefreshNodeStateIndex), new object[] { groupNode, group.GetCheckState() }); MainFormSingleton.CurrentMainForm.MainForm.BeginInvoke(new Huawei.UNet.Prediction.View.Controlls.RefreshNodeStateIndex(this.RefreshNodeStateIndex), new object[] { this.m_RootNode, this.m_ControllerMgr.IPredictionModel.GetCheckState() }); } }
private string GetSavePath(IPredictionGroup group, IStudy ps) { string currentProjectLossPath = this.m_IProjectManager.CurrentProjectLossPath; if (string.IsNullOrEmpty(currentProjectLossPath)) { currentProjectLossPath = this.m_IProjectManager.DefaultProjectLossPath; } string str3 = currentProjectLossPath; return (str3 + @"\" + group.Name + ps.Name + "_toGIS.tmp"); }
public void AddStudy(IStudy study) { StudyTreeItem item = new StudyTreeItem(study); _tree.Items.Add(item); }
private double Formula(IStudy _this) { IInstrument symbol = _this.BarsOfData(BasedOnData); return((symbol.CloseValue - symbol.Close[1]) / symbol.CloseValue); }
public void Open() { try { if (!Enabled) { return; } int numberOfSelectedStudies = Context.SelectedStudies.Count; if (Context.SelectedStudies.Count == 0) { return; } int numberOfLoadableStudies = GetNumberOfLoadableStudies(); if (numberOfLoadableStudies != numberOfSelectedStudies) { int numberOfNonLoadableStudies = numberOfSelectedStudies - numberOfLoadableStudies; string message; if (numberOfSelectedStudies == 1) { message = SR.MessageCannotOpenNonStreamingStudy; } else { if (numberOfNonLoadableStudies == 1) { message = SR.MessageOneNonStreamingStudyCannotBeOpened; } else { message = String.Format(SR.MessageFormatXNonStreamingStudiesCannotBeOpened, numberOfNonLoadableStudies); } } Context.DesktopWindow.ShowMessageBox(message, MessageBoxActions.Ok); return; } UIStudyTree tree = new UIStudyTree(); foreach (var item in Context.SelectedStudies) { if (item.Server.IsLocal) { using (var context = new DataAccessContext()) { IStudy study = context.GetStudyBroker().GetStudy(item.StudyInstanceUid); if (study != null) { tree.AddStudy(study); } } } } if (this.mediaIShelf != null) { this.mediaIShelf.Activate(); component.Tree = tree.Tree; } else { if (base.Context.DesktopWindow == null) { return; } component = new MediaWriterComponent(); this.mediaIShelf = ApplicationComponent.LaunchAsShelf(base.Context.DesktopWindow, component, "Media Writer", ShelfDisplayHint.DockAutoHide | ShelfDisplayHint.DockLeft); this.mediaIShelf.Closed += new EventHandler <ClosedEventArgs>(this.ShelfClose); this.mediaIShelf.Activate(); component.Tree = tree.Tree; } } catch (Exception exception) { ExceptionHandler.Report(exception, base.Context.DesktopWindow); } }
internal StudyTreeItem(IStudy study) { _study = study; _tree = new Tree <ISeriesTreeItem>(new SeriesTreeItemBinding()); Initialize(); }
public void Initial() { target = new HSDPAPeakThroughStudyEditor(); study = new IntIntervalStudy(); CreateContext(); }
public void Initial() { target = new DLDPCHSINRStudyEditor(); study = new ShortDiscreteStudy(); CreateContext(); }
[TestInitialize] //初始化测试用例 public void MyTestInitialize() { target = new DLPeakThroughPutStudyEditor(); study = new ShortDiscreteStudy(); CreatContext(); }
private void ExportStudyDataDisplay(IPredictionGroup group, IStudy study) { this.Text = this.m_TreeNode.Text; IDiscreteStudy study2 = study as IDiscreteStudy; IIntervalStudy study3 = study as IIntervalStudy; if (study2 != null) { this.GetDiscreteLegend(group, study2); } else { this.GetIntervalLegend(group, study3); } this.dgvExpoertData.ReadOnly = true; }
public Studentxxx(IStudy Learn) : base(Learn) { }
private string CreateFilePath(IPredictionGroup group, IStudy study) { string str = group.Name + "_" + study.Name + "_legend"; string str2 = "Legend file saving path"; string str3 = "(*.xml)|*.xml"; SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = str3; dialog.FileName = str; dialog.Title = str2; dialog.DefaultExt = ".xml"; if (DialogResult.Cancel == dialog.ShowDialog()) { return ""; } return dialog.FileName; }
public StudyProcess(IStudy study) { _study = study; }
private TreeNode CreatePredictionStudyNodeOnly(IStudy study) { TreeNode node = new TreeNode(); node.Text = study.Name; node.Name = study.Name; node.ImageKey = "Study"; node.SelectedImageKey = node.ImageKey; node.StateImageIndex = 2; node.ContextMenuStrip = this.m_PredictionContextMenuView.GetStudyCtxtMenuStrip(); return node; }
private TreeNode FindStudyNode(IStudy study, TreeNode groupNode) { foreach (TreeNode node2 in groupNode.Nodes) { if (node2.Name.Equals(study.Name)) { return node2; } } return null; }
public StudentPay(IStudy Learn) { this.Learn = Learn; }
private void ImportLegendXML(IStudy study, DataGridView dataGridView, XmlDocument doc) { try { if (study is IIntervalStudy) { this.ImportLegendXmlForStudy(study as IIntervalStudy, doc, dataGridView); } else { this.ImportLegendXmlForStudy(study as IDiscreteStudy, doc, dataGridView); } } catch (Exception exception) { doc = null; this.m_EventViewService.WriteLog(exception.Message + "\r\n", Huawei.UNet.Frame.Interface.LogLevel.Error); WriteLog.Logger.Error(exception.StackTrace + "\r\n"); } }
public void ImportLegendConfig(IStudy study, DataGridView dataGridView, string filepath) { if (!string.IsNullOrEmpty(filepath)) { XmlDocument doc = new XmlDocument(); try { doc.Load(filepath); } catch (Exception) { MessageBox.Show(LTEPredictionResource.PREDICTION_FILE_FAILED); WriteLog.Logger.Error(LTEPredictionResource.PREDICTION_FILE_FAILED + "\r\n"); return; } if (!this.IsXMLValidate(study, doc)) { MessageBox.Show(LTEPredictionResource.PREDICTION_FILE_FAILED); this.m_EventViewService.WriteLog(LTEPredictionResource.PREDICTION_FILE_FAILED + "\r\n", Huawei.UNet.Frame.Interface.LogLevel.Error); } else { this.ImportLegendXML(study, dataGridView, doc); } } }
public bool FillOut(List<Context> contextList, IStudy study) { Context context = contextList[0]; ValueMatrixShort CovByCirVM = (ValueMatrixShort)context["CovByCir"]; return study.SaveResult(CovByCirVM); }
private bool IsXMLValidate(IStudy study, XmlDocument doc) { bool flag = false; try { if (study is IIntervalStudy) { flag = this.IsXMLValidateForStudy(study as IIntervalStudy, doc); } else { flag = this.IsXMLValidateForStudy(study as IDiscreteStudy, doc); } } catch (Exception exception) { doc = null; WriteLog.Logger.Error(exception.StackTrace + "\r\n"); return false; } return flag; }
///////////////////////////////////////////////// /// public void Studying_at_the_university(IStudy study) { study.Study(); }
public void ExportLegendConfig(IStudy study, string filepath) { if (!string.IsNullOrEmpty(filepath)) { this.m_FileStream = new FileStream(filepath, FileMode.Create, FileAccess.Write); this.m_Writer = new StreamWriter(this.m_FileStream, Encoding.Default); try { string str = this.CreateExportLegendXml(study); this.m_Writer.Write(str); this.m_Writer.Close(); this.m_FileStream.Close(); this.m_Writer = null; this.m_FileStream = null; } catch (Exception exception) { this.ExportExceptionSolve(exception); } } }
static void Main(string[] args) { Console.WriteLine(double.MinValue); Console.WriteLine("Введите две строки"); string s1 = Console.ReadLine(); string s2 = Console.ReadLine(); string s = s1 + s2; Console.WriteLine("Объединение этих строк - " + s); int[][] arrSt = new int[2][]; arrSt[0] = new int[3]; arrSt[1] = new int[5]; Random rand = new Random(); for (int i = 0; i < 3; ++i) { arrSt[0][i] = rand.Next(1, 99); Console.Write(arrSt[0][i] + " "); } Console.WriteLine(); for (int i = 0; i < 5; ++i) { arrSt[1][i] = rand.Next(1, 99); Console.Write(arrSt[1][i] + " "); } Time t1 = new Time(); Time t2 = new Time(); t1.Minutes = 45; t2.Minutes = 23; t1.Seconds = 12; t2.Seconds = 2; if (t1 == t2) { Console.WriteLine("\nt1 равно t2"); } if (t1 > t2) { Console.WriteLine("\nt1 больше t2"); } Student st = new Student(); Prepod prep = new Prepod(); IStudy inter_prep = prep; st.study(); prep.study(); inter_prep.study(); Console.ReadLine(); }