This form is intent to fetch edges for hosted sweep creation or modification. It contains a picture box for geometry preview and a tree view to list all the edges which hosted sweep can be created on. If the user mouse-over an edge where a hosted sweep can be created, the edge will be highlighted in yellow. If user clicks on the highlighted edge, the edge will be marked as selected in red color. Click it again to un-select, the color will turn back. Edge selection from preview box will be reflected in edge list and vice versa. The geometry displayed in the picture box can be rotated with left mouse or arrow keys (up, down, left and right) and zoomed with right mouse.
Inheritance: System.Windows.Forms.Form
Example #1
0
        /// <summary>
        /// Show a form to fetch edges for hosted-sweep creation, and then create
        /// the hosted-sweep.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonCreate_Click(object sender, EventArgs e)
        {
            HostedSweepCreator creator =
                comboBoxHostedSweepType.SelectedItem as HostedSweepCreator;

            CreationData creationData = new CreationData(creator);

            using (EdgeFetchForm createForm = new EdgeFetchForm(creationData))
            {
                if (createForm.ShowDialog() == DialogResult.OK)
                {
                    creator.Create(creationData);
                    RefreshListBox();
                }
            }
        }
Example #2
0
        /// <summary>
        /// Show a form to add or remove edges from hosted sweep, and also can change the 
        /// type of hosted sweep.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="provider"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context,
            IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService winSrv = (IWindowsFormsEditorService)provider.
                GetService(typeof(IWindowsFormsEditorService));

            CreationData creationData = value as CreationData;
            creationData.BackUp();
            using (EdgeFetchForm form = new EdgeFetchForm(creationData))
            {
                if (winSrv.ShowDialog(form) == System.Windows.Forms.DialogResult.OK)
                    creationData.Update();
                else
                    creationData.Restore();
            }
            return creationData;
        }
        /// <summary>
        /// Show a form to add or remove edges from hosted sweep, and also can change the
        /// type of hosted sweep.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="provider"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public override object EditValue(System.ComponentModel.ITypeDescriptorContext context,
                                         IServiceProvider provider, object value)
        {
            IWindowsFormsEditorService winSrv = (IWindowsFormsEditorService)provider.
                                                GetService(typeof(IWindowsFormsEditorService));

            CreationData creationData = value as CreationData;

            creationData.BackUp();
            using (EdgeFetchForm form = new EdgeFetchForm(creationData))
            {
                if (winSrv.ShowDialog(form) == System.Windows.Forms.DialogResult.OK)
                {
                    creationData.Update();
                }
                else
                {
                    creationData.Restore();
                }
            }
            return(creationData);
        }
Example #4
0
        /// <summary>
        /// Show a form to fetch edges for hosted-sweep creation, and then create 
        /// the hosted-sweep.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonCreate_Click(object sender, EventArgs e)
        {
            HostedSweepCreator creator =
                comboBoxHostedSweepType.SelectedItem as HostedSweepCreator;

            CreationData creationData = new CreationData(creator);

            using (EdgeFetchForm createForm = new EdgeFetchForm(creationData))
            {
                if (createForm.ShowDialog() == DialogResult.OK)
                {
                    creator.Create(creationData);
                    RefreshListBox();
                }
            }
        }