Inheritance: StandardMenuUI
コード例 #1
0
ファイル: MenuManager.cs プロジェクト: Yann3D/ROOL
    void Awake()
    {
        m_loginMenu = GameObject.FindObjectOfType<LoginMenu>();
        m_mainMenu = GameObject.FindObjectOfType<MainMenu>();
        m_optionMenu = GameObject.FindObjectOfType<OptionMenu>();
        m_artworkMenu = GameObject.FindObjectOfType<ArtworksMenu>();
        m_creditsMenu = GameObject.FindObjectOfType<CreditsMenu>();
        m_shopMenu = GameObject.FindObjectOfType<ShopMenu>();

        m_singleton = this;
    }
コード例 #2
0
        public void CreateGui()
        {
            dialog                  = new Dialog();
            dialog.Title            = "Login";
            dialog.BorderWidth      = 3;
            dialog.VBox.BorderWidth = 5;
            dialog.HasSeparator     = false;

            Frame  frame = new Frame("Connection");
            string image = Stock.DialogInfo;

            HBox hbox = new HBox(false, 2);

            hbox.BorderWidth = 5;
            hbox.PackStart(new Gtk.Image(image, IconSize.Dialog), true, true, 0);

            Table table = new Table(2, 3, false);

            hbox.PackStart(table);
            table.ColumnSpacing = 4;
            table.RowSpacing    = 4;
            Label label = null;

            label = Label.NewWithMnemonic("_Provider");
            table.Attach(label, 0, 1, 0, 1);
            providerOptionMenu = CreateProviderOptionMenu();
            table.Attach(providerOptionMenu, 1, 2, 0, 1);

            label = Label.NewWithMnemonic("_Connection String");
            table.Attach(label, 0, 1, 1, 2);
            connection_entry = new Entry();
            table.Attach(connection_entry, 1, 2, 1, 2);

            frame.Add(hbox);

            dialog.VBox.PackStart(frame, true, true, 0);

            Button button = null;

            button            = new Button(Stock.Ok);
            button.Clicked   += new EventHandler(Connect_Action);
            button.CanDefault = true;
            dialog.ActionArea.PackStart(button, true, true, 0);
            button.GrabDefault();

            button          = new Button(Stock.Cancel);
            button.Clicked += new EventHandler(Dialog_Cancel);
            dialog.ActionArea.PackStart(button, true, true, 0);
            dialog.Modal = true;

            dialog.ShowAll();
        }
コード例 #3
0
ファイル: Menu.cs プロジェクト: zarnes/Team-9-Gacha-2K19
    public void Back()
    {
        if (OptionMenu.activeSelf)
        {
            OptionMenu.SetActive(false);
            MainMenu.SetActive(true);
        }

        if (CreditsMenu.activeSelf)
        {
            CreditsMenu.SetActive(false);
            MainMenu.SetActive(true);
        }
    }
コード例 #4
0
ファイル: LoginDialog.cs プロジェクト: Zman0169/mono
		public void CreateGui() 
		{
			dialog = new Dialog ();
			dialog.Title = "Login";
			dialog.BorderWidth = 3;
			dialog.VBox.BorderWidth = 5;
			dialog.HasSeparator = false;

			Frame frame = new Frame ("Connection");
			string image = Stock.DialogInfo;
			
			HBox hbox = new HBox (false, 2);
			hbox.BorderWidth = 5;
			hbox.PackStart (new Gtk.Image (image, IconSize.Dialog), true, true, 0);
		
			Table table = new Table (2, 3, false);
			hbox.PackStart (table);
			table.ColumnSpacing = 4;
			table.RowSpacing = 4;
			Label label = null;

			label = Label.NewWithMnemonic ("_Provider");
			table.Attach (label, 0, 1, 0, 1);
			providerOptionMenu = CreateProviderOptionMenu();
			table.Attach (providerOptionMenu, 1, 2, 0, 1);
			
			label = Label.NewWithMnemonic ("_Connection String");
			table.Attach (label, 0, 1, 1, 2);
			connection_entry = new Entry ();
			table.Attach (connection_entry, 1, 2, 1, 2);

			frame.Add (hbox);

			dialog.VBox.PackStart (frame, true, true, 0);

			Button button = null;
			button = new Button(Stock.Ok);
			button.Clicked += new EventHandler (Connect_Action);
			button.CanDefault = true;
			dialog.ActionArea.PackStart (button, true, true, 0);
			button.GrabDefault ();

			button = new Button(Stock.Cancel);
			button.Clicked += new EventHandler (Dialog_Cancel);
			dialog.ActionArea.PackStart (button, true, true, 0);
			dialog.Modal = true;

			dialog.ShowAll ();
		}
コード例 #5
0
ファイル: MainMenu.cs プロジェクト: leontres321/Subsuelo
 void Start()
 {
     _animaciones  = transform.GetComponentsInChildren <Animator>();
     _pos          = 0;
     _pos_anterior = 0;
     try
     {
         _animaciones[_pos].Play("Inicial");
     }
     catch (Exception e)
     {
         Debug.Log(e);
         Debug.Log("Bug: array de animaciones aparece vacio, mas raro aun esta funcion se ejecuta al ocultar el objeto");
     }
     optionMenu = options.GetComponent <OptionMenu>();
 }
コード例 #6
0
ファイル: MenuUI.cs プロジェクト: slient13/CapstoneDesign
    // Start is called before the first frame update
    void Start()
    {
        playerUI     = transform.GetChild(6).gameObject;
        menuBase     = new MenuBase(this, transform.GetChild(2).gameObject);
        confirmSave  = new ConfirmSave(this, transform.GetChild(4).gameObject);
        confirmClose = new ConfirmClose(this, transform.GetChild(3).gameObject);
        optionMenu   = new OptionMenu(this, transform.GetChild(5).gameObject);
        menuBase.lootPanel.SetActive(false);
        confirmSave.lootPanel.SetActive(false);
        confirmClose.lootPanel.SetActive(false);
        optionMenu.lootPanel.SetActive(false);
        // 레이어용.
        MappingInfo mapping = new MappingInfo("MenuUI");

        mapping.Enroll("MenuUI");
    }
コード例 #7
0
    public void StartOptions(OptionPanelSettings settings, ButtonMaster buttonMaster, System.Action endOptionsScreenNotification)
    {
        _buttonMaster = buttonMaster;
        EndOptionsScreenNotification = endOptionsScreenNotification;

        Vector3    thisPosition = new Vector3(0, 0, 0);
        Quaternion quaternion   = new Quaternion(0, 0, 0, 0);

        if (settings != null)
        {
            _menus = settings.OptionMenuList.ToArray();

            for (int i = 0; i < _menus.Length; i++)
            {
                //Set the position and scale of the newly spawned menu items.

                thisPosition.y = (-1f * i) + 0.5f;
                thisPosition.z = 10;

                GameObject menuSelectorClone = (GameObject)Instantiate(
                    _menuSelectorPrefab,
                    thisPosition, //transform.position,
                    quaternion    // transform.rotation
                    );
                menuSelectorClone.transform.localScale = new Vector3(0.015f, 0.015f, 1);
                menuSelectorClone.transform.parent     = gameObject.transform;

                //Attach the script to the menu object so we can manipulate the object programmatically
                MenuSelector mss = menuSelectorClone.GetComponent <MenuSelector>();
                _menus[i].Script = mss;

                OptionMenu om = _menus[i];
                mss.SetMenuOptionText(om.Title);
                mss.SetValueText(om.GetSelectedValue());
                mss.ShowLeftArrow(!om.IsFirstValue());
                mss.ShowRightArrow(!om.IsLastValue());

                mss.SetHighlight(i == 0);
            }

            _menuIndex = 0;
        }

        _panelActive = true;
    }
