Ejemplo n.º 1
0
        public void Editing(object sender, ContextMenuClickedEventArgs <CustomVectorField> e)
        {
            CustomVectorField vf = e.ContextObject as CustomVectorField;

            CreateVF.Arguments a = new CreateVF.Arguments();

            using (ITransaction txn = DataManager.NewTransaction())
            {
                txn.Lock(vf);
                a.AzField     = vf.Azimutfieldic;
                a.HeiField    = vf.Heigtfieldic;
                a.Step        = (int)vf.gridStep;
                a.VectorField = vf;
                CreateVFUI wnd = new CreateVFUI(wrapper.Workstep as CreateVF, a, null as WorkflowContext);
                Form       das = new Form();
                das.Icon   = Icon.FromHandle(PetrelImages.Modules.GetHicon());
                das.Text   = "CreateVF";
                das.Width  = 550;
                das.Height = 256;
                wnd.Parent = das;
                wnd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
                das.Show();
                txn.Commit();
            }
        }
Ejemplo n.º 2
0
        public void Editing(object sender, ContextMenuClickedEventArgs<CustomVectorField> e)
        {
            CustomVectorField vf = e.ContextObject as CustomVectorField;
            CreateVF.Arguments a = new CreateVF.Arguments();

            using (ITransaction txn = DataManager.NewTransaction())
            {
                txn.Lock(vf);
                a.AzField = vf.Azimutfieldic;
                a.HeiField = vf.Heigtfieldic;
                a.Step = (int)vf.gridStep;
                a.VectorField = vf;
                CreateVFUI wnd = new CreateVFUI(wrapper.Workstep as CreateVF, a, null as WorkflowContext);
                Form das = new Form();
                das.Icon = Icon.FromHandle(PetrelImages.Modules.GetHicon());
                das.Text = "CreateVF";
                das.Width = 550;
                das.Height = 256;
                wnd.Parent = das;
                wnd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                | System.Windows.Forms.AnchorStyles.Right)));
                das.Show();
                txn.Commit();
            }
        }