本文整理汇总了C#中Editor类的典型用法代码示例。如果您正苦于以下问题:C# Editor类的具体用法?C# Editor怎么用?C# Editor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Editor类属于命名空间,在下文中一共展示了Editor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: drawUpgradeSpecs
public static void drawUpgradeSpecs(Editor editor, UpgradeLevel.Specs specs, int[] prices = null)
{
EditorGUILayout.Space();
EditorGUILayout.LabelField("Specs:");
EditorGUILayout.Space();
drawUpgradeInfoFloat(editor, "Magnet Radius", ref specs.magnetRadius);
drawPriceInfo(editor, prices, UpgradeLevel.Type.Magnet);
EditorGUILayout.Space();
drawUpgradeInfoInt(editor, "Carrot Sprays", ref specs.carrotSprayCount);
drawPriceInfo(editor, prices, UpgradeLevel.Type.CarrotSpray);
EditorGUILayout.Space();
drawUpgradeInfoInt(editor, "Bubble Gums", ref specs.bubbleGumCount);
drawPriceInfo(editor, prices, UpgradeLevel.Type.BubbleGum);
EditorGUILayout.Space();
drawUpgradeInfoFloat(editor, "Fart Capacity", ref specs.fartCapacity);
drawUpgradeInfoFloat(editor, "Fart Force", ref specs.fartForce);
drawPriceInfo(editor, prices, UpgradeLevel.Type.PowerUpFart);
EditorGUILayout.Space();
drawUpgradeInfoFloat(editor, "Glide Capacity", ref specs.glideCapacity);
drawUpgradeInfoFloat(editor, "Glide Force", ref specs.glideForce);
drawPriceInfo(editor, prices, UpgradeLevel.Type.PowerUpGlide);
EditorGUILayout.Space();
}
示例2: Bt_send_Click
protected void Bt_send_Click(object sender, EventArgs e)
{
if (IsValid)
{
Hashtable ht = new Hashtable();
Editor ed = new Editor();
ed.LoadInfo(Request.Cookies["userID"].Value.ToString());
ht.Add("messageFrom", SQLString.GetQuotedString(ed.editorColumn));
ht.Add("messageTo", SQLString.GetQuotedString(txtTo.Text));
ht.Add("messageTime", SQLString.GetQuotedString(DateTime.Now.ToString()));
ht.Add("messageTitle", SQLString.GetQuotedString(txtTitle.Text));
ht.Add("messageContent", SQLString.GetQuotedString(txtContent.Text));
ht.Add("messageState", SQLString.GetQuotedString("0"));
Message msg = new Message();
if (msg.NewMesg(ht))
{
Response.Write("<Script Language=JavaScript>alert(\"发送成功!\")</Script>");
}
else
{
Response.Write("<Script Language=JavaScript>alert(\"发送失败!\")</Script>");
}
txtContent.Text = "";
txtTitle.Text = "";
txtTo.Text = "";
}
}
示例3: EditorInitialize
public void EditorInitialize(Editor.TWorldDirector director)
{
this.director = director;
editor = new Editor.TWorldObjectEditor(panel2.Handle, panel2.Width, panel2.Height, director);
editor.GUI_Notify_ToolsChanged += OnToolsChange;
timer1.Enabled = true;
}
示例4: Bt_Update_Click
protected void Bt_Update_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Editor editor = new Editor();
editor.LoadInfo(Request.Cookies["userID"].Value.ToString());
if (txtPwdold.Text == editor.editorPwd)
{
string xwhere = "where editorID=" + SQLString.GetQuotedString(Request.Cookies["userID"].Value.ToString());
Hashtable ht = new Hashtable();
ht.Add("editorPwd", SQLString.GetQuotedString(txtPwdnew.Text));
if (editor.Update(ht, xwhere))
{
Response.Write("<Script Language=JavaScript>alert(\"密码修改成功!\")</Script>");
}
else
{
Response.Write("<Script Language=JavaScript>alert(\"密码修改失败!\")</Script>");
}
}
else
{
Response.Write("<Script Language=JavaScript>alert(\"旧密码错误!\")</Script>");
}
}
}
示例5: Bt_add_Click
protected void Bt_add_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
Editor ed = new Editor();
ed.LoadInfo(Request.Cookies["userID"].Value.ToString());
string column = ed.editorColumn;
Hashtable ht = new Hashtable();
ht.Add("expertID", SQLString.GetQuotedString(txtID.Text));
ht.Add("expertPwd", SQLString.GetQuotedString(txtID.Text));//51(aspx)
ht.Add("expertName", SQLString.GetQuotedString(txtName.Text));
ht.Add("expertColumn", SQLString.GetQuotedString(column));
Expert ep = new Expert();
if (ep.Add(ht))
{
Response.Write("<script>alert('添加成功!');window.location=window.location;</script>");
}
else
{
Response.Write("<script>alert('添加失败!');window.location=window.location;</script>");
}
txtID.Text = "";
txtName.Text = "";
}
}
示例6: ShowInspectorGUI
public override void ShowInspectorGUI(Editor editor)
{
// Calls inspector code from parent class (in this case, allows user to display the default inspector for the object)
base.ShowInspectorGUI(editor);
// Insert inspector code here
}
示例7: EditorInitialize
public void EditorInitialize(Editor.TWorldDirector director)
{
this.director = director;
editor = new Editor.TLayersManager(director);
editor.GUI_Notify_LayersManagerSceneChange += editor_LayersManagerSceneChange;
editor.GUI_Notify_LayersChange += editor_GUI_Notify_LayersChange;
}
示例8: OnFlowSettingsGUI
public override void OnFlowSettingsGUI() {
if (Heatmap.settings == null) {
Heatmap.settings = this.GetSettingsFile();
//if (Heatmap.settings == null) Heatmap.settings = ME.EditorUtilities.GetAssetsOfType<HeatmapSettings>(useCache: false).FirstOrDefault();
}
if (this.noDataTexture == null) this.noDataTexture = Resources.Load("UI.Windows/Heatmap/NoData") as Texture;
var settings = Heatmap.settings;
if (settings == null) {
EditorGUILayout.HelpBox(string.Format(FlowAddon.MODULE_HAS_ERRORS, "Settings file not found (HeatmapSettings)."), MessageType.Error);
} else {
GUILayout.Label(FlowAddon.MODULE_INSTALLED, EditorStyles.centeredGreyMiniLabel);
if (this.editor == null) this.editor = Editor.CreateEditor(settings);
if (this.editor != null) {
this.editor.OnInspectorGUI();
}
}
}
示例9: OnFlowSettingsGUI
public override void OnFlowSettingsGUI() {
if (Social.settings == null) {
Social.settings = this.GetSettingsFile();
if (Social.settings == null) Social.settings = ME.EditorUtilities.GetAssetsOfType<SocialSettings>(useCache: false).FirstOrDefault();
}
var settings = Social.settings;
if (settings == null) {
EditorGUILayout.HelpBox(string.Format(FlowAddon.MODULE_HAS_ERRORS, "Settings file not found (SocialSettings)."), MessageType.Error);
} else {
GUILayout.Label(FlowAddon.MODULE_INSTALLED, EditorStyles.centeredGreyMiniLabel);
if (this.editor == null) this.editor = Editor.CreateEditor(settings);
if (this.editor != null) {
this.editor.OnInspectorGUI();
}
}
}
示例10: EditingCodedValueDomains
public EditingCodedValueDomains()
{
InitializeComponent();
editor = LayoutRoot.Resources["MyEditor"] as Editor;
featureLayer = MyMap.Layers["RecreationFacilities"] as FeatureLayer;
}
示例11: FeatureLayerSelection
public FeatureLayerSelection()
{
InitializeComponent();
MyMap.Extent = initialExtent;
editor = LayoutRoot.Resources["MyEditor"] as Editor;
}
示例12: AirCondTable
public AirCondTable(List<AirCondRow> condRows)
{
doc = Application.DocumentManager.MdiActiveDocument;
db = doc.Database;
ed = doc.Editor;
this.condRows = condRows;
}
示例13: DrawWindow
public void DrawWindow(int id)
{
if (_editor == null)
_editor = Editor.CreateEditor (_data);
_editor.DrawDefaultInspector ();
// We can also display the path if necessary, commented this out as if the path is large it makes the window width excessive
//string path = AssetDatabase.GetAssetPath (_data);
//GUILayout.Label(path);
GUILayout.BeginHorizontal ();
if (GUILayout.Button ("Remove")) {
_ownerWindow.ScriptableObjectWindows.RemoveAt (id);
}
if (GUILayout.Button ("Delete")) {
if (EditorUtility.DisplayDialog("Delete Asset", "Remove " + this.Data.name + "?", "Okay", "Cancel"))
{
_ownerWindow.ScriptableObjectWindows.RemoveAt (id);
AssetDatabase.DeleteAsset(AssetDatabase.GetAssetPath (Data));
AssetDatabase.SaveAssets ();
}
}
GUILayout.EndHorizontal ();
}
示例14: Recorder_Executed
private void Recorder_Executed(object sender, ExecutedRoutedEventArgs e)
{
var recorder = new Recorder();
Hide();
var result = recorder.ShowDialog();
if (result.HasValue && result.Value)
{
// If Close
Environment.Exit(0);
}
else if (result.HasValue)
{
#region If Backbutton or Stop Clicked
if (recorder.ExitArg == ExitAction.Recorded)
{
var editor = new Editor { ListFrames = recorder.ListFrames };
GenericShowDialog(editor);
return;
}
Show();
#endregion
}
}
示例15: EditorInitialize
public void EditorInitialize(Editor.TWorldDirector director)
{
seek_text_changed = false;
treeView1.Nodes.Clear();
textBox1.Enabled = false;
textBox2.Enabled = false;
textBox3.Enabled = false;
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
event_editor = new Editor.TEventsEditor(director);
event_editor.Initialize();
for(int curr_event_type = 0; curr_event_type<event_editor.GetEventTypesCount();curr_event_type++)
{
var curr_type_node = treeView1.Nodes.Add(event_editor.GetEventTypeName(curr_event_type));
for (int i = 0; i < event_editor.GetEventsCount(curr_event_type); i++)
{
var event_node = curr_type_node.Nodes.Add(i.ToString());
}
}
}