private void LatticeLineList_SelectionChanged(object sender, SelectionChangedEventArgs e) { // here we want to hilight the selected line Line2D l = (Line2D)LatticeLineList.SelectedItem; string name = (l == null) ? string.Empty : l.Name; if (Bigdisplay.IsOpen) { PopupDisplay.Hilight(name, true); } else { LatticeDisplay.Hilight(name, true); } }
public PopupForm(RssItem item, config.config config, PopupDisplay pd, int showIndex, AlartInfo ai, bool isTest = false, string poploc = null, int poptime = 0, bool isClickClose = true, bool isTopMost = true, bool isColor = true, double opacity = 0.9) { this.config = config; this.ri = item; this.pd = pd; this.showIndex = showIndex; // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); //var dt = DateTime.Now; var dtStr = ""; if (item.pubDate != null && item.pubDate != "") { var dt = DateTime.Parse(item.pubDate); dtStr = dt.ToString("yyyy/MM/dd(ddd) HH:mm") + "開始"; } util.debugWriteLine(dtStr); //var t = "【弾幕歓迎】BOOWY関係リク枠!放送のしかた覚えてるかな?覚えてなかったらごめんlt;(_ _)gt;"; var t = item.title; if (isOkStrWidth(t + " - ")) { t += " - "; } if (isOkStrWidth(t + dtStr)) { t += dtStr; } titleLabel.Text = util.removeTag(t); //titleLabel.Text = (item.isMemberOnly ? "(限定)" : "") + titleLabel.Text; hostNameLabel.Text = util.removeTag(item.hostName); communityNameLabel.Text = util.removeTag(item.comName); descryptionLabel.Text = util.removeTag(item.description); //var _Text = item.hostName + "/" + item.comName; if (ai != null && ai.keyword != null && ai.keyword != "") { Text = ai.keyword + "-" + Text; } if (ai != null && bool.Parse(config.get("IsColorPopup"))) { BackColor = ai.backColor; ForeColor = ai.textColor; } //Text = Text; if (isTest && isColor) { BackColor = Color.FromArgb(255, 224, 255); ForeColor = Color.Black; } else if (ai != null && bool.Parse(config.get("IsColorPopup"))) { BackColor = ai.backColor; ForeColor = ai.textColor; } var url = "https://live2.nicovideo.jp/watch/" + item.lvId; titleLabel.Links.Add(0, titleLabel.Text.Length, url); if (isTest) { this.isTopMostPara = isTopMost; } else { this.isTopMostPara = bool.Parse(config.get("IsTopMostPopup")); } Opacity = isTest ? (opacity / 100) : double.Parse(config.get("popupOpacity")) / 100; // // TODO: Add constructor code after the InitializeComponent() call. // this.isTestClosePopup = isClickClose; this.testPopTime = poptime; this.isTest = isTest; ContextMenuStrip = contextMenuStrip1; setAppliMenuVisible(); if (item.isMemberOnly) { ShowIcon = true; var icon = new Icon(util.getJarPath()[0] + "/Icon/lock.ico"); Icon = icon; } }
public SmallPopupForm(RssItem item, config.config config, PopupDisplay pd, int showIndex, AlartInfo ai, bool isTest = false, string poploc = null, int poptime = 0, bool isClickClose = true, bool isTopMost = true, Color[] isColor = null, double opacity = 0.9) { this.config = config; this.ri = item; this.pd = pd; this.showIndex = showIndex; // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); //var dt = DateTime.Now; var dtStr = ""; if (item.pubDate != null && item.pubDate != "") { var dt = DateTime.Parse(item.pubDate); dtStr = dt.ToString("yyyy/MM/dd(ddd) HH:mm") + "開始"; } // util.debugWriteLine(dtStr); //var t = "haimasa_qm(歌ってみた)fw"; var t = item.title; if (isOkStrWidth(t + " - ")) { t += " - "; } if (isOkStrWidth(t + dtStr)) { t += dtStr; } titleLabel.Text = util.removeTag(t); //titleLabel.Text = (item.isMemberOnly ? "(限定)" : "") + titleLabel.Text; hostNameLabel.Text = util.removeTag(item.hostName); communityNameLabel.Text = util.removeTag(item.comName); descryptionLabel.Text = util.removeTag(item.description); var _Text = util.removeTag(item.hostName + "/" + item.comName); if (ai != null && ai.keyword != null && ai.keyword != "") { _Text = ai.keyword + "-" + _Text; } Text = _Text; if (isTest && isColor != null) { BackColor = isColor[0]; //Color.FromArgb(255,224,255); ForeColor = isColor[1]; //Color.Black; titleLabel.LinkColor = ForeColor; } else if (ai != null && bool.Parse(config.get("IsColorPopup"))) { BackColor = ai.backColor; ForeColor = ai.textColor; titleLabel.LinkColor = ForeColor; } var url = "https://live2.nicovideo.jp/watch/" + item.lvId; titleLabel.Links.Add(0, titleLabel.Text.Length, url); if (isTest) { this.isTopMostPara = isTopMost; } else { this.isTopMostPara = bool.Parse(config.get("IsTopMostPopup")); } Opacity = isTest ? (opacity / 100) : double.Parse(config.get("popupOpacity")) / 100; this.isTestClosePopup = isClickClose; this.testPopTime = poptime; this.isTest = isTest; // // TODO: Add constructor code after the InitializeComponent() call. // ContextMenuStrip = contextMenuStrip1; setAppliMenuVisible(); if (item.isMemberOnly) { try { ShowIcon = true; var icon = new Icon(util.getJarPath()[0] + "/Icon/lock.ico"); Icon = util.changeIconColor(icon, ColorTranslator.FromHtml(config.get("onlyIconColor"))); } catch (Exception e) { util.debugWriteLine(e.Message + e.Source + e.StackTrace + e.TargetSite); } } }