コード例 #8
0
ファイル: Program.cs プロジェクト: ILikeBananas/BaseTab
        static void Main(string[] args)
        {
            OptionMenu optionMenu = OptionMenu.invalid;

            do
            {
                optionMenu = Menu();

                switch (optionMenu)
                {
                case OptionMenu.ValMax:
                    ChangerValeurMax();
                    break;

                case OptionMenu.NbreColonne:
                    ChangerNombreColonne();
                    break;
                }
            } while (optionMenu != OptionMenu.Quitter);
        }
コード例 #9
0
    public void Start()
    {
        state = StateMachine.START;

        optionMenu = FindObjectOfType <OptionMenu>();

        if (battleSystem == null)
        {
            battleSystem = this;
        }
        else
        {
            Destroy(this);
        }

        StartCoroutine(StartGame());

        state = StateMachine.PLAYERTURN;

        optionMenu.SetSpells(player1.knownSpell);
    }
コード例 #10
0
        private OptionMenu CreateConstraintsOptionMenu()
        {
            Menu menu = new Menu();

            int i = 0;

            foreach (SelectionConstraint c in constraints)
            {
                MenuItem menu_item = new MenuItem(c.Label);
                menu_item.Show();
                constraint_table [menu_item] = i;
                menu_item.Activated         += new EventHandler(HandleSelectionConstraintOptionMenuActivated);

                menu.Append(menu_item);
                i++;
            }

            constraints_option_menu      = new OptionMenu();
            constraints_option_menu.Menu = menu;

            return(constraints_option_menu);
        }
コード例 #11
0
    // メニュー

    public void UpdateOptionMenu(OptionMenu optionMenu)
    {
        if (optionMenu != OptionMenu.Theme)
        {
            this.objectSwitchThemeButton.SetActive(false);
            this.objectTextSwitchThemeHeader.SetActive(false);
            this.objectSamplePanels.SetActive(false);
        }

        if (optionMenu != OptionMenu.Sound)
        {
            this.objectSliderBGMVolume.SetActive(false);
            this.objectSliderSEVolume.SetActive(false);
            this.objectBGMTestButton.SetActive(false);
            this.objectSETestButton.SetActive(false);
        }

        if (optionMenu == OptionMenu.Theme)
        {
            this.textOptionHeader.text = "見た目を変更";
            this.textPreview.text      = "プレビュー";
            this.objectSelectedButtonBackground.transform.position = this.objectThemeMenuButton.transform.position;
            this.objectSwitchThemeButton.SetActive(true);
            this.objectTextSwitchThemeHeader.SetActive(true);
            this.objectSamplePanels.SetActive(true);
        }

        if (optionMenu == OptionMenu.Sound)
        {
            this.textOptionHeader.text = "音量を変更";
            this.textPreview.text      = "サウンドテスト";
            this.objectSelectedButtonBackground.transform.position = this.objectSoundMenuButton.transform.position;
            this.objectSliderBGMVolume.SetActive(true);
            this.objectSliderSEVolume.SetActive(true);
            this.objectBGMTestButton.SetActive(true);
            this.objectSETestButton.SetActive(true);
        }
    }
コード例 #12
0
    private void SetupWidgets()
    {
        Table table = new Table(5, 2, false);

        table.Attach(CreateRightAlignedLabel(Catalog.GetString("Name:")), 0, 1, 0, 1,
                     AttachOptions.Fill, AttachOptions.Fill, 3, 3);
        table.Attach(CreateRightAlignedLabel(Catalog.GetString("Version:")), 0, 1, 1, 2,
                     AttachOptions.Fill, AttachOptions.Fill, 3, 3);
        table.Attach(CreateRightAlignedLabel(Catalog.GetString("Date:")), 0, 1, 2, 3,
                     AttachOptions.Fill, AttachOptions.Fill, 3, 3);
        table.Attach(CreateRightAlignedLabel(Catalog.GetString("Size:")), 0, 1, 3, 4,
                     AttachOptions.Fill, AttachOptions.Fill, 3, 3);
        table.Attach(CreateRightAlignedLabel(Catalog.GetString("Exposure:")), 0, 1, 4, 5,
                     AttachOptions.Fill, AttachOptions.Fill, 3, 3);

        name_label            = new Label();
        name_label.Ellipsize  = Pango.EllipsizeMode.Middle;
        name_label.Justify    = Gtk.Justification.Left;
        name_label.Selectable = true;
        name_label.Xalign     = 0;
        table.Attach(name_label, 1, 2, 0, 1,
                     AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill,
                     3, 0);

        date_label          = AttachLabel(table, 2, name_label);
        size_label          = AttachLabel(table, 3, name_label);
        exposure_info_label = AttachLabel(table, 4, name_label);

        version_option_menu = new OptionMenu();
        table.Attach(version_option_menu, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, 3, 3);

        date_label.Text          = Environment.NewLine;
        exposure_info_label.Text = Environment.NewLine;

        table.ShowAll();

        Add(table);
    }
コード例 #13
0
    public void AddOptionMenuFunctionality(OptionMenu optionMenu)
    {
        optionMenu.fullscreenToggle.onValueChanged.AddListener(
            delegate { optionMenu.FullScreenToggle(); }
            );

        optionMenu.resolutionDropdown.onValueChanged.AddListener(
            delegate { optionMenu.ResolutionChange(); }
            );

        optionMenu.textureQualityDropdown.onValueChanged.AddListener(
            delegate { optionMenu.TextureQualityChange(); }
            );

        optionMenu.antiAliasingDropdown.onValueChanged.AddListener(
            delegate { optionMenu.AntiAliasingChange(); }
            );

        optionMenu.vSyncDropdown.onValueChanged.AddListener(
            delegate { optionMenu.VSyncChange(); }
            );

        optionMenu.musicVolumeSlider.onValueChanged.AddListener(
            delegate { optionMenu.MusicVolumeChange(); }
            );
        optionMenu.closeMenu.onClick.AddListener(
            delegate { DestroyMenu(optionMenu); }
            );
        optionMenu.applySettings.onClick.AddListener(
            delegate { optionMenu.ApplySettings(); }
            );
        optionMenu.applySettings.onClick.AddListener(
            delegate { ValidateAndCreateMenuPrefab(pauseMenuPrefab); }
            );
        optionMenu.applySettings.onClick.AddListener(
            delegate { DestroyMenu(optionMenu); }
            );
    }
コード例 #14
0
		public PropertyEditorOptionMenu (string key, OptionMenu menu, Type enum_type, int[] enum_values) : base (key, menu, enum_type, enum_values)
		{
		}
