예제 #1
0
 void LoadDataForm_onGetFileListFailed(HTTPAgent.FileType type, System.Net.HttpStatusCode statusCode)
 {
     MessageBox.Show("Can't download " + type.ToString() + " file list !");
     ExecuteTask();
 }
예제 #2
0
 void ChannelSettingManagementForm_onRemoveFileFailed(HTTPAgent.FileType type, long fid, string title, System.Net.HttpStatusCode statusCode)
 {
     MessageBox.Show("Remove " + type.ToString() + " file '" + title + "' failed, status code = " + statusCode.ToString());
 }
예제 #3
0
        void LoadDataForm_onDownloadFileFailed(HTTPAgent.FileType type, long fid, string title, HTTPAgent.DownloadType downloadType, System.Net.HttpStatusCode statusCode)
        {
            switch (type)
            {
                case HTTPAgent.FileType.channelSetting:
                    if (DataCenter.Instance().ChannelSettingDescriptions.ContainsKey(fid))
                        DataCenter.Instance().ChannelSettingDescriptions.Remove(fid);
                    break;

                case HTTPAgent.FileType.colorSetting:
                    break;

                case HTTPAgent.FileType.equipmentParameter:
                    if (DataCenter.Instance().EquipmentParameterDescriptions.ContainsKey(fid))
                        DataCenter.Instance().EquipmentParameterDescriptions.Remove(fid);
                    break;

                case HTTPAgent.FileType.linkconfiguration:
                    if (DataCenter.Instance().LinkConfigurationDescriptions.ContainsKey(fid))
                        DataCenter.Instance().LinkConfigurationDescriptions.Remove(fid);
                    break;
            }

            MessageBox.Show("Can't download " + type.ToString() + " file '" + title + "', status code = " + statusCode.ToString());
            ExecuteTask();
        }