当前位置: 首页>>代码示例>>C#>>正文


C# IController.DownloadConfigData方法代码示例

本文整理汇总了C#中IController.DownloadConfigData方法的典型用法代码示例。如果您正苦于以下问题:C# IController.DownloadConfigData方法的具体用法?C# IController.DownloadConfigData怎么用?C# IController.DownloadConfigData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IController的用法示例。


在下文中一共展示了IController.DownloadConfigData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: btnDownload_Click

        protected void btnDownload_Click(object sender, System.EventArgs e)
        {
            Timer1.Enabled = true;

            //Label1.Text = "Refreshed at " +
            //DateTime.Now.ToString();
            bool blnServiceStarted;
            bool blnNoError;
            try
            {
                objCommonMethods = new CommonMethods();
                objCController = new CController();
                objIController = (CController)objCController;

                objCMWException = new CMWException();
                objCommonMethods = new CommonMethods();

                objIController.SetFilePath(strProjectDBPath);
                Shared.udtNetworkType = objIController.GetNetworkType(strProjectDBPath);
                ResgistrySettings RegSettings;
                RegSettings = objIController.GetRegistrySettings();

                Shared.ProjectDBPath = strProjectDBPath;
                Shared.ApplicationPath = RegSettings.InstallationPath;
                objDownloadSettings = new DownloadSettings();

                //start downloader Service
                blnServiceStarted = objCommonMethods.StartDownloaderService();
                //Communication Type
                objDownloadSettings.TCP = true;
                objDownloadSettings.ipAddress = "159.99.185.100";
                //Port number
                objDownloadSettings.portNumber = Constants.portNumber;
                //Gateway type
                objDownloadSettings.enumDownloadGateway = GateWay.E3NGA;
                //NetworkType
                objDownloadSettings.enumNetworkType = Shared.udtNetworkType;
                //Node type
                objDownloadSettings.enumBoardTypeID = BoardTypeID.ILI_S_E3;
                //Node Number
                objDownloadSettings.NodeNumber = 2;
                //Firmware path
                objDownloadSettings.FirmwarePath = "";
                //7100 network card
                objDownloadSettings.Do7100CardDownload = false;
                //RPT card
                objDownloadSettings.DoRPTDownload = false;
                //LCD-SLP load
                objDownloadSettings.DoLCDSLPDownload = false;
                //LCD-SLP Graphics
                objDownloadSettings.DoLCDSLPGraphicsDownload = false;
                //Project Path
                objDownloadSettings.ProjectPath = Shared.ProjectDBPath;
                //Level 4 Password
                objDownloadSettings.L4Password = "555555";
                //Download Type
                objDownloadSettings.DownloadTypes = (int)DownloadTypes.CAMOnly | (int)DownloadTypes.ConfigOnly | (int)DownloadTypes.LabelsOnly;
                //Installer ID
                objDownloadSettings.InstallerID = "1234";
                //Virtual Switch
                objDownloadSettings.LoadVirtualSwitch = false;
                //Site Specific key
                objDownloadSettings.SiteSpecificKey = 1234;
                //Application path
                objDownloadSettings.ApplicationPath = Shared.ApplicationPath;
                OnCommandCompleted = new DelegateCommandCompleted(Query_OnCommandCompleted);
                objCallback = new CallbackClass();
                objCallback.OnHostToClient += new RemoteCallback(Status_Changed);
                //call back delegate
                RemoteCallback wire = new RemoteCallback(objCallback.HandleToClient);
                //Parameters to be passed between the client and CAMWorksDownloader service.
                CallbackEventArgs objCallBckArgs = new CallbackEventArgs();
                objCallBckArgs.CallBack = wire;
                objCallBckArgs.IsError = false;

                objCallBckArgs.Finished = false;

                objCallBckArgs.CommandId = CommandName.ConfigDownload;

                objCallBckArgs.State = 0;

                objCallBckArgs.Sender = GetType().ToString();

                objCallBckArgs.Parameters = objDownloadSettings;

                blnNoError = objIController.DownloadConfigData(objCallBckArgs);

                if (!blnNoError)
                {

                    arListStatus.Add(objCMWException.GetExceptions(objCMWException.LastException, ""));

                    // IsDownloadSuucessful = false;

                    OnCommandCompleted();

                }

                //objCMWException = null;

//.........这里部分代码省略.........
开发者ID:jayeshagwan1,项目名称:MyTestApp,代码行数:101,代码来源:Default.aspx.cs


注:本文中的IController.DownloadConfigData方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。