Exemple #1
0
        public MainForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            Icon = ClientUtils.GetAppIcon();

            //OpcClientSdk.Utilities.Interop.PreserveUTC = true;

#if (DEBUG)
            // initialize the set of known servers.
            OpcUrl[] knownURLs = new OpcUrl[]
            {
                new OpcUrl("opchda://localhost/OPCSample.OpcHdaServer")
            };
#else
            // initialize the set of known servers.
            OpcUrl[] knownURLs = new OpcUrl[]
            {
                new OpcUrl("opchda://localhost/OPCSample.OpcHdaServer")
            };
#endif
            // set the UTC flag.
            // OpcCom.Interop.PreserveUTC = true;

            SelectServerCTRL.Initialize(knownURLs, 0, OpcSpecification.OPC_HDA_10);
            LoadSettings();

            // register for server connected callbacks.
            SelectServerCTRL.ConnectServer += new ConnectServer_EventHandler(OnConnect);
            UpdateTitle();
            updateTimerControl_.Enabled = true;
        }
        public MainForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();
            Icon = ClientUtils.GetAppIcon();

            ////Icon = ClientUtils.GetAppIcon();

#if (DEBUG)
            // initialize the set of known servers.
            OpcUrl[] knownURLs = new OpcUrl[]
            {
                new OpcUrl("opcae://localhost/Technosoftware.AeSample")
            };
#else
            // initialize the set of known servers.
            OpcUrl[] knownURLs = new OpcUrl[]
            {
                new OpcUrl("opcae://localhost/Technosoftware.AeSample")
            };
#endif

            SelectServerCTRL.Initialize(knownURLs, 0, OpcSpecification.OPC_AE_10);
            LoadSettings();

            // register for server connected callbacks.
            SelectServerCTRL.ConnectServer += new ConnectServer_EventHandler(OnConnect);
            UpdateTitle();
            updateTimerControl_.Enabled = true;
        }
Exemple #3
0
        public MainForm()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            Icon = ClientUtils.GetAppIcon();

            // connect the updates control to the subscriptions control.
            SubscriptionCTRL.SubscriptionModified += new SubscriptionModifiedCallback(UpdatesCTRL.OnSubscriptionModified);

            // register for trace/debug output from the updates control.
            UpdatesCTRL.UpdateEvent += new UpdateEvent_EventHandler(OnUpdateEvent);

#if (DEBUG)
            // initialize the set of known servers.
            OpcUrl[] knownURLs = new OpcUrl[]
            {
                new OpcUrl("opcda://localhost/Technosoftware.DaSample"),
            };
#else
            // initialize the set of known servers.
            OpcUrl[] knownURLs = new OpcUrl[]
            {
                new OpcUrl("opcda://localhost/Technosoftware.DaSample"),
            };
#endif

            SelectServerCTRL.Initialize(knownURLs, 0, OpcSpecification.OPC_DA_20);
            SelectTargetCTRL.Initialize(knownURLs, 0, OpcSpecification.OPC_DA_20);

            LoadSettings();

            // register for server connected callbacks.
            SelectServerCTRL.ConnectServer += new ConnectServer_EventHandler(OnConnect);
            SelectTargetCTRL.ConnectServer += new ConnectServer_EventHandler(OnConnectTarget);
            UpdateTitle();
            updateTimerControl_.Enabled = true;
        }