internal void Build(ShortcutSettings sSettings, GameObject parentObj) {

		switch (sSettings.Type) {
		case (ShortcutType.Arc) :
			_itemLayer = gameObject.AddComponent<ArcLayer>();

			_itemLayer.LayerName = _LayerName;
			_itemLayer.Level = _level;
			_itemLayer.PrevLayer = _prevLayer;
			_itemLayer.CancelItemLabel = _cancelItemLabel;

			_itemLayer.Build (sSettings, parentObj);

			break;
		case (ShortcutType.Stick) :
			_itemLayer = gameObject.AddComponent<StickLayer>();

			_itemLayer.LayerName = _LayerName;
			_itemLayer.Level = _level;
			_itemLayer.PrevLayer = _prevLayer;
			_itemLayer.CancelItemLabel = _cancelItemLabel;

			_itemLayer.Build (sSettings, parentObj);

			break;
		default :
			
			break;
		}

	}
Exemplo n.º 2
0
	public void Build(ShortcutSettings sSettings, GameObject parentObj) {
		_sSettings = sSettings;
		_parentObj = parentObj;

		items = Getter.GetChildItemsFromGameObject (gameObject);

		BuildItems ();
	}
Exemplo n.º 3
0
	public void Build(ShortcutSettings sSettings) {
		_appearRate = sSettings.AppearAnimSpeed;
		gameObject.transform.localScale = Vector3.one * _scale;

		if (sSettings.Type == ShortcutType.Arc) { // 회전 보정
			gameObject.transform.localRotation = Quaternion.FromToRotation (Vector3.down, Vector3.forward);
		} 

	}
Exemplo n.º 4
0
	internal void Build(ShortcutSettings sSettings, GameObject parentObj) {
	
		layer = Getter.GetChildLayerFromGameObject (gameObject);
		if (layer == null) {
			print ("layer find error");
			return;
		}
		isAppearing = true;

		layer.Build (sSettings, gameObject);
	}
Exemplo n.º 5
0
 public static void WriteShortcutSettings(string filename, ShortcutSettings settings)
 {
     try
     {
         xmlWriter <ShortcutSettings>(filename, settings);
     }
     catch (Exception Ex)
     {
         logger.Error("Error writing shortcut settings file", Ex);
     }
 }
Exemplo n.º 6
0
    internal void Build(ShortcutSettings sSettings, GameObject parentObj)
    {
        layer = Getter.GetChildLayerFromGameObject(gameObject);
        if (layer == null)
        {
            print("layer find error");
            return;
        }
        isAppearing = true;

        layer.Build(sSettings, gameObject);
    }
Exemplo n.º 7
0
    internal void Build(ShortcutSettings sSettings)
    {
        // variables setting
        _sSettings = sSettings;

        gameObject.AddComponent <MeshRenderer> ();

        _filter = gameObject.AddComponent <MeshFilter>();

        _meshBuilder = new MeshBuilder();

        gameObject.GetComponent <MeshRenderer> ().sharedMaterial =
            ShortcutUtil.GetMaterial();
    }
Exemplo n.º 8
0
    //

    public virtual void Build(ShortcutSettings sSettings, GameObject parentObj)
    {
        // variables setting

        _sSettings = sSettings;
        _parentObj = parentObj;

        _backgroundColor = _sSettings.BackgroundColor;
        _focusingColor   = _sSettings.FocusingColor;
        _selectingColor  = _sSettings.SelectingColor;

        // build item as per itemtype
        BuildItemAsPerType();
    }
Exemplo n.º 9
0
	//
	
	public virtual void Build (ShortcutSettings sSettings, GameObject parentObj) {
		// variables setting

		_sSettings = sSettings;
		_parentObj = parentObj;
		
		_backgroundColor = _sSettings.BackgroundColor;
		_focusingColor = _sSettings.FocusingColor;
		_selectingColor = _sSettings.SelectingColor;

		// build item as per itemtype
		BuildItemAsPerType ();
		
	}
