当前位置: 首页>>代码示例>>C#>>正文


C# Editor类代码示例

本文整理汇总了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();
    }
开发者ID:pchernev,项目名称:Zombayo,代码行数:29,代码来源:CommonInspectorMethods.cs

示例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 = "";
        }
    }
开发者ID:huaminglee,项目名称:OnlinePublish,代码行数:28,代码来源:sendmessage.aspx.cs

示例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;
 }
开发者ID:HumMan,项目名称:BaluEngine,代码行数:7,代码来源:WorldObjectEditor.cs

示例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>");

            }
        }
    }
开发者ID:huaminglee,项目名称:OnlinePublish,代码行数:29,代码来源:modifypwd.aspx.cs

示例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 = "";
        }
    }
开发者ID:huaminglee,项目名称:OnlinePublish,代码行数:27,代码来源:expertmaintain.aspx.cs

示例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
    }
开发者ID:DUUG,项目名称:Meetup-3,代码行数:7,代码来源:CustomMonoBehaviourTemplate.cs

示例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;
 }
开发者ID:HumMan,项目名称:BaluEngine,代码行数:7,代码来源:LayersManager.cs

示例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();
					
				}
				
			}

		}
开发者ID:RuFengLau,项目名称:Unity3d.UI.Windows,代码行数:30,代码来源:HeatmapAddon.cs

示例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();

				}

			}

		}
开发者ID:Cyberbanan,项目名称:Unity3d.UI.Windows,代码行数:28,代码来源:SocialAddon.cs

示例10: EditingCodedValueDomains

        public EditingCodedValueDomains()
        {
            InitializeComponent();

            editor = LayoutRoot.Resources["MyEditor"] as Editor;
            featureLayer = MyMap.Layers["RecreationFacilities"] as FeatureLayer;
        }
开发者ID:Esri,项目名称:arcgis-samples-winphone,代码行数:7,代码来源:EditingCodedValueDomains.xaml.cs

示例11: FeatureLayerSelection

        public FeatureLayerSelection()
        {
            InitializeComponent();

            MyMap.Extent = initialExtent;
            editor = LayoutRoot.Resources["MyEditor"] as Editor;
        }
开发者ID:jorik041,项目名称:arcgis-samples-winphone,代码行数:7,代码来源:FeatureLayerSelection.xaml.cs

示例12: AirCondTable

 public AirCondTable(List<AirCondRow> condRows)
 {
     doc = Application.DocumentManager.MdiActiveDocument;
     db = doc.Database;
     ed = doc.Editor;
     this.condRows = condRows;
 }
开发者ID:vildar82,项目名称:PanelColorAlbum,代码行数:7,代码来源:AirCondTable.cs

示例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 ();
    }
开发者ID:JodyAndrews,项目名称:ScriptableObjectUtility,代码行数:27,代码来源:DefaultItemWindow.cs

示例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
            }
        }
开发者ID:koen24,项目名称:screentogif,代码行数:28,代码来源:Startup.xaml.cs

示例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());
                }
            }
        }
开发者ID:HumMan,项目名称:BaluEngine,代码行数:26,代码来源:EventsEditor.cs


注:本文中的Editor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。