Пример #1
0
        /// <summary>
        /// 构造函数
        /// </summary>
        public VersionUpdateWindow()
        {
            //日志加载初始化
            LogManage.LogInit();
            try
            {
                //UI加载
                InitializeComponent();
                //绑定当前上下文
                this.DataContext = this;

                //创建版本更新客户端对象模型
                ConferenceVersionWebservice.ConferenceVersionWebserviceSoapClient client = new ConferenceVersionWebservice.ConferenceVersionWebserviceSoapClient();

                //注册版本更新完成事件
                client.GetUpDateFileCompleted += client_GetUpDateFileCompleted;

                //获取需要更新的版本文件
                client.GetUpDateFileAsync();
            }
            catch (Exception ex)
            {
                LogManage.WriteLog(this.GetType(), ex);
            }
        }
        void VersionUpdateWindow_Loaded(object sender, RoutedEventArgs e)
        {
            try
            {
                ConferenceVersionWebservice.ConferenceVersionWebserviceSoapClient client = new ConferenceVersionWebservice.ConferenceVersionWebserviceSoapClient();
                client.GetUpDateFileCompleted += client_GetUpDateFileCompleted;

                client.GetUpDateFileAsync();
            }
            catch (Exception ex)
            {
            }
        }