Exemplo n.º 10
0
        public void SyncUpdate()
        {
            var archive = new Shortcut {
                FullName = GetResultsWith("CubeICE 圧縮")
            };
            var extract = new Shortcut {
                FullName = GetResultsWith("CubeICE 解凍")
            };
            var settings = new Shortcut {
                FullName = GetResultsWith("CubeICE 設定")
            };

            var src = new ShortcutSettings {
                Directory = Results
            };
            var menu = PresetMenu.Archive |
                       PresetMenu.ArchiveDetails |
                       PresetMenu.Extract |
                       PresetMenu.Settings;

            src.Preset = menu;
            Assert.That(src.Preset, Is.EqualTo(menu));

            src.Sync();
            Assert.That(src.Preset.HasFlag(PresetMenu.Archive), Is.False);
            Assert.That(src.Preset.HasFlag(PresetMenu.ArchiveDetails), Is.True);
            Assert.That(src.Preset.HasFlag(PresetMenu.Extract), Is.False);
            Assert.That(src.Preset.HasFlag(PresetMenu.Settings), Is.False);

            src.Preset = menu;
            src.Update();
            Assert.That(archive.Exists, Is.True);
            Assert.That(extract.Exists, Is.True);
            Assert.That(settings.Exists, Is.True);

            src.Preset = PresetMenu.None;
            src.Sync();
            Assert.That(src.Preset.HasFlag(PresetMenu.Archive), Is.True);
            Assert.That(src.Preset.HasFlag(PresetMenu.Extract), Is.True);
            Assert.That(src.Preset.HasFlag(PresetMenu.Settings), Is.True);

            src.Preset = PresetMenu.None;
            src.Update();
            Assert.That(archive.Exists, Is.False);
            Assert.That(extract.Exists, Is.False);
            Assert.That(settings.Exists, Is.False);
        }
Exemplo n.º 11
0
	public override void Build (ShortcutSettings sSettings, GameObject parentObj)
	{
		base.Build (sSettings, parentObj);

		_selectSpeed = _sSettings.SelectSpeed;

		_innerRadius = _sSettings.InnerRadius;
		_outerRadius = _sSettings.InnerRadius + _sSettings.Thickness;
		_thickness = _sSettings.Thickness;

		// rendering
		Rendering ();

		// interaction setting
		InteractionManager.SetItemPos (_id, Camera.main.WorldToViewportPoint (centerObj.transform.position));
		InteractionManager.SetInterStart (_id, _sSettings.FocusStart);
	}
Exemplo n.º 12
0
	internal void Build(ShortcutSettings sSettings)
	{
		// variables setting
		_sSettings = sSettings;

		gameObject.AddComponent<MeshRenderer> ();
		
		_filter = gameObject.AddComponent<MeshFilter>();
		
		_meshBuilder = new MeshBuilder ();
		
		gameObject.GetComponent<MeshRenderer> ().sharedMaterial = 
			ShortcutUtil.GetMaterial ();
		

		
	}
Exemplo n.º 13
0
    public override void Build(ShortcutSettings sSettings, GameObject parentObj)
    {
        base.Build(sSettings, parentObj);

        _selectSpeed = _sSettings.SelectSpeed;

        _innerRadius = _sSettings.InnerRadius;
        _outerRadius = _sSettings.InnerRadius + _sSettings.Thickness;
        _thickness   = _sSettings.Thickness;

        // rendering
        Rendering();

        // interaction setting
        InteractionManager.SetItemPos(_id, Camera.main.WorldToViewportPoint(centerObj.transform.position));
        InteractionManager.SetInterStart(_id, _sSettings.FocusStart);
    }
Exemplo n.º 14
0
        public SetListPanel()
        {
            shortcutKeys = Entities.ShortcutSettings.LoadSettings();

            Content = gbSets = new GroupBox()
            {
                Text    = "Sets",
                Content = new TableLayout()
                {
                    Rows =
                    { cmbSets,
                      lbSongs, }
                }
            };

            var commandDeleteFromSet = MenuHelper.GetCommand("Delete song from set", Graphics.ImageDelete, shortcutKeys.DeleteSong);

            commandDeleteFromSet.Executed += (s, e) => deleteSongFromSet();
            var commandMoveSongUp = MenuHelper.GetCommand("Move song up", Graphics.ImagMoveUp, shortcutKeys.MoveSongUpInSet);

            commandMoveSongUp.Executed += (s, e) => moveSongUp();
            var commandMoveSongDown = MenuHelper.GetCommand("Move song down", Graphics.ImageMoveDown, shortcutKeys.MoveSongDownInSet);

            commandMoveSongDown.Executed += (s, e) => moveSongDown();
            var commandSelectRandomSong = MenuHelper.GetCommand("Select random song", Graphics.ImageRandom, shortcutKeys.SelectRandomSong);

            commandSelectRandomSong.Executed += (s, e) => selectRandomSong();

            var menu = new ContextMenu()
            {
                Items = { commandMoveSongUp, commandDeleteFromSet, commandMoveSongDown, commandSelectRandomSong }
            };

            lbSongs.ContextMenu = menu;


            cmbSets.ReadOnly = true;


            lbSongs.KeyUp += lbSongs_KeyUp;
            CurrentSet     = new Set();

            cmbSets.Font = Helpers.FontHelper.GetFont(UserInterfaceSettings.Instance.TextboxFormat);
            lbSongs.Font = Helpers.FontHelper.GetFont(UserInterfaceSettings.Instance.TextboxFormat);
        }
