Example #1
0
        private void Open(string FileName)
        {
            IMapHandler mh;
            if (!GetFileHandler(FileName, out mh))
            {
                MessageBox.Show(string.Format("Unable to open file {0}: Unrecognised format", Path.GetFileName(FileName)), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            mh.CorruptChunk +=new CorruptChunkHandler(OnCorruptChunk);
            mh.Load(FileName);

            dlgLoading load = new dlgLoading(mh);
            load.ShowDialog();

            string mn = NewForm();
            frmMap map = GetMap(mn);
            map.Map = mh;

            map.Show();
            SetMap(mn, map);

            Settings.SetLUF(FileName);
        }
Example #2
0
        private void tsbDimension_SelectedIndexChanged(object sender, EventArgs e)
        {
            if(tsbDimension.SelectedItem==null) return;

            if (ActiveMdiChild != null)
            {
                if ((ActiveMdiChild as frmMap).Map != null)
                {
                    (ActiveMdiChild as frmMap).Map.SetDimension((tsbDimension.SelectedItem as Dimension).ID);

                    ClearReport();

                    dlgLoading load = new dlgLoading((ActiveMdiChild as frmMap).Map);
                    load.ShowDialog();

                    ShowReport();

                    ResetStatus();
                    (ActiveMdiChild as frmMap).ReloadAll();
                }
            }
        }