コード例 #15
0
    protected override void PageSwitchSetting(bool bActive, bool bBack)
    {
        base.PageSwitchSetting(bActive, bBack);

        //--------------------------------
        // 以下は有効になったタイミングでの処理なので、
        // フェードアウト指示の場合にはスルー
        //--------------------------------
        if (bActive == false)
        {
            return;
        }

        //--------------------------------
        // 戻り処理の場合は再構築スルー
        //--------------------------------
        if (bBack == true)
        {
            return;
        }

        //ページ初期化処理
        if (m_OptionMenu == null)
        {
            m_OptionMenu = GetComponentInChildren <OptionMenu>();
            m_OptionMenu.SetPositionAjustStatusBar(new Vector2(0, 4), new Vector2(-40, -372));

            LocalSaveOption cOption = LocalSaveManager.Instance.LoadFuncOption();

            string cMessageON  = GameTextUtil.GetText("option_display7");
            string cMessageOFF = GameTextUtil.GetText("option_display16");
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.BGM, GameTextUtil.GetText("option_display1"), cMessageON, (cOption.m_OptionBGM == (int)LocalSaveDefine.OptionBGM.ON));
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.SE, GameTextUtil.GetText("option_display2"), cMessageON, (cOption.m_OptionSE == (int)LocalSaveDefine.OptionSE.ON));
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.GUIDE, GameTextUtil.GetText("option_display3"), cMessageON, (cOption.m_OptionGuide == (int)LocalSaveDefine.OptionGuide.ON));
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.SPEED, GameTextUtil.GetText("option_display6"), cMessageOFF, (cOption.m_OptionSpeed == (int)LocalSaveDefine.OptionSpeed.ON));
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.SKILL_TURN, GameTextUtil.GetText("battle_text01"), cMessageOFF, (cOption.m_OptionBattleSkillTurn == (int)LocalSaveDefine.OptionBattleSkillTurn.ON));
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.CONFIRM_AS, GameTextUtil.GetText("option_display17"), cMessageON, (cOption.m_OptionConfirmAS == (int)LocalSaveDefine.OptionConfirmAS.ON));
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.SKILL_COST, GameTextUtil.GetText("battle_text02"), cMessageOFF, (cOption.m_OptionBattleSkillCost == (int)LocalSaveDefine.OptionBattleSkillCost.ON));
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.BATTLE_ACHIEVE, GameTextUtil.GetText("battle_text03"), cMessageOFF, (cOption.m_OptionBattleAchieve == (int)LocalSaveDefine.OptionBattleAchieve.ON));
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.QUEST_END_TIPS, GameTextUtil.GetText("option_display18"), cMessageON, (cOption.m_OptionQuestEndTips == (int)LocalSaveDefine.OptionQuestEndTips.ON));

            m_OptionMenu.AddSpace().SetHight(10); // スペース
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.NONE, GameTextUtil.GetText("option_display19"), null, false).SetShowSwitch(false);
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.AUTO_PLAY_STOP_BOSS, GameTextUtil.GetText("option_display20"), cMessageON, (cOption.m_OptionAutoPlayStopBoss == (int)LocalSaveDefine.OptionAutoPlayStopBoss.ON)).SetIndent(1);
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.AUTO_PLAY_USE_AS, GameTextUtil.GetText("option_display21"), cMessageON, (cOption.m_OptionAutoPlayUseAS == (int)LocalSaveDefine.OptionAutoPlayUseAS.ON)).SetIndent(1);

            m_OptionMenu.AddSpace().SetHight(10); // スペース

            //------------------------------------
            // 通知設定
            //------------------------------------
            bool bNotification = (cOption.m_OptionNotification == (int)LocalSaveDefine.OptionNotification.ON);
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.NOTIFICATION, GameTextUtil.GetText("option_display8"), cMessageON, bNotification);
            if (bNotification == false)
            {
                // アプリケーションの通知設定がOFFの場合は、他の通知設定もOFFにする
                cOption.m_NotificationEvent      = (int)LocalSaveDefine.OptionNotificationEvent.OFF;
                cOption.m_NotificationStaminaMax = (int)LocalSaveDefine.OptionNotificationStaminaMax.OFF;
            }
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.NOT_EVENT, GameTextUtil.GetText("option_display10"), cMessageON, (cOption.m_NotificationEvent == (int)LocalSaveDefine.OptionNotificationEvent.ON)).SetIndent(1);
            m_OptionMenu.AddItem().setup(OptionMenu.ItemType.NOT_STAMINA, GameTextUtil.GetText("option_display11"), cMessageON, (cOption.m_NotificationStaminaMax == (int)LocalSaveDefine.OptionNotificationStaminaMax.ON)).SetIndent(1);

            //------------------------------------
            // ボタンのイベント
            //------------------------------------
            for (int i = 0; i < (int)OptionMenu.ItemType.MAX; i++)
            {
                OptionMenuItem item = m_OptionMenu.GetOptionItem((OptionMenu.ItemType)i);
                if (item != null)
                {
                    item.DidSelectItem = OnSelect;
                }
            }

            LocalSaveManager.Instance.SaveFuncOption(cOption); // 状態を保存する
        }
    }
コード例 #16
0
		public PropertyEditorOptionMenu (string key, OptionMenu menu) : base (key, menu)
		{
		}
コード例 #17
0
    private void ApplySettings()
    {
        OptionMenu optionMenu = new OptionMenu();

        optionMenu.SetFilter(filterIndex);
    }
コード例 #18
0
        public static void Main(string[] args)
        {
            var menu = new OptionMenu();

            menu.ShowOptionMenu();
        }
コード例 #19
0
	private void SetupWidgets ()
	{
		Table table = new Table (5, 2, false);

		table.Attach (CreateRightAlignedLabel (Catalog.GetString ("Name:")), 0, 1, 0, 1,
			      AttachOptions.Fill, AttachOptions.Fill, 3, 3);
		table.Attach (CreateRightAlignedLabel (Catalog.GetString ("Version:")), 0, 1, 1, 2,
			      AttachOptions.Fill, AttachOptions.Fill, 3, 3);
		table.Attach (CreateRightAlignedLabel (Catalog.GetString ("Date:")), 0, 1, 2, 3,
			      AttachOptions.Fill, AttachOptions.Fill, 3, 3);
		table.Attach (CreateRightAlignedLabel (Catalog.GetString ("Size:")), 0, 1, 3, 4,
			      AttachOptions.Fill, AttachOptions.Fill, 3, 3);
		table.Attach (CreateRightAlignedLabel (Catalog.GetString ("Exposure:")), 0, 1, 4, 5,
			      AttachOptions.Fill, AttachOptions.Fill, 3, 3);

		name_label = new Label ();
		name_label.Ellipsize = Pango.EllipsizeMode.Middle;
		name_label.Justify = Gtk.Justification.Left;
		name_label.Selectable = true;
		name_label.Xalign = 0;
		table.Attach (name_label, 1, 2, 0, 1,
			      AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill,
			      3, 0);
		
		date_label = AttachLabel (table, 2, name_label);
		size_label = AttachLabel (table, 3, name_label);
		exposure_info_label = AttachLabel (table, 4, name_label);

		version_option_menu = new OptionMenu ();
		table.Attach (version_option_menu, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, 3, 3);

		date_label.Text = Environment.NewLine;
		exposure_info_label.Text = Environment.NewLine;

		table.ShowAll ();

		Add (table);
	}
コード例 #20
0
ファイル: LoginDialog.cs プロジェクト: Zman0169/mono
		public OptionMenu CreateProviderOptionMenu() 
		{
			OptionMenu optionMenu = new OptionMenu();
			
			Menu providerMenu = new Menu ();
			MenuItem menuItem;
			
			if (sqlSharp.dbProvider == null)
				providerSelected = 0;

			for(int i = 0; i < sqlSharp.providerList.Count; i++) {
				DbProvider p = sqlSharp.providerList[i];
				menuItem = new MenuItem(p.Name);
				providerMenu.Append (menuItem);
				if (sqlSharp.dbProvider != null)
					if (sqlSharp.dbProvider.Name.Equals(p.Name))
						providerSelected = i;
			}	
			
			optionMenu.Menu = providerMenu;
			optionMenu.Changed += new EventHandler (provider_changed_cb);

			optionMenu.SetHistory ((uint) providerSelected);

			return optionMenu;
		}
コード例 #21
0
 /// <summary>
 /// Handles when the Options button is pressed by opening the Options UI element
 /// </summary>
 public void HandleOptions()
 {
     OptionMenu.HandleOpen();
 }
コード例 #22
0
 //Sets variables accordingly
 void Start()
 {
     om        = FindObjectOfType <OptionMenu>();
     selfIndex = nextButtonIndex++;
 }
コード例 #23
0
ファイル: MainMenu.cs プロジェクト: Cesea/Sweeper
 public void OnOptionButtonPressed()
 {
     OptionMenu.Show();
 }