Exemplo n.º 15
0
	public override void Build (ShortcutSettings sSettings, GameObject parentObj)
	{
		base.Build (sSettings, parentObj);
		
		_selectSpeed = _sSettings.SelectSpeed;

		_width = _sSettings.ItemWidth;
		_height = _sSettings.ItemHeight;

		_direction = sSettings.Direction;

		// rendering
		Rendering ();
		
		// interaction setting
		InteractionManager.SetItemPos (_id, Camera.main.WorldToViewportPoint (centerObj.transform.position));
		InteractionManager.SetInterStart (_id, _sSettings.FocusStart);
	}
Exemplo n.º 16
0
    public override void Build(ShortcutSettings sSettings, GameObject parentObj)
    {
        base.Build(sSettings, parentObj);

        _selectSpeed = _sSettings.SelectSpeed;

        _width  = _sSettings.ItemWidth;
        _height = _sSettings.ItemHeight;

        _direction = sSettings.Direction;

        // rendering
        Rendering();

        // interaction setting
        InteractionManager.SetItemPos(_id, Camera.main.WorldToViewportPoint(centerObj.transform.position));
        InteractionManager.SetInterStart(_id, _sSettings.FocusStart);
    }
Exemplo n.º 17
0
        public SongListPanel()
        {
            shortcutKeys = Entities.ShortcutSettings.LoadSettings();

            txtSearch.PlaceholderText = "search for a song";
            Content = gbSongs = new GroupBox()
            {
                Text    = "Songs",
                Content = new TableLayout()
                {
                    Rows =
                    {
                        txtSearch,
                        new TableRow(gridSongs)
                        {
                            ScaleHeight = true
                        },
                    }
                }
            };

            var commandAddToSet = MenuHelper.GetCommand("Add to set", Graphics.ImageAddToSet, shortcutKeys.AddSongToSet);

            commandAddToSet.Executed += (s, e) => addSongToSet();
            var commandDeleteSong = MenuHelper.GetCommand("Delete song", Graphics.ImageDelete, shortcutKeys.DeleteSong);

            commandDeleteSong.Executed += (s, e) => deleteSong();
            var menuItemSongRandom = MenuHelper.GetCommand("Select random song", Graphics.ImageRandom, shortcutKeys.SelectRandomSong);

            menuItemSongRandom.Executed += (s, e) => selectRandomSong();

            //setup the gridview
            var menu = new ContextMenu()
            {
                Items = { commandAddToSet, commandDeleteSong, menuItemSongRandom }
            };

            gridSongs.ContextMenu       = menu;
            _fullSongList               = new List <Song>();
            gridSongs.MouseDoubleClick += GridSongs_MouseDoubleClick;

            txtSearch.Font = Helpers.FontHelper.GetFont(UserInterfaceSettings.Instance.TextboxFormat);
        }
Exemplo n.º 18
0
    public void Build(ShortcutSettings sSettings)
    {
        // variables setting
        _sSettings = sSettings;

        float toDegree      = 180 / (float)Mathf.PI;
        float eachItemAngle = _sSettings.EachItemDegree / toDegree;

        _startAngle = -(eachItemAngle / 2);
        _endAngle   = eachItemAngle / 2;
        _meshStep   = (int)Math.Round(Math.Max(2, (_endAngle - _startAngle) / Math.PI * 60));


        // rendering
        gameObject.AddComponent <MeshRenderer> ();

        _filter = gameObject.AddComponent <MeshFilter>();

        _meshBuilder = new MeshBuilder();

        gameObject.GetComponent <MeshRenderer> ().sharedMaterial =
            ShortcutUtil.GetMaterial();
    }
Exemplo n.º 19
0
	public void Build(ShortcutSettings sSettings)
	{
		// variables setting
        _sSettings = sSettings;

		float toDegree = 180 / (float)Mathf.PI;
		float eachItemAngle = _sSettings.EachItemDegree / toDegree;

		_startAngle = -(eachItemAngle/2);
		_endAngle = eachItemAngle/2;
		_meshStep = (int)Math.Round(Math.Max(2, (_endAngle-_startAngle)/Math.PI*60));


		// rendering
		gameObject.AddComponent<MeshRenderer> ();
		
		_filter = gameObject.AddComponent<MeshFilter>();
		
		_meshBuilder = new MeshBuilder ();
		
		gameObject.GetComponent<MeshRenderer> ().sharedMaterial = 
			ShortcutUtil.GetMaterial ();
		
	}
