Example #1
0
        public Frm_CANConfiguration_SpecialPaste(SpecialPasteObjectType PastObjectType, Frm_CANConfiguration Caller)
        {
            InitializeComponent();

            ePastObjType = PastObjectType;
            CallerForm   = Caller;
        }
        public Frm_CANConfiguration_VirtualChannelReference(Frm_CANConfiguration Caller)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            FrmCaller = Caller;

            if (File.Exists(CANStreamTools.CsDataPath + "\\Libraries.xml"))
            {
                oVCLibCollection = new CS_VCLibrariesCollection();
                TV_VirtualChannels.Nodes.Clear();

                if (oVCLibCollection.LoadLibrariesList(CANStreamTools.CsDataPath + "\\Libraries.xml"))
                {
                    foreach (CS_VirtualChannelsLibrary oLib in oVCLibCollection.Libraries)
                    {
                        TreeNode nLib = TV_VirtualChannels.Nodes.Add(oLib.Name, oLib.Name, 0, 0);
                        nLib.Tag = "Library";

                        foreach (CS_VirtualChannel oChan in oLib.Channels)
                        {
                            TreeNode nChan = nLib.Nodes.Add(oChan.Name, oChan.Name, 1, 1);
                            nChan.Tag         = "Channel";
                            nChan.ToolTipText = oChan.Expression;
                        }
                    }

                    TV_VirtualChannels.ExpandAll();
                }
            }
        }