Exemplo n.º 1
0
        //批量导入(新)
        private void barBtnImportNew_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.folderBrowserDialog.Description = "批量导入新能源填报数据";
            string msg = string.Empty;

            if (folderBrowserDialog.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            try
            {
                LoadingHandler.Show(this, args =>
                {
                    var utils = new ImportNewInfoUtils();
                    msg       = utils.ImportNewTemplate(folderBrowserDialog.SelectedPath);
                });
            }
            catch (System.Exception ex)
            {
                msg += String.Format("异常,操作出现错误:{0}", ex.Message);
            }
            using (var mf = new MessageForm(msg)
            {
                Text = "导入操作结果"
            })
            {
                mf.ShowDialog();
                if (mf.DialogResult == DialogResult.Cancel)
                {
                    this.SearchLocal(1);
                }
            }
        }
Exemplo n.º 2
0
 private void Start()
 {
     spinner = FindObjectOfType <LoadingHandler>(true);
     if (spinner == null)
     {
         Debug.LogError("No loading spinner found in scene");
     }
 }
Exemplo n.º 3
0
        //导出模板
        private void barBtnExportFloder_ItemClick(object sender, ItemClickEventArgs e)
        {
            try
            {
                var    dtExport = (DataTable)this.gcDataInfo.DataSource;
                string msg      = string.Empty;
                if (dtExport == null || dtExport.Rows.Count < 1)
                {
                    MessageBox.Show("当前没有数据可以操作!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                FolderDialog openFolder = new FolderDialog();
                if (openFolder.DisplayDialog() == DialogResult.OK)
                {
                    if (string.IsNullOrEmpty(Settings.Default.ClearYear) || string.IsNullOrEmpty(Settings.Default.Vehicle_MFCS))
                    {
                        MessageBox.Show("请先设置车辆生存企业名称和清算年份!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        return;
                    }

                    DialogResult dr = MessageBox.Show(String.Format("确定要导出【{0}】,清算年份为【{1}】的数据吗?", Settings.Default.Vehicle_MFCS, Settings.Default.ClearYear), "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                    if (dr == DialogResult.OK)
                    {
                        try
                        {
                            LoadingHandler.Show(this, args =>
                            {
                                var exutils = new ExportNewInfoUtils();
                                msg         = exutils.ExportNewTemplate(openFolder.Path, "");
                            });
                            if (String.IsNullOrEmpty(msg))
                            {
                                MessageBox.Show("导出完成!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                            }
                            else
                            {
                                using (var mf = new MessageForm(msg)
                                {
                                    Text = "校验结果"
                                })
                                {
                                    mf.ShowDialog();
                                }
                            }
                        }
                        catch (System.Exception ex)
                        {
                            MessageBox.Show("操作出现错误:" + ex.Message, "异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        }
                    }
                }
            }
            catch (System.Exception ex)
            {
            }
        }
        public LoadingHandler LoadChunk(int2 position, int targetMipLevel)
        {
            LoadingHandler lh = new LoadingHandler(position, targetMipLevel);

            lock (lockerObj)
            {
                handlerQueue.Add(lh);
            }
            return(lh);
        }
 //event ProgressUpdate ProgressUpdateEvent;
 public LoadingForm()
 {
     InitializeComponent();
     loadingHandler = new LoadingHandler( );
     loadingHandler.LoadingForm = this;
     //AppClient.RegisterHandler(Protocol.C0001_3, loadingHandler);
     //AppClient.RegisterHandler(Protocol.C0002_1, loadingHandler);
     //AppClient.RegisterHandler(Protocol.M0003_1, loadingHandler);
     //AppClient.RegisterHandler(Protocol.C0003_2, loadingHandler);
     //AppClient.RegisterHandler(Protocol.C0004_1, loadingHandler);
     //AppClient.RegisterHandler(Protocol.C0004_2, loadingHandler);
     //AppClient.RegisterHandler(Protocol.C0003_3, loadingHandler);
     //loadingProgressBar.Maximum = 100;
     //loadingProgressBar.Invalidated += new InvalidateEventHandler(loadingProgressBar_StatusChanged);
 }
 public FrmSplash(LoadingHandler handler)
 {
     InitializeComponent();
     _handler = handler;
 }
Exemplo n.º 7
0
        public static void Init(GraphicsDeviceManager gdm, ContentManager cm)
		{
			_graphicsManager = gdm;
			_contentManager = cm;
			_currentScreen = new Stack<Screen>();

            //Set Events
            Drawing += new DrawingHandler(Draw);
            Exiting += new EventHandler(Exit);
            Loading += new LoadingHandler(Load);
            PoppingScreen += new PoppingScreenHandler(PopScreen);
            PushingScreen += new PushingScreenHandler(PushScreen);
            ReloadingScreen += new ReloadingScreenHandler(ReloadScreen);
            Unloading += new EventHandler(Unload);
            Updating += new UpdatingHandler(Update);
		}