Exemplo n.º 20
0
	public void Build(ShortcutSettings sSettings, GameObject parentObj) {
		_id = ShortcutUtil.ItemAutoId;

		switch (sSettings.Type) {
		case (ShortcutType.Arc) :
			ArcItem _aItem = parentObj.AddComponent<ArcItem>();
			_item = _aItem;

			break;
		case (ShortcutType.Stick) :
			StickItem _sItem = parentObj.AddComponent<StickItem>();
			_item = _sItem;

			break;
		default :
			break;
		}

		_item.transform.SetParent (parentObj.transform, false);

		SetItemDatas ();

		_item.Build(sSettings, parentObj);
	}
Exemplo n.º 21
0
 /* ----------------------------------------------------------------- */
 ///
 /// ShortcutViewModel
 ///
 /// <summary>
 /// オブジェクトを初期化します。
 /// </summary>
 ///
 /// <param name="model">Model オブジェクト</param>
 ///
 /* ----------------------------------------------------------------- */
 public ShortcutViewModel(ShortcutSettings model)
 {
     _model = model;
     _model.PropertyChanged += (s, e) => OnPropertyChanged(e);
 }
Exemplo n.º 22
0
        public SongListPanel()
        {
            shortcutKeys = Entities.ShortcutSettings.LoadSettings();

            txtSearch.PlaceholderText = "search for a song";
            Content = gbSongs = new GroupBox()
            {
                Text    = "Songs",
                Content = new TableLayout()
                {
                    Rows =
                    {
                        txtSearch,
                        new TableRow(gridSongs)
                        {
                            ScaleHeight = true
                        },
                    }
                }
            };

            var commandAddToSet = MenuHelper.GetCommand("Add to set", Graphics.ImageAddToSet, shortcutKeys.AddSongToSet);

            commandAddToSet.Executed += (s, e) => addSongToSet();
            var commandDeleteSong = MenuHelper.GetCommand("Delete song", Graphics.ImageDelete, shortcutKeys.DeleteSong);

            commandDeleteSong.Executed += (s, e) => deleteSong();
            var menuItemSongRandom = MenuHelper.GetCommand("Select random song", Graphics.ImageRandom, shortcutKeys.SelectRandomSong);

            menuItemSongRandom.Executed += (s, e) => selectRandomSong();

            //setup the gridview
            gridSongs.Columns.Add(new GridColumn
            {
                DataCell = new TextBoxCell {
                    Binding = Binding.Property <Song, string>(r => r.title)
                },
                HeaderText = "Title",
                AutoSize   = false,
                Width      = 350
            });
            gridSongs.Columns.Add(new GridColumn
            {
                DataCell = new TextBoxCell {
                    Binding = Binding.Property <Song, string>(r => r.SongSubFolder)
                },
                HeaderText = "Sub-Folder",
            });
            gridSongs.Columns.Add(new GridColumn
            {
                DataCell = new TextBoxCell {
                    Binding = Binding.Property <Song, string>(r => r.hymn_number)
                },
                HeaderText = "Reference",
            });
            gridSongs.Columns.Add(new GridColumn
            {
                DataCell = new TextBoxCell {
                    Binding = Binding.Property <Song, string>(r => r.author)
                },
                HeaderText = "Author",
            });

            var menu = new ContextMenu()
            {
                Items = { commandAddToSet, commandDeleteSong, menuItemSongRandom }
            };

            gridSongs.ContextMenu        = menu;
            _fullSongList                = new List <Song>();
            gridSongs.ColumnHeaderClick += GridSongs_ColumnHeaderClick;
            gridSongs.MouseDoubleClick  += GridSongs_MouseDoubleClick;

            txtSearch.Font = Helpers.FontHelper.GetFont(UserInterfaceSettings.Instance.TextboxFormat);
        }
