Ejemplo n.º 1
0
        private void tabPage2_Enter(object sender, EventArgs e)
        {
            if (this.MvProject.IsShip)
            {
                if (tabPage2.Controls.Count == 0)
                {
                    Ship.Spec spec = new Ship.Spec();
                    spec.Dock = DockStyle.Fill;
                    this.tabPage2.Controls.Add(spec);
                }

                this.Size = new Size(911, 706);
            }
            else
            {
                if (tabPage2.Controls.Count == 0)
                {
                    Land.Spec spec = new Land.Spec();
                    spec.Dock = DockStyle.Fill;
                    this.tabPage2.Controls.Add(spec);
                }

                this.Size = new Size(675, 669);
            }

            if (this.tabPage2.Controls.Count > 0)
            {
                Util.FormSerializer.Deserialise(tabPage2.Controls[0], this.MvProject.FormXmlFile);
            }
        }
Ejemplo n.º 2
0
        void _backgroudWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                this.label1.Text = "Project 생성 중: " + this.MvProject.FileName;
                if (!MvProject.CreateProject())
                {
                    return;
                }

                this.label1.Text = "Cover Sheet 생성 중: " + this.MvProject.FileName;
                Drawings.Cover cover = new Drawings.Cover(this.MvProject);

                this.label1.Text = "Spec Sheet 생성 중: " + this.MvProject.FileName;
                if (this.MvProject.IsShip)
                {
                    this.SetShipProperties(this.MvProject.Project);
                    Ship.Spec spec = new Ship.Spec();
                    Util.FormSerializer.Deserialise(spec, this.MvProject.FormXmlFile);
                    new Drawings.Spec(this.MvProject, spec);
                }
                else
                {
                    this.SetLandProperties(this.MvProject.Project);
                    Land.Spec spec = new Land.Spec();
                    Util.FormSerializer.Deserialise(spec, this.MvProject.FormXmlFile);
                    new Drawings.Spec(this.MvProject, spec);
                }


                this.label1.Text = "Layout Drawing 생성 중: " + this.MvProject.FileName;
                if (this.MvProject.IsShip)
                {
                    Drawings.Layout.Ship layout = new Drawings.Layout.Ship(this.MvProject);
                    Drawings.Layout.Door door   = new Drawings.Layout.Door(this.MvProject);
                }
                else
                {
                    Drawings.Layout.Land layout = new Drawings.Layout.Land(this.MvProject);
                }

                this.label1.Text = "회로 도면 생성 중: " + this.MvProject.FileName;
                new Drawings.DrawingFactory(this.MvProject);

                foreach (Page p in this.MvProject.Project.Pages)
                {
                    if (p.Name.StartsWith("==GROUP"))
                    {
                        p.Remove();
                    }
                }

                this.DialogResult = DialogResult.OK;
            }
            catch (Exception ex)
            {
                MessageBox.Show("ERROR: " + ex.Message + "\n" + ex.StackTrace);
                this.DialogResult = DialogResult.No;
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }