コード例 #1
0
        public DeveloperResolutionMenu(DeveloperRenderPropertiesDialog renderDialog)
            : base("Developer.GUI.DeveloperRenderer.DeveloperResolutionMenu.layout")
        {
            this.renderDialog = renderDialog;

            Button addButton = (Button)widget.findWidget("AddButton");

            addButton.MouseButtonClick += new MyGUIEvent(addButton_MouseButtonClick);

            Button removeButton = (Button)widget.findWidget("RemoveButton");

            removeButton.MouseButtonClick += new MyGUIEvent(removeButton_MouseButtonClick);

            presets = (MultiListBox)widget.findWidget("PresetList");
            presets.addColumn("Preset", 50);
            presets.setColumnResizingPolicyAt(0, ResizingPolicy.Fill);
            if (!File.Exists(RenderPresetsFile))
            {
                presets.addItem("Web", new RenderPreset("Web", 640, 480));
                presets.addItem("Presentation", new RenderPreset("Presentation", 1024, 768));
            }
            else
            {
                try
                {
                    using (XmlTextReader xmlReader = new XmlTextReader(RenderPresetsFile))
                    {
                        RenderPresetCollection container = (RenderPresetCollection)xmlSaver.restoreObject(xmlReader);
                        foreach (RenderPreset preset in container)
                        {
                            presets.addItem(preset.Name, preset);
                        }
                    }
                }
                catch (Exception)
                {
                    try
                    {
                        File.Delete(RenderPresetsFile);
                    }
                    catch (Exception) { }
                    presets.addItem("Web", new RenderPreset("Web", 640, 480));
                    presets.addItem("Presentation", new RenderPreset("Presentation", 1024, 768));
                }
            }
            presets.ListChangePosition += new MyGUIEvent(presets_ListChangePosition);
        }
コード例 #2
0
        public void addFile(PatientDataFile file)
        {
            fileDataGrid.addItem(file.FirstName, file);
            uint newIndex = fileDataGrid.getItemCount() - 1;

            fileDataGrid.setSubItemNameAt(1, newIndex, file.LastName);
            fileDataGrid.setSubItemNameAt(2, newIndex, file.DateModified.ToString());
        }
コード例 #3
0
 void addButton_MouseButtonClick(Widget source, EventArgs e)
 {
     InputBox.GetInput("Add Preset", "Enter a name for this preset.", true, delegate(String result, ref string errorPrompt)
     {
         presets.addItem(result, new RenderPreset(result, renderDialog.RenderWidth, renderDialog.RenderHeight));
         return(true);
     });
 }
コード例 #4
0
        public void findAnimations(Entity entity)
        {
            if (playingAnimationState != null)
            {
                playingAnimationState.Playing = false;
                playingAnimationState         = null;
            }
            this.currentEntity = entity;
            listBox.removeAllItems();
            AnimationStateSet animationStateSet = entity.getAllAnimationStates();

            if (animationStateSet != null)
            {
                foreach (AnimationState state in animationStateSet.AnimationStates)
                {
                    listBox.addItem(state.getAnimationName(), new AnimationWindowListItem(state));
                }
            }
        }
コード例 #5
0
        public OpenPropManager(PropEditController propEditController, MyGUIViewHost viewHost)
            : base("Medical.GUI.Editor.OpenPropManager.OpenPropManager.layout", viewHost)
        {
            this.propEditController        = propEditController;
            propEditController.PropOpened += propEditController_PropOpened;
            propEditController.PropClosed += propEditController_PropClosed;

            propList = (MultiListBox)widget.findWidget("propList");
            propList.addColumn("Prop", 50);
            propList.setColumnResizingPolicyAt(0, ResizingPolicy.Fill);

            Button close = (Button)widget.findWidget("close");

            close.MouseButtonClick += new MyGUIEvent(close_MouseButtonClick);

            Button closeAll = (Button)widget.findWidget("closeAll");

            closeAll.MouseButtonClick += new MyGUIEvent(closeAll_MouseButtonClick);

            foreach (ShowPropAction prop in propEditController.OpenProps)
            {
                propList.addItem(prop.PropType, prop);
            }
        }
コード例 #6
0
 void propEditController_PropOpened(PropEditController source, ShowPropAction arg)
 {
     propList.addItem(arg.PropType, arg);
 }