Exemplo n.º 23
0
        private void refreshForm()
        {
            initialSetup();


            setupHttpServer();

            shortcutKeys = Entities.ShortcutSettings.LoadSettings();


            this.Icon = Graphics.Icon;

            Title            = "OpenChords";
            this.WindowState = Eto.Forms.WindowState.Maximized;

            ucSetListPanel      = new SetListPanel();
            ucSongMetaDataPanel = new SongMetadataPanel();
            ucSongListPanel     = new SongListPanel();

            // main content
            Content = new Panel
            {
                // Main window
                Content = new Splitter()
                {
                    Orientation = Orientation.Horizontal,
                    Position    = Helpers.FormHelper.getScreenXPercentageInPixels(25, this),
                    //Sets and song list
                    Panel1 = new Splitter()
                    {
                        Orientation = Orientation.Vertical,
                        Position    = Helpers.FormHelper.getScreenYPercentageInPixels(40, this),

                        //sets
                        Panel1 = ucSetListPanel,
                        //song list
                        Panel2 = ucSongListPanel,
                    },
                    //song editor and song metadata
                    Panel2 = ucSongMetaDataPanel
                }
            };


            ucSongListPanel.refreshPanel();
            ucSetListPanel.refreshPanel();

            //file menu items
            var menuItemPreferences = MenuHelper.GetCommand("Preferences", Graphics.ImagePreferences);

            menuItemPreferences.Executed += menuItemPreferences_Executed;
            var menuItemQuit = MenuHelper.GetCommand("Quit", Graphics.ImageExit, shortcutKeys.QuitOpenChords);

            menuItemQuit.Executed += (s, e) => Application.Instance.Quit();

            // song menu items
            var menuItemNewSong = MenuHelper.GetCommand("New Song", Graphics.ImageNew, shortcutKeys.NewSong);

            menuItemNewSong.Executed += (s, e) => ucSongMetaDataPanel.NewSong();
            var menuItemSaveSong = MenuHelper.GetCommand("Save Song", Graphics.ImageSave, shortcutKeys.SaveSong);

            menuItemSaveSong.Executed += (s, e) => saveCurrentSong();
            var menuItemDeleteSong = MenuHelper.GetCommand("Delete Song", Graphics.ImageDelete);

            menuItemDeleteSong.Executed += (s, e) => { deleteCurrentlySelectedSong(); };
            var menuItemSongIncreaseKey = MenuHelper.GetCommand("Transpose Up", Graphics.ImagMoveUp, shortcutKeys.TransposeUp);

            menuItemSongIncreaseKey.Executed += (s, e) => ucSongMetaDataPanel.TransposeKeyUp();
            var menuItemSongDecreaseKey = MenuHelper.GetCommand("Transpose Down", Graphics.ImageMoveDown, shortcutKeys.TransposeDown);

            menuItemSongDecreaseKey.Executed += (s, e) => ucSongMetaDataPanel.TransposeKeyDown();
            var menuItemSongIncreaseCapo = MenuHelper.GetCommand("Capo Up", Graphics.ImagMoveUp, shortcutKeys.CapoUp);

            menuItemSongIncreaseCapo.Executed += (s, e) => ucSongMetaDataPanel.TransposeCapoUp();
            var menuItemSongDecreaseCapo = MenuHelper.GetCommand("Capo Down", Graphics.ImageMoveDown, shortcutKeys.CapoDown);

            menuItemSongDecreaseCapo.Executed += (s, e) => ucSongMetaDataPanel.TransposeCapoDown();
            var menuItemSongFixFormating = MenuHelper.GetCommand("Auto Format Song", Graphics.ImageRepairSong, shortcutKeys.AutoFormatSong);

            menuItemSongFixFormating.Executed += (s, e) => ucSongMetaDataPanel.FixFormatting();
            var menuItemSongRefeshList = MenuHelper.GetCommand("Refresh", Graphics.ImageRefresh, shortcutKeys.RefreshSongList);

            menuItemSongRefeshList.Executed += (s, e) => refreshSongList();
            var menuItemShowSongInExplorer = MenuHelper.GetCommand("Show In Explorer", Graphics.ImageExplore);

            menuItemShowSongInExplorer.Executed += (s, e) => ucSongListPanel.showSongInExplorer();

            var menuItemSongFileOperations = new ButtonMenuItem {
                Text = "File Operations", Items = { menuItemNewSong, menuItemSaveSong, menuItemDeleteSong, menuItemShowSongInExplorer }, Image = Graphics.ImageFileOperations
            };
            var menuItemKey = new ButtonMenuItem {
                Text = "Song Key", Items = { menuItemSongIncreaseKey, menuItemSongDecreaseKey }, Image = Graphics.ImageKey
            };
            var menuItemCapo = new ButtonMenuItem {
                Text = "Song Capo", Items = { menuItemSongIncreaseCapo, menuItemSongDecreaseCapo }, Image = Graphics.ImageCapo
            };

            //Sets menu items
            var menuItemSetNew = MenuHelper.GetCommand("New Set", Graphics.ImageNew);

            menuItemSetNew.Executed += (s, e) => ucSetListPanel.newSet();
            var commandSaveSet = MenuHelper.GetCommand("Save Set", Graphics.ImageSave);

            commandSaveSet.Executed += (s, e) => ucSetListPanel.saveSet();
            var commandRevertSet = MenuHelper.GetCommand("Revert Set", Graphics.ImageRevert);

            commandRevertSet.Executed += (s, e) => ucSetListPanel.revertSet();
            var menuItemSetDelete = MenuHelper.GetCommand("Delete Set", Graphics.ImageDelete);

            menuItemSetDelete.Executed += (s, e) => ucSetListPanel.deleteSet();
            var menuItemSetRefeshList = MenuHelper.GetCommand("Refresh", Graphics.ImageRefresh);

            menuItemSetRefeshList.Executed += (s, e) => ucSetListPanel.refreshPanel();
            var menuItemShowSetInExplorer = MenuHelper.GetCommand("Show In Explorer", Graphics.ImageExplore);

            menuItemShowSetInExplorer.Executed += (s, e) => ucSetListPanel.showSetInExplorer();


            var menuItemSetFileOperations = new ButtonMenuItem {
                Text = "File Operations", Items = { menuItemSetNew, commandSaveSet, commandRevertSet, menuItemSetDelete, menuItemShowSetInExplorer }, Image = Graphics.ImageFileOperations
            };


            //present menu items
            var menuItemPresentSong = MenuHelper.GetCommand("Present Song", Graphics.ImagePresentSong, shortcutKeys.PresentSong);

            menuItemPresentSong.Executed += (s, e) => ucSongMetaDataPanel.PresentSong();
            var menuItemPresentSet = MenuHelper.GetCommand("Present Set", Graphics.ImagePresentSet, shortcutKeys.PresentSet);

            menuItemPresentSet.Executed += (s, e) => ucSetListPanel.PresentSet();

            //exportMenu
            var commandExportToPrintSetHtml = MenuHelper.GetCommand("Current Set", Graphics.ImageSet, Tag: ExportOption.Set);

            commandExportToPrintSetHtml.Executed += exportToPrintHtml;
            var commandExportToPrintSongHtml = MenuHelper.GetCommand("Current Song", Graphics.ImageSong, shortcutKeys.PrintSongHtml, Tag: ExportOption.Song);

            commandExportToPrintSongHtml.Executed += exportToPrintHtml;
            var commandExportToPrintAllSongsHtml = MenuHelper.GetCommand("All Songs", Graphics.ImageAll, Tag: ExportOption.All);

            commandExportToPrintAllSongsHtml.Executed += exportToPrintHtml;
            var menuItemExportToPrintHtml = new ButtonMenuItem()
            {
                Text = "Export To &Print", Items = { commandExportToPrintSongHtml, commandExportToPrintSetHtml, commandExportToPrintAllSongsHtml }, Image = Graphics.ImagePrint
            };
            var commandExportToTabletSetHtml = MenuHelper.GetCommand("Current Set", Graphics.ImageSet, Tag: ExportOption.Set);

            commandExportToTabletSetHtml.Executed += exportToTabletHtml;
            var commandExportToTabletSongHtml = MenuHelper.GetCommand("Current Song", Graphics.ImageSong, Tag: ExportOption.Song);

            commandExportToTabletSongHtml.Executed += exportToTabletHtml;
            var commandExportToTabletAllSongsHtml = MenuHelper.GetCommand("All Songs", Graphics.ImageAll, Tag: ExportOption.All);

            commandExportToTabletAllSongsHtml.Executed += exportToTabletHtml;
            var menuItemExportToTabletHtml = new ButtonMenuItem()
            {
                Text = "Export To &Tablet", Items = { commandExportToTabletSongHtml, commandExportToTabletSetHtml, commandExportToTabletAllSongsHtml }, Image = Graphics.ImageHtml
            };
            var commandExportCurrentSetToOpenSong = MenuHelper.GetCommand("Current Set", Graphics.ImageOpenSong, shortcutKeys.ExportSetToOpenSong, Tag: ExportOption.Set);

            commandExportCurrentSetToOpenSong.Executed += exportToOpenSong;
            var menuItemExportToOpenSong = new ButtonMenuItem()
            {
                Text = "Export To &OpenSong", Items = { commandExportCurrentSetToOpenSong }, Image = Graphics.ImageOpenSong
            };
            var menuItemExportSetList = MenuHelper.GetCommand("Export Set List", Graphics.ImageList);

            menuItemExportSetList.Executed += (s, e) => ucSetListPanel.ExportToTextFile();

            //about menu
            var menuItemManual = MenuHelper.GetCommand("Help Documentation", Graphics.ImageHelp, shortcutKeys.ShowHelp);

            menuItemManual.Executed += (s, e) => showManual();

            // create menu
            Menu = new MenuBar
            {
                Items =
                {
                    // File submenu
                    new ButtonMenuItem
                    {
                        Text  = "&File",
                        Items ={ menuItemPreferences             }
                    },
                    new ButtonMenuItem()
                    {
                        Text  = "&Song",
                        Items ={ menuItemSongFileOperations, menuItemKey, menuItemCapo, menuItemSongFixFormating, menuItemSongRefeshList }
                    },
                    new ButtonMenuItem()
                    {
                        Text  = "Se&ts",
                        Items ={ menuItemSetFileOperations, menuItemSetRefeshList }
                    },
                    new ButtonMenuItem()
                    {
                        Text  = "&Present",
                        Items ={ menuItemPresentSong, menuItemPresentSet }
                    },
                    new ButtonMenuItem()
                    {
                        Text  = "&Export",
                        Items ={ menuItemExportToPrintHtml, menuItemExportToTabletHtml, menuItemExportToOpenSong, menuItemExportSetList }
                    },
                    new ButtonMenuItem()
                    {
                        Text  = "&Help",
                        Items ={ menuItemManual                  }
                    }
                },
                QuitItem = menuItemQuit,
            };

            ucSongListPanel.Focus();

            // events
            this.Closing += frmMain_Closing;
            ucSongListPanel.SongChanged  += SelectedSongChanged;
            ucSetListPanel.SongChanged   += SelectedSongChanged;
            ucSongListPanel.AddSongToSet += (s, e) => ucSetListPanel.AddSongToSet(e);
            ucSongListPanel.SongDeleting += (s, e) => deleteCurrentlySelectedSong();
        }
