Exemplo n.º 1
0
        /// <summary>
        /// Does a command</summary>
        /// <param name="tag">Command</param>
        public void DoCommand(object tag)
        {
            if (tag is CommandId)
            {
                switch ((CommandId)tag)
                {
                case CommandId.EditPreferences:
                    PresentUserSettings(null);
                    break;

                case CommandId.EditImportExportSettings:
                    SettingsLoadSaveDialog settingsLoadSaveDialog = new SettingsLoadSaveDialog(this);
                    settingsLoadSaveDialog.ShowDialog(m_mainWindow.DialogOwner);
                    break;
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Does a command</summary>
        /// <param name="tag">Command</param>
        public virtual void DoCommand(object tag)
        {
            if (tag is CommandId)
            {
                switch ((CommandId)tag)
                {
                case CommandId.EditPreferences:
                    m_settingService.PresentUserSettings(null);
                    break;

                case CommandId.EditImportExportSettings:
                    if (m_mainWindow != null)
                    {
                        var settingsLoadSaveDialog = new SettingsLoadSaveDialog(m_settingService);
                        settingsLoadSaveDialog.ShowDialog(m_mainWindow.DialogOwner as IWin32Window);
                    }
                    break;
                }
            }
        }