コード例 #24
0
ファイル: InfoBox.cs プロジェクト: drorganvidez/guadalinex-v6
        private void SetupWidgets()
        {
            histogram_expander            = new Expander(Catalog.GetString("Histogram"));
            histogram_expander.Activated += delegate(object sender, EventArgs e) {
                ContextSwitchStrategy.SetHistogramVisible(Context, histogram_expander.Expanded);
                UpdateHistogram();
            };
            histogram_image = new Gtk.Image();
            histogram       = new Histogram();
            histogram_expander.Add(histogram_image);

            Window window = MainWindow.Toplevel.Window;

            Gdk.Color c = window.Style.Backgrounds [(int)Gtk.StateType.Active];
            histogram.RedColorHint        = (byte)(c.Red / 0xff);
            histogram.GreenColorHint      = (byte)(c.Green / 0xff);
            histogram.BlueColorHint       = (byte)(c.Blue / 0xff);
            histogram.BackgroundColorHint = 0xff;

            Add(histogram_expander);

            info_expander            = new Expander(Catalog.GetString("Image Information"));
            info_expander.Activated += delegate(object sender, EventArgs e) {
                ContextSwitchStrategy.SetInfoBoxVisible(Context, info_expander.Expanded);
            };

            Table info_table = new Table(7, 2, false);

            info_table.BorderWidth = 0;

            string name_pre  = "<b>";
            string name_post = "</b>";

            name_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Name") + name_post);
            info_table.Attach(name_label, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            version_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Version") + name_post);
            info_table.Attach(version_label, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            date_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Date") + name_post + Environment.NewLine);
            info_table.Attach(date_label, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            size_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Size") + name_post);
            info_table.Attach(size_label, 0, 1, 3, 4, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            default_exposure_string = name_pre + Catalog.GetString("Exposure") + name_post;
            exposure_label          = CreateRightAlignedLabel(default_exposure_string);
            info_table.Attach(exposure_label, 0, 1, 4, 5, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            rating_label = CreateRightAlignedLabel(name_pre + Catalog.GetString("Rating") + name_post);
            info_table.Attach(rating_label, 0, 1, 5, 6, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
            rating_label.Visible = false;

            name_value_label            = new Label();
            name_value_label.Ellipsize  = Pango.EllipsizeMode.Middle;
            name_value_label.Justify    = Gtk.Justification.Left;
            name_value_label.Selectable = true;
            name_value_label.Xalign     = 0;
            info_table.Attach(name_value_label, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill, 3, 0);

            date_value_label     = AttachLabel(info_table, 2, name_value_label);
            size_value_label     = AttachLabel(info_table, 3, name_value_label);
            exposure_value_label = AttachLabel(info_table, 4, name_value_label);

            version_option_menu = new OptionMenu();
            info_table.Attach(version_option_menu, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            date_value_label.Text     = Environment.NewLine;
            exposure_value_label.Text = Environment.NewLine;

            Gtk.Alignment rating_align = new Gtk.Alignment(0, 0, 0, 0);
            info_table.Attach(rating_align, 1, 2, 5, 6, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

            rating_view          = new RatingSmall();
            rating_view.Visible  = false;
            rating_view.Changed += HandleRatingChanged;
            rating_align.Add(rating_view);

            tag_view = new TagView(MainWindow.ToolTips);
            info_table.Attach(tag_view, 0, 2, 6, 7, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
            tag_view.Show();

            info_table.ShowAll();

            info_expander.Add(info_table);
            Add(info_expander);
            rating_label.Visible = show_rating;
            rating_view.Visible  = show_rating;
        }
コード例 #25
0
    OptionPanelSettings GetOptionsSettings()
    {
        List <OptionMenu> bmList = new List <OptionMenu>();

        /*
         * List<string> modeValues = new List<string>()
         * {
         *  OPTION_MENU_MODE_VALUE_PVP,
         *  OPTION_MENU_MODE_VALUE_BOSS,
         * };
         * OptionMenu bmMode = new OptionMenu(
         *  OPTION_MENU_MODE,
         *  modeValues.ToArray(),
         *  modeValues[0]
         *  );
         *
         * bmList.Add(bmMode);
         */

        List <string> roundValues = new List <string>()
        {
            "1",
            "3",
            "5",
            "7"
        };

        OptionMenu omRounds = new OptionMenu(
            OPTION_MENU_ROUNDS,
            roundValues.ToArray(),
            _roundCount.ToString()
            );

        bmList.Add(omRounds);

        List <string> healthValues = new List <string>();

        for (int i = 1; i <= 20; i++)
        {
            healthValues.Add(
                Mathf.FloorToInt(PlayerMaximumDamagePerAttack * i).ToString()
                );
        }

        //Populate default from currently selected value.

        OptionMenu omHealth = new OptionMenu(
            OPTION_MENU_PLAYER_HEALTH,
            healthValues.ToArray(),
            Mathf.FloorToInt(_pvpStartHealth).ToString()
            );

        bmList.Add(omHealth);

        List <string> volumeValues = new List <string>();

        for (int i = 1; i <= 10; i++)
        {
            volumeValues.Add(i.ToString());
        }

        //Populate default from currently selected value.

        OptionMenu omMusicVolume = new OptionMenu(
            OPTION_MENU_MUSIC_VOLUME,
            volumeValues.ToArray(),
            Mathf.FloorToInt(_musicVolume * 10).ToString()
            );

        bmList.Add(omMusicVolume);

        /*
         * List<string> critValues = new List<string>()
         * {
         *  "0%",
         *  "5%",
         *  "10%",
         *  "15%",
         *  "20%",
         *  "25%"
         * };
         * OptionMenu omCrit = new OptionMenu(
         *  OPTION_MENU_CRIT_CHANCE,
         *  critValues.ToArray(),
         *  critValues[0]
         *  );
         *
         * bmList.Add(omCrit);
         */

        OptionPanelSettings ops = new OptionPanelSettings(bmList);

        return(ops);
    }
コード例 #26
0
ファイル: attorney.master.cs プロジェクト: jehan2898/root
 protected void Page_Load(object sender, EventArgs e)
 {
     attorney.log.Debug("start Master Page Page_Load()");
     if (base.Application["Error"] != null)
     {
         base.Response.Write(base.Application["Error"].ToString());
     }
     try
     {
         this.objAppSettings = (ApplicationSettings_BO)base.Application["OBJECT_APP_SETTINGS"];
         if (this.objAppSettings == null)
         {
             this.objAppSettings = new ApplicationSettings_BO();
             base.Application["OBJECT_APP_SETTINGS"] = this.objAppSettings;
         }
         string parameterValue = this.objAppSettings.getParameterValue("site_logo").ParameterValue;
         this.ImageButton1.ImageUrl = parameterValue;
         XmlConfigurator.Configure();
         this.c_objUser = new DAO_User();
         string str = "";
         str = (base.Request.RawUrl.IndexOf("?") <= 0 ? base.Request.RawUrl : base.Request.RawUrl.Substring(0, base.Request.RawUrl.IndexOf("?")));
         this.c_objUser.UserID = (str.Substring(str.LastIndexOf("/") + 1, str.LastIndexOf(".aspx") - str.LastIndexOf("/") + 4));
         string   str1      = base.Request.RawUrl.ToString();
         string[] strArrays = str1.Split(new char[] { '?' });
         if ((int)strArrays.Length > 1 && strArrays[1].Equals("Menuflag=true"))
         {
             if (!strArrays[0].Contains("/AJAX Pages/Bill_Sys_OutScheduleReport.aspx"))
             {
                 this.c_objUser.UserID = "Bill_Sys_VerificationSent_PrintPOM.aspx";
             }
             else
             {
                 this.c_objUser.UserID = "Bill_Sys_OutScheduleReport.aspx?Menuflag=true";
             }
         }
         if (this.c_objUser.UserID == "Bill_Sys_ReferralBillTransaction.aspx")
         {
             this.c_objUser.UserID = "Bill_Sys_BillTransaction.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_ReferringDoctor.aspx")
         {
             this.c_objUser.UserID = "Bill_Sys_Doctor.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_ChangePasswordMaster.aspx")
         {
             this.c_objUser.UserID = "Bill_Sys_UserMaster.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_BillSearch.aspx" && base.Request.QueryString["fromCase"] != null)
         {
             this.c_objUser.UserID = "atnotes.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_BillTransaction.aspx")
         {
             this.c_objUser.UserID = "atnotes.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_NewPaymentReport.aspx" && base.Request.QueryString["fromCase"] != null)
         {
             this.c_objUser.UserID = "atnotes.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_PaymentTransactions.aspx")
         {
             this.c_objUser.UserID = "atnotes.aspx";
         }
         if (this.c_objUser.UserID.Contains("Bill_Sys_IM_"))
         {
             this.c_objUser.UserID = "Bill_Sys_IM_HistoryOfPresentIillness.aspx";
         }
         if (this.c_objUser.UserID.Contains("Bill_Sys_FUIM_"))
         {
             this.c_objUser.UserID = "Bill_Sys_FUIM_StartExamination.aspx";
         }
         if (this.c_objUser.UserID.Contains("Bill_Sys_AC_"))
         {
             this.c_objUser.UserID = "Bill_Sys_AC_AccuReEval.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_MiscPaymentReport.aspx" && base.Request.QueryString["fromCase"] != null)
         {
             this.c_objUser.UserID = "atnotes.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_Misc_Payment.aspx")
         {
             this.c_objUser.UserID = "atnotes.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_Invoice.aspx")
         {
             this.c_objUser.UserID = "atnotes.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_PatientBillingSummary.aspx")
         {
             this.c_objUser.UserID = "atnotes.aspx";
         }
         if (this.c_objUser.UserID == "Bill_Sys_Invoice_Report.aspx")
         {
             if (base.Request.QueryString["fromCase"] == "False")
             {
                 this.c_objUser.UserID = "Bill_Sys_BillSearch.aspx";
             }
             else
             {
                 this.c_objUser.UserID = "atnotes.aspx";
             }
         }
         if (this.c_objUser.UserID == "TemplateManager.aspx")
         {
             if (base.Request.QueryString["fromCase"] != "true")
             {
                 this.c_objUser.UserID = "atnotes.aspx";
             }
             else
             {
                 this.c_objUser.UserID = "Bill_Sys_CheckOut.aspx";
             }
         }
         //--Add comment--//
         if (this.c_objUser.UserID == "atcasedetails.aspx")
         {
             this.c_objUser.UserID = "Bill_Sys_CaseDetails.aspx";
         }
         //---end---//
         if (this.c_objUser.UserID == "Bill_Sys_PatientSearch.aspx")
         {
             this.c_objUser.UserID = "Bill_Sys_CheckOut.aspx";
         }
         SpecialityPDFDAO specialityPDFDAO = new SpecialityPDFDAO();
         if (base.Session["SPECIALITY_PDF_OBJECT"] == null)
         {
             specialityPDFDAO = null;
         }
         else
         {
             specialityPDFDAO = (SpecialityPDFDAO)base.Session["SPECIALITY_PDF_OBJECT"];
         }
         this.c_objUser.UserRoleID = (((Bill_Sys_UserObject)base.Session["USER_OBJECT"]).SZ_USER_ROLE);
         ArrayList arrayLists = new ArrayList();
         arrayLists.Add(str);
         OptionMenu optionMenu = new OptionMenu(this.c_objUser);
         optionMenu.Initialize(this.problue, (Bill_Sys_BillingCompanyObject)base.Session["BILLING_COMPANY_OBJECT"], (Bill_Sys_UserObject)base.Session["USER_OBJECT"], (Bill_Sys_SystemObject)base.Session["SYSTEM_OBJECT"], this.c_objUser, specialityPDFDAO, arrayLists);
         this.problue.AllExpanded  = true;
         this.problue.AutoPostBack = false;
         if (!((Bill_Sys_BillingCompanyObject)base.Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY)
         {
             // this.lnkScheduleReport.HRef = "Bill_Sys_ScheduleEvent.aspx?TOp=true";
         }
         else
         {
             // this.lnkScheduleReport.HRef = "AJAX Pages/Bill_Sys_AppointPatientEntry.aspx";
         }
         this.ShowAssignedLinks(this.c_objUser.UserRoleID);
         attorney.log.Debug("End Master Page_Load()");
         DataSet dataSet = new DataSet();
         Bill_Sys_ProcedureCode_BO billSysProcedureCodeBO = new Bill_Sys_ProcedureCode_BO();
         dataSet = billSysProcedureCodeBO.Get_Sys_Key("SS00040", ((Bill_Sys_BillingCompanyObject)base.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
         if (dataSet.Tables.Count > 0 && dataSet.Tables[0].Rows.Count > 0 && dataSet.Tables[0].Rows[0][0].ToString() == "0")
         {
             this.lnkshedulevisits.Visible = false;
         }
         if (((Bill_Sys_BillingCompanyObject)base.Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID == "CO000000000000000114")
         {
             // this.lnkScheduleReport.Visible = false;
             this.lnkQuickSearch.Visible = false;
             this.A2.Visible             = false;
         }
     }
     catch (Exception exception1)
     {
         Exception exception = exception1;
         attorney.log.Debug(string.Concat("attorney. Method - Page_Load : ", exception.Message.ToString()));
         attorney.log.Debug(string.Concat("attorney. Method - Page_Load : ", exception.StackTrace.ToString()));
         if (exception.InnerException != null)
         {
             attorney.log.Debug(string.Concat("attorney. Method - Page_Load : ", exception.InnerException.Message.ToString()));
             attorney.log.Debug(string.Concat("attorney. Method - Page_Load : ", exception.InnerException.StackTrace.ToString()));
         }
     }
 }
コード例 #27
0
		private void SetupWidgets ()
		{

			histogram_expander = new Expander (Catalog.GetString ("Histogram"));
			histogram_expander.Activated += delegate (object sender, EventArgs e) { 
				ContextSwitchStrategy.SetHistogramVisible (Context, histogram_expander.Expanded);
				UpdateHistogram ();
			};
			histogram_image = new Gtk.Image ();
			histogram = new Histogram ();
			histogram_expander.Add (histogram_image);

			Window window = MainWindow.Toplevel.Window;
			Gdk.Color c = window.Style.Backgrounds [(int)Gtk.StateType.Active];
			histogram.RedColorHint = (byte) (c.Red / 0xff);
			histogram.GreenColorHint = (byte) (c.Green / 0xff);
			histogram.BlueColorHint = (byte) (c.Blue / 0xff);
			histogram.BackgroundColorHint = 0xff;

			Add (histogram_expander);

			info_expander = new Expander (Catalog.GetString ("Image Information"));
			info_expander.Activated += delegate (object sender, EventArgs e) {
				ContextSwitchStrategy.SetInfoBoxVisible (Context, info_expander.Expanded);
			};

			Table info_table = new Table (7, 2, false);
			info_table.BorderWidth = 0;
	
			string name_pre = "<b>";
			string name_post = "</b>";

			name_label = CreateRightAlignedLabel (name_pre + Catalog.GetString ("Name") + name_post);
			info_table.Attach (name_label, 0, 1, 0, 1, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

			version_label = CreateRightAlignedLabel (name_pre + Catalog.GetString ("Version") + name_post); 
			info_table.Attach (version_label, 0, 1, 1, 2, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

			date_label = CreateRightAlignedLabel (name_pre + Catalog.GetString ("Date") + name_post + Environment.NewLine);
			info_table.Attach (date_label, 0, 1, 2, 3, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

			size_label = CreateRightAlignedLabel (name_pre + Catalog.GetString ("Size") + name_post);
			info_table.Attach (size_label, 0, 1, 3, 4, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);

			default_exposure_string = name_pre + Catalog.GetString ("Exposure") + name_post;
			exposure_label = CreateRightAlignedLabel (default_exposure_string);
			info_table.Attach (exposure_label, 0, 1, 4, 5, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
			
			rating_label = CreateRightAlignedLabel (name_pre + Catalog.GetString ("Rating") + name_post);
			info_table.Attach (rating_label, 0, 1, 5, 6, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
			rating_label.Visible = false;

			name_value_label = new Label ();
			name_value_label.Ellipsize = Pango.EllipsizeMode.Middle;
			name_value_label.Justify = Gtk.Justification.Left;
			name_value_label.Selectable = true;
			name_value_label.Xalign = 0;
			info_table.Attach (name_value_label, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand, AttachOptions.Fill, 3, 0);
			
			date_value_label = AttachLabel (info_table, 2, name_value_label);
			size_value_label = AttachLabel (info_table, 3, name_value_label);
			exposure_value_label = AttachLabel (info_table, 4, name_value_label);
	
			version_option_menu = new OptionMenu ();
			info_table.Attach (version_option_menu, 1, 2, 1, 2, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
	
			date_value_label.Text = Environment.NewLine;
			exposure_value_label.Text = Environment.NewLine;

			Gtk.Alignment rating_align = new Gtk.Alignment( 0, 0, 0, 0);
			info_table.Attach (rating_align, 1, 2, 5, 6, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
			
			rating_view = new RatingSmall ();
			rating_view.Visible = false;
			rating_view.Changed += HandleRatingChanged;
			rating_align.Add (rating_view);

			tag_view = new TagView (MainWindow.ToolTips);
			info_table.Attach (tag_view, 0, 2, 6, 7, AttachOptions.Fill, AttachOptions.Fill, TABLE_XPADDING, TABLE_YPADDING);
			tag_view.Show ();

			info_table.ShowAll ();
	
			info_expander.Add (info_table);
			Add (info_expander);
			rating_label.Visible = show_rating;
			rating_view.Visible = show_rating;
		}
コード例 #28
0
		public PropertyEditorOptionMenu (string key, OptionMenu menu, Type enum_type) : base (key, menu, enum_type)
		{
		}
コード例 #29
0
        public void EnterState()
        {
            var window = new OptionMenu();

            Program.MainWindow.SwitchScreen(window);
        }
コード例 #30
0
ファイル: MainMenu.cs プロジェクト: rtq9731/School_2nd_Unity
 public void OnOptionPressed()
 {
     OptionMenu.Open();
 }
コード例 #31
0
	private OptionMenu CreateConstraintsOptionMenu ()
	{
		Menu menu = new Menu ();

		int i = 0;
		foreach (SelectionConstraint c in constraints) {
			MenuItem menu_item = new MenuItem (c.Label);
			menu_item.Show ();
			constraint_table [menu_item] = i;
			menu_item.Activated += new EventHandler (HandleSelectionConstraintOptionMenuActivated);

			menu.Append (menu_item);
			i ++;
		}

		constraints_option_menu = new OptionMenu ();
		constraints_option_menu.Menu = menu;

		return constraints_option_menu;
	}
コード例 #32
0
ファイル: OptionMenu.cs プロジェクト: psymchoi/FourDoor
 void Awake()
 {
     _uniqueInstance = this;
 }
コード例 #33
0
ファイル: TestMenus.cs プロジェクト: shana/gtk-sharp
        public static Gtk.Window Create()
        {
            window = new Window("Menus");

            AccelGroup accel_group = new AccelGroup();

            window.AddAccelGroup(accel_group);

            VBox box1 = new VBox(false, 0);

            window.Add(box1);

            MenuBar menubar = new MenuBar();

            box1.PackStart(menubar, false, false, 0);

            Menu     menu     = Create_Menu(2, true);
            MenuItem menuitem = new MenuItem("foo");

            menuitem.Submenu = menu;
            menubar.Append(menuitem);

            menuitem         = new MenuItem("bar");
            menuitem.Submenu = Create_Menu(3, true);
            menubar.Append(menuitem);

            Image image = new Image(Stock.Help, IconSize.Menu);

            menuitem = new ImageMenuItem("Help");
            ((ImageMenuItem)menuitem).Image = image;
            menuitem.Submenu        = Create_Menu(4, true);
            menuitem.RightJustified = true;
            menubar.Append(menuitem);

            menubar = new MenuBar();
            box1.PackStart(menubar, false, true, 0);

            menu = Create_Menu(2, true);

            menuitem         = new MenuItem("Second menu bar");
            menuitem.Submenu = menu;
            menubar.Append(menuitem);

            VBox box2 = new VBox(false, 10);

            box2.BorderWidth = 10;
            box1.PackStart(box2, true, true, 0);

            menu            = Create_Menu(1, false);
            menu.AccelGroup = accel_group;

            menu.Append(new SeparatorMenuItem());

            menuitem = new CheckMenuItem("Accelerate Me");
            menu.Append(menuitem);
            menuitem.AddAccelerator("activate", accel_group, 0xFFBE, 0, AccelFlags.Visible);

            menuitem = new CheckMenuItem("Accelerator locked");
            menu.Append(menuitem);
            menuitem.AddAccelerator("activate", accel_group, 0xFFBF, 0, AccelFlags.Visible | AccelFlags.Locked);

            menuitem = new CheckMenuItem("Accelerator Frozen");
            menu.Append(menuitem);
            menuitem.AddAccelerator("activate", accel_group, 0xFFBF, 0, AccelFlags.Visible);
            menuitem.AddAccelerator("activate", accel_group, 0xFFC0, 0, AccelFlags.Visible);

            OptionMenu option_menu = new OptionMenu();

            option_menu.Menu = menu;
            option_menu.SetHistory(3);
            box2.PackStart(option_menu, true, true, 0);

            box1.PackStart(new HSeparator(), false, false, 0);

            box2             = new VBox(false, 10);
            box2.BorderWidth = 10;
            box1.PackStart(box2, false, true, 0);

            Button close_button = new Button(Stock.Close);

            close_button.Clicked += new EventHandler(Close_Button);
            box2.PackStart(close_button, true, true, 0);

            close_button.CanDefault = true;
            close_button.GrabDefault();

            window.ShowAll();
            return(window);
        }
コード例 #34
0
 public PropertyEditorOptionMenu(string key, OptionMenu menu, Type enum_type) : base(key, menu, enum_type)
 {
 }
コード例 #35
0
ファイル: GameDefinition.cs プロジェクト: Ian-Huang/ColorWord
 /// <summary>
 /// Get the game option menu string.
 /// </summary>
 /// <param name="option">Which option.</param>
 /// <returns>Option String.</returns>
 public static string GetOptionMenuString(OptionMenu option)
 {
     switch (option)
     {
         case OptionMenu.None:
             return null;
         case OptionMenu.ReturnCheck:
             return GameDefinition.ReturnCheckString;
         case OptionMenu.Tutorials:
             return GameDefinition.TutorialsString;
         case OptionMenu.Option:
             return GameDefinition.OptionString;
         case OptionMenu.ReturnTitle:
             return GameDefinition.ReturnTitleString;
         case OptionMenu.Exit:
             return GameDefinition.ExitString;
         default:
             return null;
     }
 }
コード例 #36
0
ファイル: Menu.cs プロジェクト: zarnes/Team-9-Gacha-2K19
 public void Options()
 {
     MainMenu.SetActive(false);
     OptionMenu.SetActive(true);
 }
コード例 #37
0
ファイル: MainMenu.xaml.cs プロジェクト: MeuLee/Casino
        private void button_Options_Click(object sender, RoutedEventArgs e)
        {
            OptionMenu options = new OptionMenu();

            options.Show();
        }
コード例 #38
0
    protected void Page_Load(object sender, EventArgs e)
    {//Logging Start
        string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url);

        using (Utils utility = new Utils())
        {
            utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod());
        }


        log.Debug("start Master Page Page_Load()");
        if (Application["Error"] != null)
        {
            Response.Write(Application["Error"].ToString());
        }
        try
        {
            objAppSettings = (mbs.ApplicationSettings.ApplicationSettings_BO)Application["OBJECT_APP_SETTINGS"];
            if (objAppSettings == null)
            {
                objAppSettings = new mbs.ApplicationSettings.ApplicationSettings_BO();
                Application["OBJECT_APP_SETTINGS"] = objAppSettings;
            }
            string sitePath = ((mbs.ApplicationSettings.ApplicationSettings_DO)objAppSettings.getParameterValue(mbs.ApplicationSettings.ApplicationSettings_BO.KEY_SITE_PATH)).ParameterValue;
            ImageButton1.ImageUrl = sitePath;
            log4net.Config.XmlConfigurator.Configure();
            //if (!IsPostBack)
            //{
            c_objUser = new DAO_User();
            string _url = "";
            if (Request.RawUrl.IndexOf("?") > 0)
            {
                _url = Request.RawUrl.Substring(0, Request.RawUrl.IndexOf("?"));
            }
            else
            {
                _url = Request.RawUrl;
            }
            c_objUser.UserID = _url.Substring(_url.LastIndexOf("/") + 1, (_url.LastIndexOf(".aspx") - _url.LastIndexOf("/")) + 4);
            //if (c_objUser.UserID == "Bill_Sys_BillingDoctor.aspx")
            //{
            //    c_objUser.UserID = "Bill_Sys_Doctor.aspx";
            //}

            //if (_url.Contains("AJAX Pages")) { A1.Attributes.Add("onclick", "javascript:OpenAjaxTicket();"); } else A1.Attributes.Add("onclick", "javascript:OpenTicket();");

            string   outschedule    = Request.RawUrl.ToString();
            string[] arroutschedule = outschedule.Split('?');

            if (arroutschedule.Length > 1)
            {
                if (arroutschedule[1].Equals("Menuflag=true"))
                {
                    //TUSHAR:-There Are Two I_PARENT_ID FOR Bill_Sys_OutScheduleReport.aspx So I Have To Check it With Menu Link.
                    if (arroutschedule[0].Contains("/AJAX Pages/Bill_Sys_OutScheduleReport.aspx"))
                    {
                        c_objUser.UserID = "Bill_Sys_OutScheduleReport.aspx?Menuflag=true";
                    }
                    else
                    {
                        c_objUser.UserID = "Bill_Sys_VerificationSent_PrintPOM.aspx";
                    }
                    //End Code
                }
            }
            if (c_objUser.UserID == "Bill_Sys_ReferralBillTransaction.aspx")
            {
                c_objUser.UserID = "Bill_Sys_BillTransaction.aspx";
            }
            if (c_objUser.UserID == "Bill_Sys_ReferringDoctor.aspx")
            {
                c_objUser.UserID = "Bill_Sys_Doctor.aspx";
            }
            if (c_objUser.UserID == "Bill_Sys_ChangePasswordMaster.aspx")
            {
                c_objUser.UserID = "Bill_Sys_UserMaster.aspx";
            }
            if (c_objUser.UserID == "Bill_Sys_BillSearch.aspx")
            {
                if (Request.QueryString["fromCase"] != null)
                {
                    c_objUser.UserID = "Bill_Sys_Notes.aspx";
                }
            }
            if (c_objUser.UserID == "Bill_Sys_BillTransaction.aspx")
            {
                c_objUser.UserID = "Bill_Sys_Notes.aspx";
            }

            if (c_objUser.UserID == "Bill_Sys_NewPaymentReport.aspx")
            {
                if (Request.QueryString["fromCase"] != null)
                {
                    c_objUser.UserID = "Bill_Sys_Notes.aspx";
                }
            }
            if (c_objUser.UserID == "Bill_Sys_PaymentTransactions.aspx")
            {
                c_objUser.UserID = "Bill_Sys_Notes.aspx";
            }

            if (c_objUser.UserID.Contains("Bill_Sys_IM_"))
            {
                c_objUser.UserID = "Bill_Sys_IM_HistoryOfPresentIillness.aspx";
            }

            if (c_objUser.UserID.Contains("Bill_Sys_FUIM_"))
            {
                c_objUser.UserID = "Bill_Sys_FUIM_StartExamination.aspx";
            }

            if (c_objUser.UserID.Contains("Bill_Sys_AC_"))
            {
                c_objUser.UserID = "Bill_Sys_AC_AccuReEval.aspx";
            }

            if (c_objUser.UserID == "Bill_Sys_MiscPaymentReport.aspx")
            {
                if (Request.QueryString["fromCase"] != null)
                {
                    c_objUser.UserID = "Bill_Sys_Notes.aspx";
                }
            }
            if (c_objUser.UserID == "Bill_Sys_Misc_Payment.aspx")
            {
                c_objUser.UserID = "Bill_Sys_Notes.aspx";
            }

            if (c_objUser.UserID == "Bill_Sys_Invoice.aspx")
            {
                c_objUser.UserID = "Bill_Sys_Notes.aspx";
            }
            if (c_objUser.UserID == "Bill_Sys_PatientBillingSummary.aspx")
            {
                c_objUser.UserID = "Bill_Sys_Notes.aspx";
            }
            if (c_objUser.UserID == "Bill_Sys_Invoice_Report.aspx")
            {
                if (Request.QueryString["fromCase"] != "False")
                {
                    c_objUser.UserID = "Bill_Sys_Notes.aspx";
                }
                else
                {
                    c_objUser.UserID = "Bill_Sys_BillSearch.aspx";
                }
            }
            if (c_objUser.UserID == "TemplateManager.aspx")
            {
                if (Request.QueryString["fromCase"] == "true")
                {
                    c_objUser.UserID = "Bill_Sys_CheckOut.aspx";
                }
                else
                {
                    c_objUser.UserID = "Bill_Sys_Notes.aspx";
                }
            }
            if (c_objUser.UserID == "Bill_Sys_PatientSearch.aspx")
            {
                c_objUser.UserID = "Bill_Sys_CheckOut.aspx";
            }


            SpecialityPDFDAO _objSpecialityDAO = new SpecialityPDFDAO();
            if (Session["SPECIALITY_PDF_OBJECT"] != null)
            {
                _objSpecialityDAO = (SpecialityPDFDAO)Session["SPECIALITY_PDF_OBJECT"];
            }
            else
            {
                _objSpecialityDAO = null;
            }

            c_objUser.UserRoleID = ((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE;

            // Pass new parameter to objMenu.Initialize as ArrayList which will be useful while display left
            // hand side menu.

            ArrayList objHelper = new ArrayList();
            objHelper.Add(_url); // url of page

            OptionMenu objMenu = new OptionMenu(c_objUser);
            objMenu.Initialize(problue, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]), ((Bill_Sys_UserObject)Session["USER_OBJECT"]), ((Bill_Sys_SystemObject)Session["SYSTEM_OBJECT"]), c_objUser, _objSpecialityDAO, objHelper);
            problue.AllExpanded  = true;
            problue.AutoPostBack = false;



            //if (((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).BT_REFERRING_FACILITY == true)
            //{
            //    if (((Bill_Sys_UserObject)Session["USER_OBJECT"]).SZ_USER_ROLE_NAME.ToLower() == "agent")
            //        lnkScheduleReport.HRef = "Bill_Sys_AppointPatientEntry_Agent.aspx";//"Agent/Bill_Sys_AppointPatientEntry_Agent.aspx";
            //    else
            //        lnkScheduleReport.HRef = "AJAX Pages/Bill_Sys_AppointPatientEntry.aspx";
            //}
            //else
            //{
            //    lnkScheduleReport.HRef = "Bill_Sys_ScheduleEvent.aspx?TOp=true";
            //}

            ShowAssignedLinks(c_objUser.UserRoleID);
            log.Debug("End Master Page_Load()");
            DataSet dsBit = new System.Data.DataSet();
            Bill_Sys_ProcedureCode_BO objPBO = new Bill_Sys_ProcedureCode_BO();
            dsBit = objPBO.Get_Sys_Key("SS00040", ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID);
            if (dsBit.Tables.Count > 0 && dsBit.Tables[0].Rows.Count > 0)
            {
                string szBitVal = dsBit.Tables[0].Rows[0][0].ToString();
                if (szBitVal == "0")
                {
                    //lnkshedulevisits.Visible = false;
                }
            }
        }
        catch (Exception ex)
        {
            Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
            using (Utils utility = new Utils())
            {
                utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
            }
            string str2 = "Error Request=" + id + ".Please share with Technical support.";
            base.Response.Redirect("../Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2);
        }
        //Method End

        using (Utils utility = new Utils())
        {
            utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod());
        }
    }
コード例 #39
0
ファイル: RoleUserBusiness.cs プロジェクト: kaka1102/SHOP-TON
        public LstMenuViewModel ListMenuOfRoleAndAccount(string searchValue, int currPage, int recodperpage, int iduser, int idrole)
        {
            LstMenuViewModel  result = new LstMenuViewModel();
            List <Menureturn> list   = new List <Menureturn>();

            var db = new DB_CSEntities1();

            SqlConnection con = new SqlConnection();

            con = Connection.Connect.GetConnect();
            SqlCommand cmd = new SqlCommand("getall_menuby_user", con);

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Add(new SqlParameter("@iduser", iduser));
            cmd.Parameters.Add(new SqlParameter("@idrole", idrole));
            cmd.Parameters.Add(new SqlParameter("@searchValue", searchValue));
            cmd.Parameters.Add(new SqlParameter("@currPage", currPage));
            cmd.Parameters.Add(new SqlParameter("@recodperpage", 10));
            cmd.Parameters.Add("@totalCount", SqlDbType.Int).Direction = ParameterDirection.Output;
            cmd.Connection = con;
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataTable      dt = new DataTable();

            da.Fill(dt);
            int total = Convert.ToInt16(cmd.Parameters["@totalCount"].Value);

            foreach (DataRow rowItem in dt.Rows)
            {
                Menureturn item = new Menureturn();
                item.IdPer    = Int32.Parse(rowItem["Id"].ToString());
                item.IdMenu   = Int32.Parse(rowItem["MenuId"].ToString());
                item.MenuName = rowItem["MenuText"].ToString();
                item.RoleName = rowItem["RoleName"].ToString();



                if (string.IsNullOrEmpty(rowItem["UserId"].ToString()))
                {
                    lsIsCreate c = new lsIsCreate();
                    c.IsCreate  = rowItem["IsCreate"].ToString();
                    c.status    = false;
                    item.Create = c;

                    lsIsRead r = new lsIsRead();
                    r.IsRead  = rowItem["IsRead"].ToString();
                    r.status  = false;
                    item.Read = r;

                    lsIsUpdate u = new lsIsUpdate();
                    u.IsUpdate  = rowItem["IsUpdate"].ToString();
                    u.status    = false;
                    item.Update = u;

                    lsIsDelete d = new lsIsDelete();
                    d.IsDelete  = rowItem["IsDelete"].ToString();
                    d.status    = false;
                    item.Delete = d;

                    lsIsExport x = new lsIsExport();
                    x.IsExport  = rowItem["IsExport"].ToString();
                    x.status    = false;
                    item.Export = x;

                    OptionMenu op = new OptionMenu();
                    op.IdPermis = Int32.Parse(rowItem["Id"].ToString());
                    op.status   = false;
                    item.Option = op;
                }
                else
                {
                    lsIsCreate c = new lsIsCreate();
                    c.IsCreate  = rowItem["IsCreate"].ToString();
                    c.status    = true;
                    item.Create = c;

                    lsIsRead r = new lsIsRead();
                    r.IsRead  = rowItem["IsRead"].ToString();
                    r.status  = true;
                    item.Read = r;

                    lsIsUpdate u = new lsIsUpdate();
                    u.IsUpdate  = rowItem["IsUpdate"].ToString();
                    u.status    = true;
                    item.Update = u;

                    lsIsDelete d = new lsIsDelete();
                    d.IsDelete  = rowItem["IsDelete"].ToString();
                    d.status    = true;
                    item.Delete = d;

                    lsIsExport x = new lsIsExport();
                    x.IsExport  = rowItem["IsExport"].ToString();
                    x.status    = false;
                    item.Export = x;

                    OptionMenu op = new OptionMenu();
                    op.IdPermis = Int32.Parse(rowItem["Id"].ToString());
                    op.status   = true;
                    item.Option = op;
                }
                list.Add(item);
            }

            result.Data  = list;
            result.Total = total;
            return(result);
        }
コード例 #40
0
ファイル: TestMenus.cs プロジェクト: saraa/fishtastic
        public static Gtk.Window Create()
        {
            window = new Window ("Menus");

            AccelGroup accel_group = new AccelGroup ();
            window.AddAccelGroup (accel_group);

            VBox box1 = new VBox (false, 0);
            window.Add (box1);

            MenuBar menubar = new MenuBar ();
            box1.PackStart (menubar, false, false, 0);

            Menu menu = Create_Menu (2, true);
            MenuItem menuitem = new MenuItem ("foo");
            menuitem.Submenu = menu;
            menubar.Append (menuitem);

            menuitem = new MenuItem ("bar");
            menuitem.Submenu = Create_Menu (3, true);
            menubar.Append (menuitem);

            Image image = new Image (Stock.Help, IconSize.Menu);

            menuitem = new ImageMenuItem ("Help");
            ((ImageMenuItem) menuitem).Image = image;
            menuitem.Submenu = Create_Menu (4, true);
            menuitem.RightJustified = true;
            menubar.Append (menuitem);

            menubar = new MenuBar ();
            box1.PackStart (menubar, false, true, 0);

            menu = Create_Menu (2, true);

            menuitem = new MenuItem ("Second menu bar");
            menuitem.Submenu = menu;
            menubar.Append (menuitem);

            VBox box2 = new VBox (false, 10);
            box2.BorderWidth = 10;
            box1.PackStart (box2, true, true, 0);

            menu = Create_Menu (1, false);
            menu.AccelGroup = accel_group;

            menu.Append (new SeparatorMenuItem ());

            menuitem = new CheckMenuItem ("Accelerate Me");
            menu.Append (menuitem);
            menuitem.AddAccelerator ("activate", accel_group, 0xFFBE, 0, AccelFlags.Visible);

            menuitem = new CheckMenuItem ("Accelerator locked");
            menu.Append (menuitem);
            menuitem.AddAccelerator ("activate", accel_group, 0xFFBF, 0, AccelFlags.Visible | AccelFlags.Locked);

            menuitem = new CheckMenuItem ("Accelerator Frozen");
            menu.Append (menuitem);
            menuitem.AddAccelerator ("activate", accel_group, 0xFFBF, 0, AccelFlags.Visible);
            menuitem.AddAccelerator ("activate", accel_group, 0xFFC0, 0, AccelFlags.Visible);

            OptionMenu option_menu = new OptionMenu ();
            option_menu.Menu = menu;
            option_menu.SetHistory (3);
            box2.PackStart (option_menu, true, true, 0);

            box1.PackStart (new HSeparator (), false, false, 0);

            box2 = new VBox (false, 10);
            box2.BorderWidth = 10;
            box1.PackStart (box2, false, true, 0);

            Button close_button = new Button (Stock.Close);
            close_button.Clicked += new EventHandler (Close_Button);
            box2.PackStart (close_button, true, true, 0);

            close_button.CanDefault = true;
            close_button.GrabDefault ();

            window.ShowAll ();
            return window;
        }
コード例 #41
0
 public PropertyEditorOptionMenu(string key, OptionMenu menu, Type enum_type, int[] enum_values) : base(key, menu, enum_type, enum_values)
 {
 }