• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gui.Window类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FlatRedBall.Gui.Window的典型用法代码示例。如果您正苦于以下问题:C# Window类的具体用法?C# Window怎么用?C# Window使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Window类属于FlatRedBall.Gui命名空间,在下文中一共展示了Window类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ScaleAllPolygons

        void ScaleAllPolygons(Window callingWindow)
        {
            Window polyScaleWindow = GuiManager.AddWindow();
            polyScaleWindow.Name = "Scale All Polygons";
            polyScaleWindow.ScaleX = 10f;
            polyScaleWindow.ScaleY = 4f;
            polyScaleWindow.HasMoveBar = true;
            polyScaleWindow.HasCloseButton = true;

            UpDown scaleBox = new UpDown(mCursor);
            polyScaleWindow.AddWindow(scaleBox);
            scaleBox.Name = "scale";
            scaleBox.CurrentValue = 1f;
            scaleBox.ScaleX = 9f;
            scaleBox.X = 10f;
            scaleBox.Y = Window.MoveBarHeight;

            Button okButton = new Button(mCursor);
            polyScaleWindow.AddWindow(okButton);
            okButton.Text = "Set Scale";
            okButton.ScaleX = 9f;
            okButton.X = 10f;
            okButton.Y = scaleBox.Y + scaleBox.ScaleY * 2f;
            okButton.Click += ScalePolygonsOK;
        }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:25,代码来源:Menu.cs


示例2: SpriteYPosBoxGuiChange

		public static void SpriteYPosBoxGuiChange(Window callingWindow)
		{
			if(EditorData.EditorLogic.CurrentSprites.Count == 0)	return;
            EditorData.EditorLogic.CurrentSprites[0].Y = ((UpDown)callingWindow).CurrentValue;


		}
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:PropertyWindowMessages.cs


