/// <summary> /// used for preparing the scenegraph /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLoadScene_Click_1(object sender, EventArgs e) { string sXml = string.Empty; string sShotBoxID = null; bool isTicker; try { #region sceneone if (m_objShotBox == null) { sXml = Util.getSGFromWSL(fileDialog.FileName); if (!string.IsNullOrEmpty(sXml)) { m_objShotBox = m_objLink.GetShotBox(sXml, out sShotBoxID, out isTicker) as ShotBox; if (!Equals(m_objShotBox, null)) { m_objShotBox.SetEngineUrl(m_sServerIp); if (m_objShotBox is IAddinInfo) { // S.No. : - 1 //(m_objShotBox as IAddinInfo).Init(new InstanceInfo() { Type = "wsl", InstanceId = string.Empty, TemplateId = fileDialog.FileName, ThemeId = "default" }); (m_objShotBox as IAddinInfo).Init(new InstanceInfo() { Type = "wsl", InstanceId = fileDialog.FileName, TemplateId = fileDialog.FileName, ThemeId = "default" }); } m_objShotBox.OnShotBoxStatus += new EventHandler <SHOTBOXARGS>(m_objShotBox_OnShotBoxStatus); m_objShotBox.Prepare(m_sServerIp, 0, RENDERMODE.PROGRAM); } m_objUserTag = m_objShotBox.UserTags; // if (cmbUserTag.SelectedIndex==-1) // { for (int i = 0; i < m_objUserTag.Count; i++) { if (!cmbUserTag.Items.Contains(m_objUserTag[i].Name)) { cmbUserTag.Items.Add(m_objUserTag[i].Name); } } // } } } #endregion } catch (Exception ex) { LogWriter.WriteLog("error in preparing the scenegraph", ex.Message); } }
} //end (btnConnect_Click_1) /// <summary> /// used for preparing the scenegraph /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLoadScene_Click_1(object sender, EventArgs e) { string sXml = string.Empty; string sShotBoxID = null; bool isTicker; string filetype = string.Empty; try { #region sceneone if (m_objShotBox == null) { sXml = Util.getSGFromWSL(fileDialog.FileName); filetype = Path.GetExtension(fileDialog.FileName).Split(new string[] { "." }, StringSplitOptions.None)[1]; if (!string.IsNullOrEmpty(sXml)) { m_objShotBox = m_objLink.GetShotBox(sXml, out sShotBoxID, out isTicker) as ShotBox; if (!Equals(m_objShotBox, null)) { m_objShotBox.SetEngineUrl(m_sServerIp); if (m_objShotBox is IAddinInfo) { (m_objShotBox as IAddinInfo).Init(new InstanceInfo() { Type = filetype, InstanceId = string.Empty, TemplateId = fileDialog.FileName, ThemeId = "default" }); } m_objShotBox.OnShotBoxStatus += new EventHandler <SHOTBOXARGS>(m_objShotBox_OnShotBoxStatus); m_objShotBox.Prepare(m_sServerIp, 0, RENDERMODE.PROGRAM); }//end (if) m_objUserTag = m_objShotBox.UserTags; for (int i = 0; i < m_objUserTag.Count; i++) { if (!cmbUserTag.Items.Contains(m_objUserTag[i].Name)) { cmbUserTag.Items.Add(m_objUserTag[i].Name); } } //end (for) } //end (if) } //end (if) #endregion } //end (try) catch (Exception ex) { LogWriter.WriteLog(MODULENAME, ex); } //end (catch) } //end (btnLoadScene_Click_1)
public void WriteTags(UserTagCollection tags) { XmlElement node = _root.EnsureChildElement("Tags"); node.RemoveAll(); bool isExists = tags != null && tags.Count > 0; node.SetBoolean("IsExists", isExists); if (!isExists) { return; } node.SetString("Value", String.Join(";", tags.Select(tag => tag.Name))); }
/// <summary> /// used for preparing the scenegraph /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnLoadScene_Click_1(object sender, EventArgs e) { string sXml = string.Empty; string sShotBoxID = null; bool isTicker; string filetype = string.Empty; try { #region sceneone if (m_objShotBox == null) { sXml = Util.getSGFromWSL(fileDialog.FileName); filetype = Path.GetExtension(fileDialog.FileName).Split(new string[] {"." }, StringSplitOptions.None)[1]; if (!string.IsNullOrEmpty(sXml)) { m_objShotBox = m_objLink.GetShotBox(sXml, out sShotBoxID, out isTicker) as ShotBox; if (!Equals(m_objShotBox, null)) { m_objShotBox.SetEngineUrl(m_sServerIp); if (m_objShotBox is IAddinInfo) (m_objShotBox as IAddinInfo).Init(new InstanceInfo() { Type = filetype, InstanceId = string.Empty, TemplateId = fileDialog.FileName, ThemeId = "default" }); m_objShotBox.OnShotBoxStatus += new EventHandler<SHOTBOXARGS>(m_objShotBox_OnShotBoxStatus); m_objShotBox.Prepare(m_sServerIp, 0, RENDERMODE.PROGRAM); }//end (if) m_objUserTag = m_objShotBox.UserTags; for (int i = 0; i < m_objUserTag.Count; i++) { if (!cmbUserTag.Items.Contains(m_objUserTag[i].Name)) cmbUserTag.Items.Add(m_objUserTag[i].Name); }//end (for) }//end (if) }//end (if) #endregion }//end (try) catch (Exception ex) { LogWriter.WriteLog(MODULENAME, ex); }//end (catch) }
private void OnTagsChanged(UserTagCollection oldValue, UserTagCollection newValue) { Location.Tags = newValue; ConstructFontDescriptor(); }
private void OnLocationChanged(Location oldValue, Location newValue) { Tags = newValue.Tags; Tags.CollectionChanged += OnTagsCollectionChanged; }