示例#1
0
    void DisplayHeadingToolbar()
    {
        GUIStyle normalButton = new GUIStyle(EditorStyles.toolbarButton);

        normalButton.fixedWidth = 140;
        GUILayout.Space(5);
        EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
        {
            if (GUILayout.Toggle(DisplayMode == WindowModes.Generate, "Generate Documentation", normalButton))
            {
                DoxyfileCreateProgress = -1;
                DisplayMode            = WindowModes.Generate;
            }
            if (GUILayout.Toggle(DisplayMode == WindowModes.Configuration, "Settings/Configuration", normalButton))
            {
                DisplayMode = WindowModes.Configuration;
            }
            if (GUILayout.Toggle(DisplayMode == WindowModes.About, "About", normalButton))
            {
                DoxyfileCreateProgress = -1;
                DisplayMode            = WindowModes.About;
            }
        }
        EditorGUILayout.EndHorizontal();
    }
示例#2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Window" /> Class.
 /// </summary>
 /// <param name="type">The window type.</param>
 /// <param name="start">The start time of thw window.</param>
 /// <param name="length">The window length.</param>
 /// <param name="samplerate">The window samplerate.</param>
 /// <param name="mode">The window mode.</param>
 public Window(WindowTypes type, int start, int length, double samplerate, WindowModes mode)
     : base(CreateWindow(type, mode, length), samplerate, start)
 {
     this.Type        = type;
     this.Mode        = mode;
     this.DisplayName = type + " " + mode + " window, length = " + length;
 }
示例#3
0
        public void SetMode(WindowModes mode)
        {
            Controls.Clear();
            switch (mode)
            {
            case WindowModes.LoadingWindow:
                if (_loadWindow == null)
                {
                    _loadWindow = new LoadWindow();
                }
                Width  = _loadWindow.Width + BorderWidth;
                Height = _loadWindow.Height + BorderHeight;
                Controls.Add(_loadWindow);
                break;

            case WindowModes.TechWindow:
                if (_technologiesWindow == null)
                {
                    _technologiesWindow = new TechnologiesWindow();
                }
                Width  = _technologiesWindow.Width + BorderWidth;
                Height = _technologiesWindow.Height + BorderHeight;
                Controls.Add(_technologiesWindow);
                break;

            case WindowModes.InstallationsWindow:
                if (_installationsWindow == null)
                {
                    _installationsWindow = new InstallationsWindow();
                }
                Width  = _installationsWindow.Width + BorderWidth;
                Height = _installationsWindow.Height + BorderHeight;
                Controls.Add(_installationsWindow);
                break;

            case WindowModes.ComponentsWindow:
                if (_componentsWindow == null)
                {
                    _componentsWindow = new ComponentsWindow();
                }
                Width  = _componentsWindow.Width + BorderWidth;
                Height = _componentsWindow.Height + BorderHeight;
                _componentsWindow.Dock = DockStyle.Fill;
                Controls.Add(_componentsWindow);
                break;
            }
        }
示例#4
0
        private static IReadOnlyList <double> CreateWindow(WindowTypes type, WindowModes mode, int length)
        {
            if (mode == WindowModes.Symmetric)
            {
                return(GetWindow(type, length).ToReadOnlyList());
            }

            if (mode == WindowModes.Causal)
            {
                return(GetHalfWindow(type, length).ToReadOnlyList());
            }

            if (mode == WindowModes.AntiCausal)
            {
                return(GetHalfWindow(type, length).Reverse().ToReadOnlyList());
            }

            throw new Exception();
        }
示例#5
0
        private static int GetDefaultStart(WindowModes mode, int length)
        {
            if (mode == WindowModes.Symmetric)
            {
                return(-(length >> 1));
            }

            if (mode == WindowModes.Causal)
            {
                return(0);
            }

            if (mode == WindowModes.AntiCausal)
            {
                return(-length);
            }

            throw new Exception();
        }
示例#6
0
	void DisplayHeadingToolbar()
	{
		GUIStyle normalButton = new GUIStyle( EditorStyles.toolbarButton );
		normalButton.fixedWidth = 140;
		GUILayout.Space (5);
		EditorGUILayout.BeginHorizontal( EditorStyles.toolbar );
		{
			if( GUILayout.Toggle( DisplayMode == WindowModes.Generate, "Generate Documentation", normalButton ) )
			{
				DoxyfileCreateProgress = -1;
				DisplayMode = WindowModes.Generate;
			}
			if( GUILayout.Toggle( DisplayMode == WindowModes.Configuration, "Settings/Configuration", normalButton ) )
			{
				DisplayMode = WindowModes.Configuration;
			}
			if( GUILayout.Toggle( DisplayMode == WindowModes.About, "About", normalButton ) )
			{
				DoxyfileCreateProgress = -1;
				DisplayMode = WindowModes.About;
			}
		}
		EditorGUILayout.EndHorizontal();
	}	
示例#7
0
 public DaggerfallTradeWindow(IUserInterfaceManager uiManager, WindowModes windowMode, DaggerfallBaseWindow previous = null, Guild guild = null)
     : base(uiManager, previous)
 {
     this.windowMode = windowMode;
     this.guild      = guild;
 }
示例#8
0
 public ModernMenuTradeWindow(IUserInterfaceManager uiManager, DaggerfallBaseWindow previous = null, WindowModes windowMode = WindowModes.Sell, IGuild guild = null)
     : base(uiManager, previous, windowMode, guild)
 {
 }
示例#9
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Window" /> Class. The window will have its maximum at time 0.
 /// </summary>
 /// <param name="type">The window type.</param>
 /// <param name="length">The window length.</param>
 /// <param name="samplerate">The window samplerate.</param>
 /// <param name="mode">The window mode.</param>
 public Window(WindowTypes type, int length, double samplerate, WindowModes mode)
     : this(type, GetDefaultStart(mode, length), length, samplerate, mode)
 {
 }
 public LGSTradeWindowText(IUserInterfaceManager uiManager, DaggerfallBaseWindow previous, WindowModes windowMode, IGuild guild = null)
     : base(uiManager, previous, windowMode, guild)
 {
 }
示例#11
0
 /// <summary>
 /// Set window properties.
 /// This will recreate the window.
 /// </summary>
 /// <param name="title">Window title.</param>
 /// <param name="width">Window width (0 for fullscreen).</param>
 /// <param name="height">Window height (0 for fullscreen).</param>
 /// <param name="windowMode">Window startup mode.</param>
 /// <param name="showCursor">Show / hide cursor.</param>
 public void SetWindowProperties(string title, int width, int height, WindowModes windowMode, bool showCursor)
 {
     _BonEngineBind.BON_Gfx_SetWindowProperties(title, width, height, (int)windowMode, showCursor);
 }
示例#12
0
 public bool Set(WindowModes style)
 {
     return(Set(winHandle, GWL_EXSTYLE, style));
 }
示例#13
0
 public static bool Set(IntPtr handle, int type, WindowModes style)
 {
     return(Set(handle, type, (int)style));
 }
 public AsesinoTradeWindow(IUserInterfaceManager uiManager, DaggerfallBaseWindow previous, WindowModes windowMode, IGuild guild)
     : base(uiManager, previous, windowMode, guild)
 {
 }