Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShaleWorkstepUI"/> class.
        /// </summary>
        /// <param name="workstep">the workstep instance</param>
        /// <param name="args">the arguments</param>
        /// <param name="context">the underlying context in which this UI is being used</param>
        public ShaleWorkstepUI(ShaleWorkstep workstep, ShaleWorkstep.Arguments args, WorkflowContext context)
        {
            InitializeComponent();
            btn_Apply.Image = Shale.Properties.Resources.IDB_BUTTON_APPLY;
            btn_DelBoreHole.Image = PetrelImages.RowDelete;

            this.workstep = workstep;
            this.args = args;
            this.context = context;

            workstep.CopyArgumentPackage(args, tmpargs);
        }
        public override void Execute(Slb.Ocean.Petrel.Contexts.Context context)
        {
            PetrelLogger.InfoOutputWindow(string.Format("{0} clicked", @"ShaleCommand" ));

            //Create workstep
            ShaleWorkstep tmp_wstep = new ShaleWorkstep();
            ShaleWorkstep.Arguments tmp_warg = new ShaleWorkstep.Arguments();
            ShaleWorkstepUI tmp_wstepui = new ShaleWorkstepUI(tmp_wstep, tmp_warg, ctnxt);

            //Create form and add workstep to form

            Form form_cont = new Form();
            form_cont.Icon = Icon.FromHandle(PetrelImages.Modules.GetHicon());
            form_cont.Text = "ShaleWorkstep";
            tmp_wstepui.Parent = form_cont;

            form_cont.Width = tmp_wstepui.Width;
            form_cont.Height = tmp_wstepui.Height;
            //form_cont.TopMost = true;
            //form_cont.Show();
        }