public MenuControl(IContentPage mapControl, MenuBar menuBar) { InitializeComponent(); this.mapControl = mapControl; accessMenuBar = menuBar; accessIconImage = mapControl.accessImage; accessMenuName = mapControl.accessMenuName; this.TabStop = false; }
/// <summary> /// Generiše izveštaj o contentPage objektu - vraca String Builder objekat /// </summary> /// <param name="sb"></param> /// <returns></returns> public static ITextRender makeReport(this IContentElement element, ITextRender sb = null, bool autoSaveAndOpen = true) { //if (sb == null) //{ // var hsb = new reportHtmlDocument("Report on: " + element.getTypeSignature(), // reportOutputFormatName.htmlReport, // reportFlag.filenameSmallLetters, reportFlag.filenameInsertTimestamp, // reportFlag.headerInsertDescription, // reportFlag.footerInsertOutputPath, reportFlag.footerInsertDocumentation, // reportFlag.headerInsertTitle, reportFlag.footerInsertTimestamp, // reportFlag.openOutput); // hsb.description = "About content element: " + element.getTypology().displayDescription; // sb = hsb; // if (autoSaveAndOpen) // { // String path = hsb.saveOutput(); // run.startApplication(externalTool.firefox, path); // } //} if (element is IContentPage) { IContentPage _pageElement = element as IContentPage; // _pageElement.items.makeReport(sb, 20); //_pageElement.paragraphs.makeReport(sb, 20); //_pageElement.sentences.makeReport(sb, 20); //_pageElement.tokens.makeReport(sb, 20); //_pageElement.chunks.makeReport(sb, 20); } return(sb); }
public InvoiceEditorModel(IContentPage ui, InvoiceSummary invoice) : base(ui) { //if (player == null) this.Player = new PlayerSummary(); this.Invoice = invoice; }
public TermDetailModel(IContentPage ui, TermSummary term) : base(ui) { this.Term = term; this.LoadTermDetails(); }
public PlayerDetailModel(IContentPage ui) : base(ui) { }
/// <summary>Static getter for Headline</summary> public static string GetHeadline(IContentPage that) { return(that.GetPropertyValue <string>("headline")); }
public void changeCurrentContent(IContentPage content) { IContentPage lastContent = currentContent as IContentPage; if (lastContent != null) lastContent.finalizePage(); if (content is MyUserControl) { currentContent = content as MyUserControl; currentContent.appear(DockStyle.Fill, mainPanel); ContentArgs e = new ContentArgs(content); OnContentChange(e); } content.initializePage(); }
/// <summary> /// Vrsi analizu paragrafa - za svaki paragraf unfreeze kolekciju recenica, pokrenuti obavezno posle kategorizacije recenica /// </summary> /// <param name="content"></param> /// <param name="settings"></param> /// <param name="language"></param> internal static void paragraphAnalysis(IContentPage content, nlpTokenizatorSettings settings, basicLanguage language) { if (content.paragraphs == null) { return; } /* * foreach (IContentParagraph paragraph in content.paragraphs) * { * //paragraph.items.unfreeze(); * var firstSentence = paragraph.items.First(); * * if (paragraph.items.Count == 1) * { * switch (firstSentence.genericType) * { * case nlpSentenceGenericType.normal: * case nlpSentenceGenericType.normal_exclamation: * case nlpSentenceGenericType.normal_question: * case nlpSentenceGenericType.normal_unfinished: * case nlpSentenceGenericType.normal_unknown: * paragraph.genericType = nlpParagraphGenericType.textual_single; * break; * case nlpSentenceGenericType.role_title: * paragraph.genericType = nlpParagraphGenericType.textual_title; * break; * case nlpSentenceGenericType.role_simpleText: * paragraph.genericType = nlpParagraphGenericType.data_single; * break; * default: * paragraph.genericType = nlpParagraphGenericType.data_single; * break; * * } * } else * { * //var stats = paragraph.items.getRankedStats(false); * * //nlpSentenceBasicType first = stats.First().Key.convertToBasicEnum<nlpSentenceBasicType>(); * * nlpSentenceBasicType first = firstSentence.basicType; * * switch (first) * { * case nlpSentenceBasicType.normal: * switch (firstSentence.genericType) * { * case nlpSentenceGenericType.role_simpleText: * case nlpSentenceGenericType.normal_unknown: * case nlpSentenceGenericType.role_title: * paragraph.genericType = nlpParagraphGenericType.textual_article; * break; * default: * paragraph.genericType = nlpParagraphGenericType.textual; * break; * } * break; * case nlpSentenceBasicType.role: * paragraph.genericType = nlpParagraphGenericType.data_simple; * break; * default: * case nlpSentenceBasicType.unknown: * paragraph.genericType = nlpParagraphGenericType.unknown; * break; * case nlpSentenceBasicType.list: * paragraph.genericType = nlpParagraphGenericType.data_listed; * break; * } * * * } * }*/ }
public PlayerEditorModel(IContentPage ui, PlayerSummary player) : base(ui) { //if (player == null) this.Player = new PlayerSummary(); this.Player = player; }
public ContentArgs(IContentPage content) { this.currentContent = content; }
public AttendanceDetailModel(IContentPage ui) : base(ui) { this.GetAttendances(); }
public TermListModel(IContentPage ui) : base(ui) { this.GetTerms(); }
public PlayerListModel(IContentPage ui) : base(ui) { this.GetPlayers(); }
public SignInModel(IContentPage ui) : base(ui) { }
/// <summary> /// 加载几个页面,sender的不同,操作页面不同 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Page_Click(object sender, RoutedEventArgs e) { this.activePage = null; btnTPNOrders.Background = this.Background; btnCheckRecord.Background = this.Background; btnNote.Background = this.Background; btnAnalysis.Background = this.Background; btnExport.Background = this.Background; if (btnTPNOrders == sender)//Tpn医嘱 { if (null == this.pageOrders) { this.pageOrders = new PageOrders(); this.pageOrders.init(this.refPatient); } this.activePage = this.pageOrders; btnTPNOrders.Background = new SolidColorBrush(Colors.SkyBlue); } else if (btnCheckRecord == sender)//检查记录 { if (null == this.pageCheck) { this.pageCheck = new PageCheckRecord(); this.pageCheck.init(this.refPatient); } this.activePage = this.pageCheck; btnCheckRecord.Background = new SolidColorBrush(Colors.SkyBlue); } else if (btnNote == sender) { if (null == this.pageNote) { this.pageNote = new PagePharmacistNote(); this.pageNote.init(this.refPatient); } this.activePage = this.pageNote; btnNote.Background = new SolidColorBrush(Colors.SkyBlue); } else if (btnAnalysis == sender) { if (null == this.pageAnalysis) { this.pageAnalysis = new PageAnalysis(); this.pageAnalysis.init(this.refPatient); } this.activePage = this.pageAnalysis; btnAnalysis.Background = new SolidColorBrush(Colors.SkyBlue); } else if (btnExport == sender) { if (null == this.pageExport) { this.pageExport = new PageExport(); this.pageExport.init(this.refPatient); } ((PageExport)this.pageExport).setGetPatientList(getPatientLst); this.activePage = this.pageExport; btnExport.Background = new SolidColorBrush(Colors.SkyBlue); } else { BLPublic.Dialogs.Alert("未实现"); } if (null != this.activePage) { frmBody.Content = this.activePage; } showPatient(); }
public RegistrationModel(IContentPage ui) : base(ui) { }
//public static nlpSentenceBasicType getBasicType(nlpSentenceGenericType input) //{ // String name = input.ToString(); // if (name.StartsWith("normal")) return nlpSentenceBasicType.normal; // if (name.StartsWith("open")) return nlpSentenceBasicType.open; // if (name.StartsWith("role")) return nlpSentenceBasicType.role; // return nlpSentenceBasicType.unknown; //} internal static void sentenceAnalysis(IContentPage content, nlpTokenizatorSettings settings, basicLanguage language) { return; /* * foreach (IContentSentence sentence in content.sentences) * { * if (sentence.genericType == nlpSentenceGenericType.unknown) * { * String spliter = sentence.spliter.Trim(); * * Boolean firstCaseOk = (sentence.items.First().letterCase == nlpTextCase.firstUpperRestLower); * * var prevSentence = sentence.prev as IContentSentence; * if (prevSentence == null) prevSentence = sentence; * * if (prevSentence.genericType == nlpSentenceGenericType.list_startSentence) * { * sentence.genericType = nlpSentenceGenericType.list_item; * } else * { * switch (spliter) * { * case tokenization.sentenceEnd_arrowRight: * case tokenization.sentenceEnd_arrowLeft: * sentence.genericType = nlpSentenceGenericType.role_title; * break; * case tokenization.sentenceEnd_notFinished2: * case tokenization.sentenceEnd_notFinished: * if (firstCaseOk) * { * sentence.genericType = nlpSentenceGenericType.normal_unfinished; * } * break; * case tokenization.sentenceEnd_question: * if (firstCaseOk) * { * sentence.genericType = nlpSentenceGenericType.normal_question; * } * * break; * case tokenization.sentenceEnd_normal: * if (firstCaseOk) * { * sentence.genericType = nlpSentenceGenericType.normal; * } * break; * case tokenization.sentenceEnd_listStart2: * case tokenization.sentenceEnd_listStart: * sentence.genericType = nlpSentenceGenericType.list_startSentence; * break; * case tokenization.sentenceEnd_listItemEnd_listEnd: * case tokenization.sentenceEnd_listItemEnd: * sentence.genericType = nlpSentenceGenericType.list_item; * break; * case tokenization.sentenceEnd_exclamation: * if (firstCaseOk) * { * sentence.genericType = nlpSentenceGenericType.normal_exclamation; * } * break; * default: * if (prevSentence.genericType == nlpSentenceGenericType.list_item) * { * sentence.genericType = nlpSentenceGenericType.list_item; * } * else * { * if (!String.IsNullOrEmpty(spliter)) * { * content.note(devNoteType.nlp, * "Unknown spliter for sentence: [" + spliter + * "] - add support for it in> tokenization.cs constants and sentenceAnalysis()", * "blokCategorization"); * } * } * break; * * } * } * * /* * if (sentence.genericType==nlpSentenceGenericType.unknown) * { * if (firstCaseOk) * { * sentence.genericType = nlpSentenceGenericType.normal_unknown; * } else * { * if (sentence.items.All(x => x.letterCase == nlpTextCase.upperCase)) * { * sentence.genericType = nlpSentenceGenericType.role_title; * } else * { * sentence.genericType = nlpSentenceGenericType.role_simpleText; * } * } * } * } * * } * * }*/ }
/// <summary>Static getter for Body text</summary> public static IHtmlString GetBodyText(IContentPage that) { return(that.GetPropertyValue <IHtmlString>("bodyText")); }
/// <summary> /// Activate page /// </summary> /// <param name="page">Page</param> private void ActivatePage(IContentPage page) { var control = page as Control; control.Dock = DockStyle.Fill; if (screenViewMP.Controls.Contains(control)) { screenViewMP.Controls.Remove(control); //this.Opacity = .9D; TransparencyKey = Color.Black; } else { screenViewMP.Controls.Clear(); screenViewMP.Controls.Add(control); //this.Opacity = 1; TransparencyKey = Color.Red; } Invalidate(); }
public static T Model <T>(this IContentPage <T> page) where T : BaseModel { return(page.BindingContext as T); }