示例3: ComboBoxItemClick

 void ComboBoxItemClick(Window callingWindow)
 {
     if (ItemSelect != null)
     {
         ItemSelect(this);
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:SaveUseWindow.cs


示例4: ShiftSceneOk

 private void ShiftSceneOk(Window callingWindow)
 {
     if (OkClick != null)
     {
         OkClick(this);
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:Vector3OkWindow.cs


示例5: SetChildrenWindowPositionsAndScales

        void SetChildrenWindowPositionsAndScales(Window callingWindow)
        {
            mAllProperties.ScaleX = (ScaleX - 1.5f) / 2.0f;
            mAllProperties.ScaleY = ScaleY - 3.9f;
            mAllProperties.X = mAllProperties.ScaleX + .7f;
            mAllProperties.Y = 1.7f + mAllProperties.ScaleY;

            mPropertiesToSave.ScaleX = mAllProperties.ScaleX;
            mPropertiesToSave.ScaleY = mAllProperties.ScaleY;
            mPropertiesToSave.X = (ScaleX * 2) - mPropertiesToSave.ScaleX - .7f;
            mPropertiesToSave.Y = mAllProperties.Y;

            mOkButton.Y = ScaleY * 2 - 1.5f;
            mCancelButton.Y = ScaleY * 2 - 1.5f;

            mCancelButton.X = ScaleX * 2 - .7f - mCancelButton.ScaleX;
            mOkButton.X = mCancelButton.X - mCancelButton.ScaleX - .5f - mOkButton.ScaleX;

            mAllPropertiesDisplay.X = .7f;
            mAllPropertiesDisplay.Y = 1;

            mPropertiesToSaveDisplay.X = mPropertiesToSave.X - mPropertiesToSave.ScaleX;
            mPropertiesToSaveDisplay.Y = 1;

            mUseAllButton.X = mAllProperties.X;
            mUseAllButton.ScaleX = mAllProperties.ScaleX;
            mUseAllButton.Y = this.ScaleY * 2 - 4.8f;
        }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:28,代码来源:UsedPropertySelectionWindow.cs


示例6: RestoreToStateBefore

 void RestoreToStateBefore(Window callingWindow)
 {
     if (this.mCursor.PrimaryDown && this.mCursor.WindowPushed == this)
     {
         this.ButtonPushedState = mStateBeforePrimaryPush;
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:ToggleButton.cs


示例7: RemovalOfWatchedWindow

        private void RemovalOfWatchedWindow(Window callingWindow)
        {
            IObjectDisplayer asObjectDisplayer = callingWindow as IObjectDisplayer;

            GuiManager.RemoveWindow(callingWindow);

            if (asObjectDisplayer.ObjectDisplayingAsObject != null &&
                mObjectDisplayers.ContainsKey(asObjectDisplayer.ObjectDisplayingAsObject))
            {
                mObjectDisplayers.Remove(asObjectDisplayer.ObjectDisplayingAsObject);
            }
            else
            {
                // We still need to see if this Window is contained in this dictionary even
                // if the previous if statement fails.  The reason for this is because of value
                // and immutable types.  For example, a String PropertyGrid might open up for the
                // value "".  Afterwards, the user changes the value and then double-clicks a list
                // to open a new PropertyGrid.  Since the string has changed, then asObjectDisplayer.ObjectDisplayingAsObject
                // will no longer equal the "" string so the Window will never be removed when it should be.
                object keyToRemove = null;

                foreach (KeyValuePair<object, IObjectDisplayer> kvp in mObjectDisplayers)
                {
                    if (kvp.Value == asObjectDisplayer)
                    {
                        keyToRemove = kvp.Key;
                        break;
                    }
                }

                if (keyToRemove != null)
                {
                    mObjectDisplayers.Remove(keyToRemove);
                }

            }
            


            if (mWindowFamilies.ContainsValue(asObjectDisplayer))
            {
                // Remove the object by its value
                IObjectDisplayer keyToRemove = null;

                foreach (KeyValuePair<IObjectDisplayer, IObjectDisplayer> kvp in mWindowFamilies)
                {
                    if (kvp.Value == asObjectDisplayer)
                    {
                        keyToRemove = kvp.Key;
                        break;
                    }
                }

                if (keyToRemove != null)
                {
                    mWindowFamilies.Remove(keyToRemove);

                }
            }
        }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:60,代码来源:ObjectDisplayManager.cs


示例8: playButtonClick

 void playButtonClick(Window callingWindow)
 {
     if (PlayClick != null)
     {
         PlayClick(this);
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:TimeControlButtonWindow.cs


示例9: TextBoxEnter

        void TextBoxEnter(Window callingWindow)
        {
            AddText(mTextBox.Text);
            mTextBox.Text = "";

            Input.InputManager.ReceivingInput = mTextBox;
        }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:ChatWindow.cs


示例10: OnEditButtonClick

 void OnEditButtonClick(Window callingWindow)
 {
     if (EditButtonClick != null)
     {
         EditButtonClick(this);
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:EditAndSetButtons.cs


示例11: OnSetButtonClick

 void OnSetButtonClick(Window callingWindow)
 {
     if (SetButtonClick != null)
     {
         SetButtonClick(this);
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:EditAndSetButtons.cs


示例12: SaveActiveScene

 void SaveActiveScene(Window callingWindow)
 {
     FileWindow fileWindow = GuiManager.AddFileWindow();
     fileWindow.SetToSave();
     fileWindow.SetFileType("scnx");
     fileWindow.OkClick += SaveActiveSceneOk;
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:InstructionEditorMenuStrip.cs


示例13: SaveInstructionCodeClick

 void SaveInstructionCodeClick(Window callingWindow)
 {
     FileWindow fileWindow = GuiManager.AddFileWindow();
     fileWindow.SetToSave();
     fileWindow.SetFileType("txt");
     fileWindow.OkClick += SaveInstructionCodeOk;
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:InstructionEditorMenuStrip.cs


示例14: toStartButtonClick

 void toStartButtonClick(Window callingWindow)
 {
     if (ToStartClick != null)
     {
         ToStartClick(this);
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:TimeControlButtonWindow.cs


示例15: AddSpriteClick

 void AddSpriteClick(Window callingWindow)
 {
     FileWindow fileWindow = GuiManager.AddFileWindow();
     fileWindow.SetToLoad();
     fileWindow.SetFileType("graphic and animation");
     fileWindow.OkClick += AddSpriteOk;            
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:InstructionEditorMenuStrip.cs


示例16: OnOkButtonClick

        void OnOkButtonClick(Window callingWindow)
        {
            if (OkClick != null)
                OkClick(this);

            GuiManager.RemoveWindow(this);
        }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:ComboBoxWindow.cs


示例17: AddKeyframeListClick

        //public Button AddKeyframeListButton
        //{
        //    get { return mAddKeyframeListButton; }
        //}


        #endregion

        #region Event Methods

        private void AddKeyframeListClick(Window callingWindow)
        {
            if (EditorData.EditorLogic.CurrentInstructionSet == null)
            {
                GuiManager.ShowMessageBox("Currently the InstructionEditor is under \"Current'\" editing mode." +
                    "  To add an Animation, you must have a selected object first.", "Error");

                return;
            }

            TextInputWindow tiw = GuiManager.ShowTextInputWindow("Enter a name for the new Animation:", "Enter name");
            if (GuiData.TimeLineWindow.InstructionMode == InstructionMode.Current)
            {
                if (EditorData.EditorLogic.CurrentInstructionSet != null)
                {
                    tiw.Text = "Keyframe List " + EditorData.EditorLogic.CurrentInstructionSet.Count;
                }
                else
                {
                    tiw.Text = "Keyframe List " + 0;
                }
            }
            else
            {
                tiw.Text = "Animation " + EditorData.GlobalInstructionSets.Count;
            }

            tiw.OkClick += new GuiMessage(AddKeyframeListOk);
        }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:39,代码来源:ListBoxWindow.cs


示例18: ShowObjectDisplayWindowForSelectedObject

 private void ShowObjectDisplayWindowForSelectedObject(Window callingWindow)
 {
     if (SelectedObject != null)
     {
         GuiManager.ObjectDisplayManager.GetObjectDisplayerForObject(SelectedObject);
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:HierarchyDisplayWindow.cs


示例19: WarnAboutSavingScene

        void WarnAboutSavingScene(Window callingWindow)
        {
            string message = "You are attempting to save a Scene (.scnx).  Scenes do not include any node network information.  If you are trying to save a node network, select the Save Node Network menu item";

            OkCancelWindow ocw = GuiManager.ShowOkCancelWindow(message, "Warning");
            ocw.OkClick += OpenFileWindowSaveScene;
        }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:7,代码来源:Menu.cs


示例20: CloseNodeNetworkClick

 void CloseNodeNetworkClick(Window callingWindow)
 {
     if (mNodeNetwork != null)
     {
         mNodeNetwork.Visible = false;
         mNodeNetwork = null;
     }
 }
开发者ID:vchelaru,项目名称:FlatRedBall,代码行数:8,代码来源:NodeNetworkEditorManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Fleck.WebSocketServer类代码示例发布时间:2022-05-24
下一篇:
C# SaveClasses.ReferencedFileSave类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap