コード例 #1
0
ファイル: FormMain.cs プロジェクト: radtek/POSDeviceManager
        private void BuildACMSFromLogicSettings(TreeNode root, AMCSLogicSettings logicSettings)
        {
            TreeNode node = new TreeNode(logicSettings.Name, 1, 1);

            node.Tag = logicSettings;
            foreach (TsUnitSettings unitSettings in logicSettings.Units)
            {
                BuildUnitFromUnitSettings(node, unitSettings);
            }
            root.Nodes.Add(node);
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: radtek/POSDeviceManager
        private void NewTurnstile()
        {
            TsUnitSettings unitSettings = new TsUnitSettings();

            unitSettings.Name = string.Format("Турникет{0}", tvSettings.SelectedNode.Nodes.Count + 1);

            AMCSLogicSettings logicSettings = (AMCSLogicSettings)tvSettings.SelectedNode.Tag;

            logicSettings.Units.Add(unitSettings);

            TreeNode node = new TreeNode(unitSettings.Name, 2, 2);

            node.Tag = unitSettings;
            tvSettings.SelectedNode.Nodes.Add(node);
            tvSettings.SelectedNode.Expand();

            _modified = true;
            SettingsControlsEnabled();
        }
コード例 #3
0
ファイル: FormMain.cs プロジェクト: radtek/POSDeviceManager
        private void NewAMCS()
        {
            FormSelectAMСSLogic formSelectAMСSLogic = new FormSelectAMСSLogic();

            if (formSelectAMСSLogic.Execute(_logicLoader.GetLogicNames()))
            {
                AMCSLogicSettings logicSettings = new AMCSLogicSettings();
                logicSettings.LogicSettings = _logicLoader.CreateLogicSettings(formSelectAMСSLogic.ACMSName);
                logicSettings.AcmsName      = formSelectAMСSLogic.ACMSName;
                logicSettings.Name          = string.Format("СКУД{0}", tvSettings.Nodes[0].Nodes.Count + 1);

                _settings.LogicSettings.Add(logicSettings);

                TreeNode node = new TreeNode(logicSettings.Name, 1, 1);
                node.Tag = logicSettings;
                tvSettings.Nodes[0].Nodes.Add(node);
                tvSettings.SelectedNode = node;

                _modified = true;
                SettingsControlsEnabled();
            }
        }