Exemplo n.º 24
0
	public abstract void Build (ShortcutSettings sSettings, GameObject parentObj);
Exemplo n.º 25
0
 public abstract void Build(ShortcutSettings sSettings, GameObject parentObj);
Exemplo n.º 26
0
    /*********************************************************************/

    public void Build(ShortcutSettings sSettings, GameObject parentObj)
    {
        _sSettings = sSettings;
    }
Exemplo n.º 27
0
 private void CmdResetToDefaults_Click(object sender, EventArgs e)
 {
     shortcutSettings = ShortcutSettings.RefreshSettings();
     refreshPanel();
 }
Exemplo n.º 28
0
 void OnEnable()
 {
     _sSettings = target as ShortcutSettings;
 }
Exemplo n.º 29
0
        private void buildUI()
        {
            shortcutKeys = Entities.ShortcutSettings.LoadSettings();

            Width       = 500;
            Height      = 500;
            WindowState = Eto.Forms.WindowState.Maximized;

            if (!Settings.GlobalApplicationSettings.WindowedMode)
            {
                this.WindowStyle = Eto.Forms.WindowStyle.None;
            }

            if (Settings.GlobalApplicationSettings.TouchScreenMode)
            {
                Splitter touchScreenUI = buildTouchscreenUI();
                Content = touchScreenUI;
            }
            else
            {
                Content = webView;
            }

            cmdPreviousSong.Click += menuItemPreviousSong_Executed;
            cmdNextSong.Click     += menuItemNextSong_Executed;
            cmdPreviousPage.Click += cmdPreviousPage_Click;
            cmdNextPage.Click     += cmdNextPage_Click;

            this.Icon = Graphics.Icon;

            var menuItemExit = MenuHelper.GetCommand("Exit", Graphics.ImageExit, shortcutKeys.ExitPresentation);

            menuItemExit.Executed += (s, e) => this.Close();

            // refresh item
            var menuItemRefresh = MenuHelper.GetCommand("Refresh", Graphics.ImageRefresh, shortcutKeys.RefreshPresentation);

            menuItemRefresh.Executed += menuItemRefresh_Executed;

            // size items
            var commandSongIncreaseSize = MenuHelper.GetCommand("Increase Font Size", Graphics.ImagMoveUp, shortcutKeys.IncreaseFontSize);

            commandSongIncreaseSize.Executed += commandSongIncreaseSize_Executed;
            var commandSongDecreaseSize = MenuHelper.GetCommand("Decrease Font Size", Graphics.ImageMoveDown, shortcutKeys.DecreaseFontSize);

            commandSongDecreaseSize.Executed += commandSongDecreaseSize_Executed;


            // key items
            var commandSongIncreaseKey = MenuHelper.GetCommand("Transpose Key Up", Graphics.ImagMoveUp, shortcutKeys.TransposeUp);

            commandSongIncreaseKey.Executed += commandSongIncreaseKey_Executed;
            var commandSongDecreaseKey = MenuHelper.GetCommand("Transpose Key Down", Graphics.ImageMoveDown, shortcutKeys.TransposeDown);

            commandSongDecreaseKey.Executed += commandSongDecreaseKey_Executed;
            var commandSongIncreaseCapo = MenuHelper.GetCommand("Capo Up", Graphics.ImagMoveUp, shortcutKeys.CapoUp);

            commandSongIncreaseCapo.Executed += commandSongIncreaseCapo_Executed;
            var commandSongDecreaseCapo = MenuHelper.GetCommand("Capo Down", Graphics.ImageMoveDown, shortcutKeys.CapoDown);

            commandSongDecreaseCapo.Executed += commandSongDecreaseCapo_Executed;

            // Navigation menu
            var menuItemNextSong = MenuHelper.GetCommand("Next Song", Graphics.ImageRight, shortcutKeys.GoToNextSong);

            menuItemNextSong.Executed += menuItemNextSong_Executed;
            var menuItemPreviousSong = MenuHelper.GetCommand("Previous Song", Graphics.ImageLeft, shortcutKeys.GoToPreviousSong);

            menuItemPreviousSong.Executed += menuItemPreviousSong_Executed;
            var menuItemNavigation = new ButtonMenuItem()
            {
                Text = "&Navigation", Items = { menuItemPreviousSong, menuItemNextSong }, Image = Graphics.ImageNavigation
            };

            //visibility menu
            var commandToggleChords = MenuHelper.GetCommand("Toggle Chords", Graphics.ImageChords, shortcutKeys.ToggleChords);

            commandToggleChords.Executed += (s, e) => { toggleChords(); };
            var commandToggleLyrics = MenuHelper.GetCommand("Toggle Lyrics", Graphics.ImageLyrics, shortcutKeys.ToggleLyrics);

            commandToggleLyrics.Executed += (s, e) => { toggleLyrics(); };
            var commandToggleNotes = MenuHelper.GetCommand("Toggle Notes", Graphics.ImageNotes, shortcutKeys.ToggleNotes);

            commandToggleNotes.Executed += (s, e) => { toggleNotes(); };

            //Metronome
            var commandToggleMetonome = MenuHelper.GetCommand("Toggle Metronome", Graphics.ImageMetronome, shortcutKeys.ToggleMetronome);

            commandToggleMetonome.Executed += commandToggleMetonome_Executed;

            //song List
            menuItemSongList = new ButtonMenuItem()
            {
                Text = "Song &List", Image = Graphics.ImageList
            };
            populateSongListMenu(menuItemSongList);

            if (MaxIndex == 1)
            {
                menuItemNavigation.Enabled = false;
                menuItemSongList.Enabled   = false;
            }

            Menu = new MenuBar()
            {
                Items =
                {
                    menuItemRefresh,
                    new ButtonMenuItem()
                    {
                        Text = "&Size",Items     = { commandSongIncreaseSize, commandSongDecreaseSize }, Image = Graphics.ImageSize
                    },
                    new ButtonMenuItem()
                    {
                        Text = "&Key", Items     = { commandSongIncreaseKey,  commandSongDecreaseKey  }, Image = Graphics.ImageKey
                    },
                    new ButtonMenuItem()
                    {
                        Text = "&Capo",Items     = { commandSongIncreaseCapo, commandSongDecreaseCapo }, Image = Graphics.ImageCapo
                    },
                    menuItemNavigation,
                    new ButtonMenuItem()
                    {
                        Text = "&Visibility",Items     = { commandToggleChords,     commandToggleLyrics, commandToggleNotes}, Image = Graphics.ImageVisibility
                    },
                    new ButtonMenuItem()
                    {
                        Text = "Other Options",Items     = { commandToggleMetonome }, Image = Graphics.ImageOtherOptions
                    },
                    menuItemSongList,
                    menuItemExit
                }
            };

            metronome1    = new OpenChords.Functions.Metronome();
            this.Closing += frmPresent_Closing;
            webView.Focus();

            drawSong();

            this.Topmost = Settings.GlobalApplicationSettings.ForceAlwaysOnTopWhenPresenting;
        }
	/*********************************************************************/

	public void Build(ShortcutSettings sSettings, GameObject parentObj) {

	}