Beispiel #1
0
        public void LoadXml()
        {
            RealFixtureList.Clear();
            Fixtures = null;

            if (File.Exists(Constant.FrameworkName))
            {
                XmlDocument doc = new XmlDocument();
                doc.Load("Framework.xml");

                XmlNode WorkSpaceNode = (doc.GetElementsByTagName(Constant.WorkspaceXmlNodeName))[0];
                WorkspaceManager.SetCurrentWorkspace(WorkSpaceNode);

                XmlNode ParameterNode = (doc.GetElementsByTagName("Parameters"))[0];

                if (ParameterNode.Attributes["Device"] != null)
                {
                    this.mOutput.SetActiveDevice(ParameterNode.Attributes["Device"].InnerText);
                }
                this.mOutput.SetNbChannels(Convert.ToInt32(ParameterNode.Attributes["MaxRealCanal"].InnerText));


                XmlNode FixtureNode = (doc.GetElementsByTagName("Fixture"))[0];
                Fixtures = new DmxFramework.Fixtures.VirtualFixture(null, FixtureNode, mOutput, 0, "");
            }
            else
            {
                if (WorkspaceManager.CurrentWorkspace != null)
                {
                    Fixtures = new DmxFramework.Fixtures.VirtualFixture(WorkspaceManager.CurrentWorkspace.Name);
                }
            }
        }
Beispiel #2
0
 void workspaceTree1_OnVirtualFixtureSelected(DmxFramework.Fixtures.VirtualFixture pFixture)
 {
     try
     {
         HideAll();
         this.fixtureCtrl1.SetVirtualFixture(pFixture);
         this.fixtureCtrl1.Visible = true;
     }
     catch (Exception ex)
     {
         MessageBox.Show(this, "Please Retry", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         LogException(ex);
     }
 }