added Revit 2022 SDK minus except *rvt and *rfa

This commit is contained in:
Jeremy Tammik
2021-04-20 11:36:21 +02:00
parent 1133a82dc5
commit 7e327986e8
3034 changed files with 1245318 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

@@ -0,0 +1,270 @@
namespace Revit.SDK.Samples.WinderStairs.CS
{
partial class LWinderOptions
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.okButton = new System.Windows.Forms.Button();
this.numAtStartTextBox = new System.Windows.Forms.TextBox();
this.numInCornerTextBox = new System.Windows.Forms.TextBox();
this.numAtEndTextBox = new System.Windows.Forms.TextBox();
this.runWidthTextBox = new System.Windows.Forms.TextBox();
this.startStepLabel = new System.Windows.Forms.Label();
this.cornerStepsNLabel = new System.Windows.Forms.Label();
this.endStepsLabel = new System.Windows.Forms.Label();
this.runWidthLabel = new System.Windows.Forms.Label();
this.cancelButton = new System.Windows.Forms.Button();
this.previewPictureBox = new System.Windows.Forms.PictureBox();
this.inputParamGroupBox = new System.Windows.Forms.GroupBox();
this.centerOffsetFLabel = new System.Windows.Forms.Label();
this.centerOffsetELabel = new System.Windows.Forms.Label();
this.centerOffsetFTextBox = new System.Windows.Forms.TextBox();
this.centerOffsetETextBox = new System.Windows.Forms.TextBox();
this.dmuCheckBox = new System.Windows.Forms.CheckBox();
this.sketchCheckBox = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.previewPictureBox)).BeginInit();
this.inputParamGroupBox.SuspendLayout();
this.SuspendLayout();
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(190, 279);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 26);
this.okButton.TabIndex = 0;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// numAtStartTextBox
//
this.numAtStartTextBox.Location = new System.Drawing.Point(113, 64);
this.numAtStartTextBox.Name = "numAtStartTextBox";
this.numAtStartTextBox.Size = new System.Drawing.Size(100, 20);
this.numAtStartTextBox.TabIndex = 1;
//
// numInCornerTextBox
//
this.numInCornerTextBox.Location = new System.Drawing.Point(113, 124);
this.numInCornerTextBox.Name = "numInCornerTextBox";
this.numInCornerTextBox.Size = new System.Drawing.Size(100, 20);
this.numInCornerTextBox.TabIndex = 2;
//
// numAtEndTextBox
//
this.numAtEndTextBox.Location = new System.Drawing.Point(113, 94);
this.numAtEndTextBox.Name = "numAtEndTextBox";
this.numAtEndTextBox.Size = new System.Drawing.Size(100, 20);
this.numAtEndTextBox.TabIndex = 3;
//
// runWidthTextBox
//
this.runWidthTextBox.Location = new System.Drawing.Point(113, 34);
this.runWidthTextBox.Name = "runWidthTextBox";
this.runWidthTextBox.Size = new System.Drawing.Size(100, 20);
this.runWidthTextBox.TabIndex = 4;
//
// startStepLabel
//
this.startStepLabel.AutoSize = true;
this.startStepLabel.Location = new System.Drawing.Point(24, 64);
this.startStepLabel.Name = "startStepLabel";
this.startStepLabel.Size = new System.Drawing.Size(78, 13);
this.startStepLabel.TabIndex = 6;
this.startStepLabel.Text = "Start Steps (A):";
//
// cornerStepsNLabel
//
this.cornerStepsNLabel.AutoSize = true;
this.cornerStepsNLabel.Location = new System.Drawing.Point(14, 124);
this.cornerStepsNLabel.Name = "cornerStepsNLabel";
this.cornerStepsNLabel.Size = new System.Drawing.Size(88, 13);
this.cornerStepsNLabel.TabIndex = 7;
this.cornerStepsNLabel.Text = "Corner Steps (N):";
//
// endStepsLabel
//
this.endStepsLabel.AutoSize = true;
this.endStepsLabel.Location = new System.Drawing.Point(27, 94);
this.endStepsLabel.Name = "endStepsLabel";
this.endStepsLabel.Size = new System.Drawing.Size(75, 13);
this.endStepsLabel.TabIndex = 8;
this.endStepsLabel.Text = "End Steps (B):";
//
// runWidthLabel
//
this.runWidthLabel.AutoSize = true;
this.runWidthLabel.Location = new System.Drawing.Point(25, 34);
this.runWidthLabel.Name = "runWidthLabel";
this.runWidthLabel.Size = new System.Drawing.Size(77, 13);
this.runWidthLabel.TabIndex = 9;
this.runWidthLabel.Text = "Run Width (C):";
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(282, 279);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 26);
this.cancelButton.TabIndex = 0;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// previewPictureBox
//
this.previewPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.previewPictureBox.Image = global::Revit.SDK.Samples.WinderStairs.CS.Properties.Resources.LWinder;
this.previewPictureBox.Location = new System.Drawing.Point(258, 12);
this.previewPictureBox.Name = "previewPictureBox";
this.previewPictureBox.Size = new System.Drawing.Size(269, 234);
this.previewPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.previewPictureBox.TabIndex = 5;
this.previewPictureBox.TabStop = false;
//
// inputParamGroupBox
//
this.inputParamGroupBox.Controls.Add(this.startStepLabel);
this.inputParamGroupBox.Controls.Add(this.runWidthLabel);
this.inputParamGroupBox.Controls.Add(this.numAtStartTextBox);
this.inputParamGroupBox.Controls.Add(this.centerOffsetFLabel);
this.inputParamGroupBox.Controls.Add(this.centerOffsetELabel);
this.inputParamGroupBox.Controls.Add(this.endStepsLabel);
this.inputParamGroupBox.Controls.Add(this.numInCornerTextBox);
this.inputParamGroupBox.Controls.Add(this.cornerStepsNLabel);
this.inputParamGroupBox.Controls.Add(this.centerOffsetFTextBox);
this.inputParamGroupBox.Controls.Add(this.centerOffsetETextBox);
this.inputParamGroupBox.Controls.Add(this.numAtEndTextBox);
this.inputParamGroupBox.Controls.Add(this.runWidthTextBox);
this.inputParamGroupBox.Location = new System.Drawing.Point(12, 12);
this.inputParamGroupBox.Name = "inputParamGroupBox";
this.inputParamGroupBox.Size = new System.Drawing.Size(229, 234);
this.inputParamGroupBox.TabIndex = 10;
this.inputParamGroupBox.TabStop = false;
this.inputParamGroupBox.Text = "Input Parameters";
//
// centerOffsetFLabel
//
this.centerOffsetFLabel.AutoSize = true;
this.centerOffsetFLabel.Location = new System.Drawing.Point(15, 184);
this.centerOffsetFLabel.Name = "centerOffsetFLabel";
this.centerOffsetFLabel.Size = new System.Drawing.Size(87, 13);
this.centerOffsetFLabel.TabIndex = 8;
this.centerOffsetFLabel.Text = "Center Offset (F):";
//
// centerOffsetELabel
//
this.centerOffsetELabel.AutoSize = true;
this.centerOffsetELabel.Location = new System.Drawing.Point(14, 154);
this.centerOffsetELabel.Name = "centerOffsetELabel";
this.centerOffsetELabel.Size = new System.Drawing.Size(88, 13);
this.centerOffsetELabel.TabIndex = 8;
this.centerOffsetELabel.Text = "Center Offset (E):";
//
// centerOffsetFTextBox
//
this.centerOffsetFTextBox.Location = new System.Drawing.Point(113, 184);
this.centerOffsetFTextBox.Name = "centerOffsetFTextBox";
this.centerOffsetFTextBox.Size = new System.Drawing.Size(100, 20);
this.centerOffsetFTextBox.TabIndex = 3;
//
// centerOffsetETextBox
//
this.centerOffsetETextBox.Location = new System.Drawing.Point(113, 154);
this.centerOffsetETextBox.Name = "centerOffsetETextBox";
this.centerOffsetETextBox.Size = new System.Drawing.Size(100, 20);
this.centerOffsetETextBox.TabIndex = 3;
//
// dmuCheckBox
//
this.dmuCheckBox.AutoSize = true;
this.dmuCheckBox.Location = new System.Drawing.Point(378, 285);
this.dmuCheckBox.Name = "dmuCheckBox";
this.dmuCheckBox.Size = new System.Drawing.Size(51, 17);
this.dmuCheckBox.TabIndex = 11;
this.dmuCheckBox.Text = "DMU";
this.dmuCheckBox.UseVisualStyleBackColor = true;
//
// sketchCheckBox
//
this.sketchCheckBox.AutoSize = true;
this.sketchCheckBox.Location = new System.Drawing.Point(440, 285);
this.sketchCheckBox.Name = "sketchCheckBox";
this.sketchCheckBox.Size = new System.Drawing.Size(60, 17);
this.sketchCheckBox.TabIndex = 24;
this.sketchCheckBox.Text = "Sketch";
this.sketchCheckBox.UseVisualStyleBackColor = true;
//
// LWinderOptions
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(546, 324);
this.ControlBox = false;
this.Controls.Add(this.sketchCheckBox);
this.Controls.Add(this.dmuCheckBox);
this.Controls.Add(this.inputParamGroupBox);
this.Controls.Add(this.previewPictureBox);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "LWinderOptions";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "L-Winder Options";
((System.ComponentModel.ISupportInitialize)(this.previewPictureBox)).EndInit();
this.inputParamGroupBox.ResumeLayout(false);
this.inputParamGroupBox.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.TextBox numAtStartTextBox;
private System.Windows.Forms.TextBox numInCornerTextBox;
private System.Windows.Forms.TextBox numAtEndTextBox;
private System.Windows.Forms.TextBox runWidthTextBox;
private System.Windows.Forms.PictureBox previewPictureBox;
private System.Windows.Forms.Label startStepLabel;
private System.Windows.Forms.Label cornerStepsNLabel;
private System.Windows.Forms.Label endStepsLabel;
private System.Windows.Forms.Label runWidthLabel;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.GroupBox inputParamGroupBox;
private System.Windows.Forms.Label centerOffsetFLabel;
private System.Windows.Forms.Label centerOffsetELabel;
private System.Windows.Forms.TextBox centerOffsetFTextBox;
private System.Windows.Forms.TextBox centerOffsetETextBox;
private System.Windows.Forms.CheckBox dmuCheckBox;
private System.Windows.Forms.CheckBox sketchCheckBox;
}
}
@@ -0,0 +1,240 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
using System;
using System.Windows.Forms;
using Autodesk.Revit.UI;
namespace Revit.SDK.Samples.WinderStairs.CS
{
/// <summary>
/// This form is used to collect parameters for LWinder creation. It also validates the input
/// parameters and will warn if there is any invalid parameters when trying to submit the form.
/// </summary>
partial class LWinderOptions : Form
{
/// <summary>
/// Default constructor.
/// </summary>
public LWinderOptions()
{
InitializeComponent();
}
/// <summary>
/// Number of straight steps at start.
/// </summary>
public uint NumStepsAtStart
{
get
{
return uint.Parse(numAtStartTextBox.Text);
}
set
{
numAtStartTextBox.Text = value.ToString();
}
}
/// <summary>
/// Number of straight steps in winder corner.
/// </summary>
public uint NumStepsInCorner
{
get
{
return uint.Parse(numInCornerTextBox.Text);
}
set
{
numInCornerTextBox.Text = value.ToString();
}
}
/// <summary>
/// Number of straight steps at end.
/// </summary>
public uint NumStepsAtEnd
{
get
{
return uint.Parse(numAtEndTextBox.Text);
}
set
{
numAtEndTextBox.Text = value.ToString();
}
}
/// <summary>
/// Winder stairs run width.
/// </summary>
public double RunWidth
{
get
{
return double.Parse(runWidthTextBox.Text);
}
set
{
runWidthTextBox.Text = value.ToString();
}
}
/// <summary>
/// Center point offset distance from internal boundary.
/// </summary>
public double CenterOffsetE
{
get
{
return double.Parse(centerOffsetETextBox.Text);
}
set
{
centerOffsetETextBox.Text = value.ToString();
}
}
/// <summary>
/// Center point offset distance from internal boundary.
/// </summary>
public double CenterOffsetF
{
get
{
return double.Parse(centerOffsetFTextBox.Text);
}
set
{
centerOffsetFTextBox.Text = value.ToString();
}
}
/// <summary>
/// A switch indicates whether to support DMU(dynamic model update).
/// </summary>
public bool DMU
{
get
{
return dmuCheckBox.Checked;
}
}
/// <summary>
/// A switch to control the sketch drawing of winder stairs.
/// </summary>
public bool Sketch
{
get
{
return sketchCheckBox.Checked;
}
}
/// <summary>
/// Validate the UI input and it will warn if there are invalid user inputs.
/// </summary>
/// <returns>true if all input is fine.</returns>
private bool ValidateInput()
{
double runWidth;
if (!double.TryParse(runWidthTextBox.Text, out runWidth) || runWidth < 1.0e-6)
{
TaskDialog.Show("L-Winder Warning", "Run Width should be positive double", TaskDialogCommonButtons.Ok);
runWidthTextBox.Focus();
runWidthTextBox.SelectAll();
return false;
}
uint numAtStart;
if (!uint.TryParse(numAtStartTextBox.Text, out numAtStart))
{
TaskDialog.Show("L-Winder Warning", "Start steps should be unsigned integer", TaskDialogCommonButtons.Ok);
numAtStartTextBox.Focus();
numAtStartTextBox.SelectAll();
return false;
}
uint numAtEnd;
if (!uint.TryParse(numAtEndTextBox.Text, out numAtEnd))
{
TaskDialog.Show("L-Winder Warning", "End steps should be unsigned integer", TaskDialogCommonButtons.Ok);
numAtEndTextBox.Focus();
numAtEndTextBox.SelectAll();
return false;
}
uint numInCorner;
if (!uint.TryParse(numInCornerTextBox.Text, out numInCorner) || numInCorner < 1)
{
TaskDialog.Show("L-Winder Warning", "Corner steps should be unsigned integer and >= 1", TaskDialogCommonButtons.Ok);
numInCornerTextBox.Focus();
numInCornerTextBox.SelectAll();
return false;
}
double offsetE;
if (!double.TryParse(centerOffsetETextBox.Text, out offsetE) || offsetE < 0.0)
{
TaskDialog.Show("L-Winder Warning", "Center offset (E) should be non-negative double", TaskDialogCommonButtons.Ok);
centerOffsetETextBox.Focus();
centerOffsetETextBox.SelectAll();
return false;
}
double offsetF;
if (!double.TryParse(centerOffsetFTextBox.Text, out offsetF) || offsetF < 0.0)
{
TaskDialog.Show("L-Winder Warning", "Center offset (F) should be non-negative double", TaskDialogCommonButtons.Ok);
centerOffsetFTextBox.Focus();
centerOffsetFTextBox.SelectAll();
return false;
}
return true;
}
/// <summary>
/// Submit the UI input.
/// </summary>
private void okButton_Click(object sender, EventArgs e)
{
if (ValidateInput())
{
this.Close();
this.DialogResult = DialogResult.OK;
}
}
/// <summary>
/// Cancel the UI input.
/// </summary>
private void cancelButton_Click(object sender, EventArgs e)
{
this.Close();
this.DialogResult = DialogResult.Cancel;
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

@@ -0,0 +1,358 @@
namespace Revit.SDK.Samples.WinderStairs.CS
{
partial class UWinderOptions
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.runWidthLabel = new System.Windows.Forms.Label();
this.endStepsLabel = new System.Windows.Forms.Label();
this.cornerStepsN1Label = new System.Windows.Forms.Label();
this.startStepsLabel = new System.Windows.Forms.Label();
this.runWidthTextBox = new System.Windows.Forms.TextBox();
this.numAtEndTextBox = new System.Windows.Forms.TextBox();
this.numInCorner1TextBox = new System.Windows.Forms.TextBox();
this.numAtStartTextBox = new System.Windows.Forms.TextBox();
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.previewPictureBox = new System.Windows.Forms.PictureBox();
this.numInMiddleTextBox = new System.Windows.Forms.TextBox();
this.numInCorner2TextBox = new System.Windows.Forms.TextBox();
this.middleStepsLabel = new System.Windows.Forms.Label();
this.cornerStepsN2Label = new System.Windows.Forms.Label();
this.inputParamGroupBox = new System.Windows.Forms.GroupBox();
this.centerOffsetF2Label = new System.Windows.Forms.Label();
this.centerOffsetE2Label = new System.Windows.Forms.Label();
this.centerOffsetF1Label = new System.Windows.Forms.Label();
this.centerOffsetF2TextBox = new System.Windows.Forms.TextBox();
this.centerOffsetE2TextBox = new System.Windows.Forms.TextBox();
this.centerOffsetF1TextBox = new System.Windows.Forms.TextBox();
this.centerOffsetE1TextBox = new System.Windows.Forms.TextBox();
this.centerOffsetE1Label = new System.Windows.Forms.Label();
this.dmuCheckBox = new System.Windows.Forms.CheckBox();
this.sketchCheckBox = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.previewPictureBox)).BeginInit();
this.inputParamGroupBox.SuspendLayout();
this.SuspendLayout();
//
// runWidthLabel
//
this.runWidthLabel.AutoSize = true;
this.runWidthLabel.Location = new System.Drawing.Point(33, 32);
this.runWidthLabel.Name = "runWidthLabel";
this.runWidthLabel.Size = new System.Drawing.Size(77, 13);
this.runWidthLabel.TabIndex = 20;
this.runWidthLabel.Text = "Run Width (C):";
//
// endStepsLabel
//
this.endStepsLabel.AutoSize = true;
this.endStepsLabel.Location = new System.Drawing.Point(29, 116);
this.endStepsLabel.Name = "endStepsLabel";
this.endStepsLabel.Size = new System.Drawing.Size(81, 13);
this.endStepsLabel.TabIndex = 19;
this.endStepsLabel.Text = "End Steps (A2):";
//
// cornerStepsN1Label
//
this.cornerStepsN1Label.AutoSize = true;
this.cornerStepsN1Label.Location = new System.Drawing.Point(16, 144);
this.cornerStepsN1Label.Name = "cornerStepsN1Label";
this.cornerStepsN1Label.Size = new System.Drawing.Size(94, 13);
this.cornerStepsN1Label.TabIndex = 18;
this.cornerStepsN1Label.Text = "Corner Steps (N1):";
//
// startStepsLabel
//
this.startStepsLabel.AutoSize = true;
this.startStepsLabel.Location = new System.Drawing.Point(26, 60);
this.startStepsLabel.Name = "startStepsLabel";
this.startStepsLabel.Size = new System.Drawing.Size(84, 13);
this.startStepsLabel.TabIndex = 17;
this.startStepsLabel.Text = "Start Steps (A1):";
//
// runWidthTextBox
//
this.runWidthTextBox.Location = new System.Drawing.Point(118, 32);
this.runWidthTextBox.Name = "runWidthTextBox";
this.runWidthTextBox.Size = new System.Drawing.Size(100, 20);
this.runWidthTextBox.TabIndex = 15;
//
// numAtEndTextBox
//
this.numAtEndTextBox.Location = new System.Drawing.Point(118, 116);
this.numAtEndTextBox.Name = "numAtEndTextBox";
this.numAtEndTextBox.Size = new System.Drawing.Size(100, 20);
this.numAtEndTextBox.TabIndex = 14;
//
// numInCorner1TextBox
//
this.numInCorner1TextBox.Location = new System.Drawing.Point(118, 144);
this.numInCorner1TextBox.Name = "numInCorner1TextBox";
this.numInCorner1TextBox.Size = new System.Drawing.Size(100, 20);
this.numInCorner1TextBox.TabIndex = 13;
//
// numAtStartTextBox
//
this.numAtStartTextBox.Location = new System.Drawing.Point(118, 60);
this.numAtStartTextBox.Name = "numAtStartTextBox";
this.numAtStartTextBox.Size = new System.Drawing.Size(100, 20);
this.numAtStartTextBox.TabIndex = 12;
//
// cancelButton
//
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Location = new System.Drawing.Point(334, 346);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 26);
this.cancelButton.TabIndex = 10;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(242, 346);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 26);
this.okButton.TabIndex = 11;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// previewPictureBox
//
this.previewPictureBox.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
this.previewPictureBox.Image = global::Revit.SDK.Samples.WinderStairs.CS.Properties.Resources.UWinder;
this.previewPictureBox.Location = new System.Drawing.Point(274, 23);
this.previewPictureBox.Name = "previewPictureBox";
this.previewPictureBox.Size = new System.Drawing.Size(360, 302);
this.previewPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.previewPictureBox.TabIndex = 16;
this.previewPictureBox.TabStop = false;
//
// numInMiddleTextBox
//
this.numInMiddleTextBox.Location = new System.Drawing.Point(118, 88);
this.numInMiddleTextBox.Name = "numInMiddleTextBox";
this.numInMiddleTextBox.Size = new System.Drawing.Size(100, 20);
this.numInMiddleTextBox.TabIndex = 14;
//
// numInCorner2TextBox
//
this.numInCorner2TextBox.Location = new System.Drawing.Point(118, 228);
this.numInCorner2TextBox.Name = "numInCorner2TextBox";
this.numInCorner2TextBox.Size = new System.Drawing.Size(100, 20);
this.numInCorner2TextBox.TabIndex = 14;
//
// middleStepsLabel
//
this.middleStepsLabel.AutoSize = true;
this.middleStepsLabel.Location = new System.Drawing.Point(23, 88);
this.middleStepsLabel.Name = "middleStepsLabel";
this.middleStepsLabel.Size = new System.Drawing.Size(87, 13);
this.middleStepsLabel.TabIndex = 19;
this.middleStepsLabel.Text = "Middle Steps (B):";
//
// cornerStepsN2Label
//
this.cornerStepsN2Label.AutoSize = true;
this.cornerStepsN2Label.Location = new System.Drawing.Point(16, 228);
this.cornerStepsN2Label.Name = "cornerStepsN2Label";
this.cornerStepsN2Label.Size = new System.Drawing.Size(94, 13);
this.cornerStepsN2Label.TabIndex = 19;
this.cornerStepsN2Label.Text = "Corner Steps (N2):";
//
// inputParamGroupBox
//
this.inputParamGroupBox.Controls.Add(this.centerOffsetF2Label);
this.inputParamGroupBox.Controls.Add(this.centerOffsetE2Label);
this.inputParamGroupBox.Controls.Add(this.centerOffsetF1Label);
this.inputParamGroupBox.Controls.Add(this.numInMiddleTextBox);
this.inputParamGroupBox.Controls.Add(this.runWidthLabel);
this.inputParamGroupBox.Controls.Add(this.numAtStartTextBox);
this.inputParamGroupBox.Controls.Add(this.middleStepsLabel);
this.inputParamGroupBox.Controls.Add(this.numInCorner1TextBox);
this.inputParamGroupBox.Controls.Add(this.cornerStepsN2Label);
this.inputParamGroupBox.Controls.Add(this.centerOffsetF2TextBox);
this.inputParamGroupBox.Controls.Add(this.centerOffsetE2TextBox);
this.inputParamGroupBox.Controls.Add(this.centerOffsetF1TextBox);
this.inputParamGroupBox.Controls.Add(this.centerOffsetE1TextBox);
this.inputParamGroupBox.Controls.Add(this.numAtEndTextBox);
this.inputParamGroupBox.Controls.Add(this.centerOffsetE1Label);
this.inputParamGroupBox.Controls.Add(this.endStepsLabel);
this.inputParamGroupBox.Controls.Add(this.numInCorner2TextBox);
this.inputParamGroupBox.Controls.Add(this.cornerStepsN1Label);
this.inputParamGroupBox.Controls.Add(this.runWidthTextBox);
this.inputParamGroupBox.Controls.Add(this.startStepsLabel);
this.inputParamGroupBox.Location = new System.Drawing.Point(12, 12);
this.inputParamGroupBox.Name = "inputParamGroupBox";
this.inputParamGroupBox.Size = new System.Drawing.Size(243, 313);
this.inputParamGroupBox.TabIndex = 21;
this.inputParamGroupBox.TabStop = false;
this.inputParamGroupBox.Text = "Input Parameters";
//
// centerOffsetF2Label
//
this.centerOffsetF2Label.AutoSize = true;
this.centerOffsetF2Label.Location = new System.Drawing.Point(17, 284);
this.centerOffsetF2Label.Name = "centerOffsetF2Label";
this.centerOffsetF2Label.Size = new System.Drawing.Size(93, 13);
this.centerOffsetF2Label.TabIndex = 23;
this.centerOffsetF2Label.Text = "Center Offset (F2):";
//
// centerOffsetE2Label
//
this.centerOffsetE2Label.AutoSize = true;
this.centerOffsetE2Label.Location = new System.Drawing.Point(16, 256);
this.centerOffsetE2Label.Name = "centerOffsetE2Label";
this.centerOffsetE2Label.Size = new System.Drawing.Size(94, 13);
this.centerOffsetE2Label.TabIndex = 22;
this.centerOffsetE2Label.Text = "Center Offset (E2):";
//
// centerOffsetF1Label
//
this.centerOffsetF1Label.AutoSize = true;
this.centerOffsetF1Label.Location = new System.Drawing.Point(17, 200);
this.centerOffsetF1Label.Name = "centerOffsetF1Label";
this.centerOffsetF1Label.Size = new System.Drawing.Size(93, 13);
this.centerOffsetF1Label.TabIndex = 21;
this.centerOffsetF1Label.Text = "Center Offset (F1):";
//
// centerOffsetF2TextBox
//
this.centerOffsetF2TextBox.Location = new System.Drawing.Point(118, 284);
this.centerOffsetF2TextBox.Name = "centerOffsetF2TextBox";
this.centerOffsetF2TextBox.Size = new System.Drawing.Size(100, 20);
this.centerOffsetF2TextBox.TabIndex = 14;
//
// centerOffsetE2TextBox
//
this.centerOffsetE2TextBox.Location = new System.Drawing.Point(118, 256);
this.centerOffsetE2TextBox.Name = "centerOffsetE2TextBox";
this.centerOffsetE2TextBox.Size = new System.Drawing.Size(100, 20);
this.centerOffsetE2TextBox.TabIndex = 14;
//
// centerOffsetF1TextBox
//
this.centerOffsetF1TextBox.Location = new System.Drawing.Point(118, 200);
this.centerOffsetF1TextBox.Name = "centerOffsetF1TextBox";
this.centerOffsetF1TextBox.Size = new System.Drawing.Size(100, 20);
this.centerOffsetF1TextBox.TabIndex = 14;
//
// centerOffsetE1TextBox
//
this.centerOffsetE1TextBox.Location = new System.Drawing.Point(118, 172);
this.centerOffsetE1TextBox.Name = "centerOffsetE1TextBox";
this.centerOffsetE1TextBox.Size = new System.Drawing.Size(100, 20);
this.centerOffsetE1TextBox.TabIndex = 14;
//
// centerOffsetE1Label
//
this.centerOffsetE1Label.AutoSize = true;
this.centerOffsetE1Label.Location = new System.Drawing.Point(16, 172);
this.centerOffsetE1Label.Name = "centerOffsetE1Label";
this.centerOffsetE1Label.Size = new System.Drawing.Size(94, 13);
this.centerOffsetE1Label.TabIndex = 19;
this.centerOffsetE1Label.Text = "Center Offset (E1):";
//
// dmuCheckBox
//
this.dmuCheckBox.AutoSize = true;
this.dmuCheckBox.Location = new System.Drawing.Point(434, 352);
this.dmuCheckBox.Name = "dmuCheckBox";
this.dmuCheckBox.Size = new System.Drawing.Size(51, 17);
this.dmuCheckBox.TabIndex = 22;
this.dmuCheckBox.Text = "DMU";
this.dmuCheckBox.UseVisualStyleBackColor = true;
//
// sketchCheckBox
//
this.sketchCheckBox.AutoSize = true;
this.sketchCheckBox.Location = new System.Drawing.Point(497, 352);
this.sketchCheckBox.Name = "sketchCheckBox";
this.sketchCheckBox.Size = new System.Drawing.Size(60, 17);
this.sketchCheckBox.TabIndex = 23;
this.sketchCheckBox.Text = "Sketch";
this.sketchCheckBox.UseVisualStyleBackColor = true;
//
// UWinderOptions
//
this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancelButton;
this.ClientSize = new System.Drawing.Size(648, 384);
this.ControlBox = false;
this.Controls.Add(this.sketchCheckBox);
this.Controls.Add(this.dmuCheckBox);
this.Controls.Add(this.inputParamGroupBox);
this.Controls.Add(this.previewPictureBox);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.okButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "UWinderOptions";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "U-Winder Options";
((System.ComponentModel.ISupportInitialize)(this.previewPictureBox)).EndInit();
this.inputParamGroupBox.ResumeLayout(false);
this.inputParamGroupBox.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label runWidthLabel;
private System.Windows.Forms.Label endStepsLabel;
private System.Windows.Forms.Label cornerStepsN1Label;
private System.Windows.Forms.Label startStepsLabel;
private System.Windows.Forms.PictureBox previewPictureBox;
private System.Windows.Forms.TextBox runWidthTextBox;
private System.Windows.Forms.TextBox numAtEndTextBox;
private System.Windows.Forms.TextBox numInCorner1TextBox;
private System.Windows.Forms.TextBox numAtStartTextBox;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.TextBox numInMiddleTextBox;
private System.Windows.Forms.TextBox numInCorner2TextBox;
private System.Windows.Forms.Label middleStepsLabel;
private System.Windows.Forms.Label cornerStepsN2Label;
private System.Windows.Forms.GroupBox inputParamGroupBox;
private System.Windows.Forms.TextBox centerOffsetF2TextBox;
private System.Windows.Forms.TextBox centerOffsetE2TextBox;
private System.Windows.Forms.TextBox centerOffsetF1TextBox;
private System.Windows.Forms.TextBox centerOffsetE1TextBox;
private System.Windows.Forms.Label centerOffsetF2Label;
private System.Windows.Forms.Label centerOffsetE2Label;
private System.Windows.Forms.Label centerOffsetF1Label;
private System.Windows.Forms.Label centerOffsetE1Label;
private System.Windows.Forms.CheckBox dmuCheckBox;
private System.Windows.Forms.CheckBox sketchCheckBox;
}
}
@@ -0,0 +1,336 @@
//
// (C) Copyright 2003-2019 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited warranty and
// restricted rights notice below appear in all supporting
// documentation.
//
// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
// UNINTERRUPTED OR ERROR FREE.
//
// Use, duplication, or disclosure by the U.S. Government is subject to
// restrictions set forth in FAR 52.227-19 (Commercial Computer
// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
// (Rights in Technical Data and Computer Software), as applicable.
//
using System;
using System.Windows.Forms;
using Autodesk.Revit.UI;
namespace Revit.SDK.Samples.WinderStairs.CS
{
/// <summary>
/// This form is used to collect parameters for UWinder creation. It also validates the input
/// parameters and will warn if there is any invalid parameters when trying to submit the form.
/// </summary>
partial class UWinderOptions : Form
{
/// <summary>
/// Default constructor.
/// </summary>
public UWinderOptions()
{
InitializeComponent();
}
/// <summary>
/// Number of straight steps at start.
/// </summary>
public uint NumStepsAtStart
{
get
{
return uint.Parse(numAtStartTextBox.Text);
}
set
{
numAtStartTextBox.Text = value.ToString();
}
}
/// <summary>
/// Number of steps in the first winder corner.
/// </summary>
public uint NumStepsInCorner1
{
get
{
return uint.Parse(numInCorner1TextBox.Text);
}
set
{
numInCorner1TextBox.Text = value.ToString();
}
}
/// <summary>
/// Number of straight steps in middle.
/// </summary>
public uint NumStepsInMiddle
{
get
{
return uint.Parse(numInMiddleTextBox.Text);
}
set
{
numInMiddleTextBox.Text = value.ToString();
}
}
/// <summary>
/// Number of steps in the second winder corner.
/// </summary>
public uint NumStepsInCorner2
{
get
{
return uint.Parse(numInCorner2TextBox.Text);
}
set
{
numInCorner2TextBox.Text = value.ToString();
}
}
/// <summary>
/// Number of straight steps at end.
/// </summary>
public uint NumStepsAtEnd
{
get
{
return uint.Parse(numAtEndTextBox.Text);
}
set
{
numAtEndTextBox.Text = value.ToString();
}
}
/// <summary>
/// Winder stairs run width.
/// </summary>
public double RunWidth
{
get
{
return double.Parse(runWidthTextBox.Text);
}
set
{
runWidthTextBox.Text = value.ToString();
}
}
/// <summary>
/// Center point offset distance from the first corner.
/// </summary>
public double CenterOffsetE1
{
get
{
return double.Parse(centerOffsetE1TextBox.Text);
}
set
{
centerOffsetE1TextBox.Text = value.ToString();
}
}
/// <summary>
/// Center point offset distance from the first corner.
/// </summary>
public double CenterOffsetF1
{
get
{
return double.Parse(centerOffsetF1TextBox.Text);
}
set
{
centerOffsetF1TextBox.Text = value.ToString();
}
}
/// <summary>
/// Center point offset distance from the second corner.
/// </summary>
public double CenterOffsetE2
{
get
{
return double.Parse(centerOffsetE2TextBox.Text);
}
set
{
centerOffsetE2TextBox.Text = value.ToString();
}
}
/// <summary>
/// Center point offset distance from the second corner.
/// </summary>
public double CenterOffsetF2
{
get
{
return double.Parse(centerOffsetF2TextBox.Text);
}
set
{
centerOffsetF2TextBox.Text = value.ToString();
}
}
/// <summary>
/// A switch indicates whether to support DMU(dynamic model update).
/// </summary>
public bool DMU
{
get
{
return dmuCheckBox.Checked;
}
}
/// <summary>
/// A switch to control the sketch drawing of winder stairs.
/// </summary>
public bool Sketch
{
get
{
return sketchCheckBox.Checked;
}
}
/// <summary>
/// Validate the UI input and it will warn if there are invalid user inputs.
/// </summary>
/// <returns>true if all input is fine.</returns>
bool ValidateInput()
{
double runWidth;
if (!double.TryParse(runWidthTextBox.Text, out runWidth) || runWidth < 1.0e-6)
{
TaskDialog.Show("U-Winder Warning", "Run Width should be positive double", TaskDialogCommonButtons.Ok);
runWidthTextBox.Focus();
runWidthTextBox.SelectAll();
return false;
}
uint numAtStart;
if (!uint.TryParse(numAtStartTextBox.Text, out numAtStart))
{
TaskDialog.Show("U-Winder Warning", "Start steps should be unsigned integer", TaskDialogCommonButtons.Ok);
numAtStartTextBox.Focus();
numAtStartTextBox.SelectAll();
return false;
}
uint numInMiddle;
if (!uint.TryParse(numInMiddleTextBox.Text, out numInMiddle))
{
TaskDialog.Show("U-Winder Warning", "Middle steps should be unsigned integer", TaskDialogCommonButtons.Ok);
numInMiddleTextBox.Focus();
numInMiddleTextBox.SelectAll();
return false;
}
uint numAtEnd;
if (!uint.TryParse(numAtEndTextBox.Text, out numAtEnd))
{
TaskDialog.Show("U-Winder Warning", "End steps should be unsigned integer", TaskDialogCommonButtons.Ok);
numAtEndTextBox.Focus();
numAtEndTextBox.SelectAll();
return false;
}
uint numInCorner1;
if (!uint.TryParse(numInCorner1TextBox.Text, out numInCorner1) || numInCorner1 < 1)
{
TaskDialog.Show("U-Winder Warning", "The first corner steps should be unsigned integer and >= 1", TaskDialogCommonButtons.Ok);
numInCorner1TextBox.Focus();
numInCorner1TextBox.SelectAll();
return false;
}
double offsetE1;
if (!double.TryParse(centerOffsetE1TextBox.Text, out offsetE1) || offsetE1 < 0.0)
{
TaskDialog.Show("U-Winder Warning", "Center offset (E1) should be non-negative double", TaskDialogCommonButtons.Ok);
centerOffsetE1TextBox.Focus();
centerOffsetE1TextBox.SelectAll();
return false;
}
double offsetF1;
if (!double.TryParse(centerOffsetF1TextBox.Text, out offsetF1) || offsetF1 < 0.0)
{
TaskDialog.Show("U-Winder Warning", "Center offset (F1) should be non-negative double", TaskDialogCommonButtons.Ok);
centerOffsetF1TextBox.Focus();
centerOffsetF1TextBox.SelectAll();
return false;
}
uint numInCorner2;
if (!uint.TryParse(numInCorner2TextBox.Text, out numInCorner2) || numInCorner2 < 1)
{
TaskDialog.Show("U-Winder Warning", "The second corner steps should be unsigned integer and >= 1", TaskDialogCommonButtons.Ok);
numInCorner2TextBox.Focus();
numInCorner2TextBox.SelectAll();
return false;
}
double offsetE2;
if (!double.TryParse(centerOffsetE2TextBox.Text, out offsetE2) || offsetE2 < 0.0)
{
TaskDialog.Show("U-Winder Warning", "Center offset (E2) should be non-negative double", TaskDialogCommonButtons.Ok);
centerOffsetE2TextBox.Focus();
centerOffsetE2TextBox.SelectAll();
return false;
}
double offsetF2;
if (!double.TryParse(centerOffsetF2TextBox.Text, out offsetF2) || offsetF2 < 0.0)
{
TaskDialog.Show("U-Winder Warning", "Center offset (F2) should be non-negative double", TaskDialogCommonButtons.Ok);
centerOffsetF2TextBox.Focus();
centerOffsetF2TextBox.SelectAll();
return false;
}
return true;
}
/// <summary>
/// Submit the UI input.
/// </summary>
private void okButton_Click(object sender, EventArgs e)
{
if (ValidateInput())
{
this.Close();
this.DialogResult = DialogResult.OK;
}
}
/// <summary>
/// Cancel the UI input.
/// </summary>
private void cancelButton_Click(object sender, EventArgs e)
{
this.Close();
this.DialogResult = DialogResult.Cancel;
}
}
}
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>