Permalink
Browse files

Added Office 2013 Instructor Mode Addin

  • Loading branch information...
fvideon committed Jan 10, 2014
1 parent 2b406b4 commit e3e31279858361d7e4ec9a8d44fed2278816eb84
Showing with 9,765 additions and 0 deletions.
  1. +407 −0 LICENSE.rtf
  2. +44 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin.sln
  3. +260 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/InstructorModeRibbon.cs
  4. +45 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/InstructorModeRibbon.xml
  5. +221 −0 .../Office2013InstructorModeAddin/Office2013InstructorModeAddin/Office2013InstructorModeAddin.csproj
  6. BIN ...3InstructorModeAddin/Office2013InstructorModeAddin/Office2013InstructorModeAddin_TemporaryKey.pfx
  7. +655 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/PPT.cs
  8. +1,025 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/PPTPaneManager.cs
  9. +38 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/Properties/AssemblyInfo.cs
  10. +62 −0 ...eous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/Properties/Resources.Designer.cs
  11. +117 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/Properties/Resources.resx
  12. +26 −0 ...neous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/Properties/Settings.Designer.cs
  13. +7 −0 ...llaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/Properties/Settings.settings
  14. +620 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/TagDictionary.cs
  15. +231 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/ThisAddIn.Designer.cs
  16. +4 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/ThisAddIn.Designer.xml
  17. +47 −0 Miscellaneous/Office2013InstructorModeAddin/Office2013InstructorModeAddin/ThisAddIn.cs
  18. +5,920 −0 ...2013InstructorModeAddin/Office2013InstructorModeAddinSetup/Office2013InstructorModeAddinSetup.isl
  19. +36 −0 ...3InstructorModeAddin/Office2013InstructorModeAddinSetup/Office2013InstructorModeAddinSetup.isproj
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -0,0 +1,44 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2012
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Office2013InstructorModeAddin", "Office2013InstructorModeAddin\Office2013InstructorModeAddin.csproj", "{3AF20DFD-A733-437A-B990-96CE0EF998E4}"
+EndProject
+Project("{6141683F-8A12-4E36-9623-2EB02B2C2303}") = "Office2013InstructorModeAddinSetup", "Office2013InstructorModeAddinSetup\Office2013InstructorModeAddinSetup.isproj", "{3346DAD9-45C8-44D0-A89F-9A70BDA7B651}"
+ ProjectSection(ProjectDependencies) = postProject
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4} = {3AF20DFD-A733-437A-B990-96CE0EF998E4}
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ CD_ROM|Any CPU = CD_ROM|Any CPU
+ Debug|Any CPU = Debug|Any CPU
+ DVD-5|Any CPU = DVD-5|Any CPU
+ Release|Any CPU = Release|Any CPU
+ SingleImage|Any CPU = SingleImage|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.CD_ROM|Any CPU.ActiveCfg = Release|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.CD_ROM|Any CPU.Build.0 = Release|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.DVD-5|Any CPU.Build.0 = Debug|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.SingleImage|Any CPU.ActiveCfg = Release|Any CPU
+ {3AF20DFD-A733-437A-B990-96CE0EF998E4}.SingleImage|Any CPU.Build.0 = Release|Any CPU
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.CD_ROM|Any CPU.ActiveCfg = CD_ROM
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.CD_ROM|Any CPU.Build.0 = CD_ROM
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.Debug|Any CPU.ActiveCfg = DVD-5
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.Debug|Any CPU.Build.0 = DVD-5
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.DVD-5|Any CPU.ActiveCfg = DVD-5
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.DVD-5|Any CPU.Build.0 = DVD-5
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.Release|Any CPU.ActiveCfg = SingleImage
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.Release|Any CPU.Build.0 = SingleImage
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.SingleImage|Any CPU.ActiveCfg = SingleImage
+ {3346DAD9-45C8-44D0-A89F-9A70BDA7B651}.SingleImage|Any CPU.Build.0 = SingleImage
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
@@ -0,0 +1,260 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Text;
+using Office = Microsoft.Office.Core;
+
+// TODO: Follow these steps to enable the Ribbon (XML) item:
+
+// 1: Copy the following code block into the ThisAddin, ThisWorkbook, or ThisDocument class.
+
+// protected override Microsoft.Office.Core.IRibbonExtensibility CreateRibbonExtensibilityObject()
+// {
+// return new InstructorModeRibbon();
+// }
+
+// 2. Create callback methods in the "Ribbon Callbacks" region of this class to handle user
+// actions, such as clicking a button. Note: if you have exported this Ribbon from the Ribbon designer,
+// move your code from the event handlers to the callback methods and modify the code to work with the
+// Ribbon extensibility (RibbonX) programming model.
+
+// 3. Assign attributes to the control tags in the Ribbon XML file to identify the appropriate callback methods in your code.
+
+// For more information, see the Ribbon XML documentation in the Visual Studio Tools for Office Help.
+
+
+namespace Office2013InstructorModeAddin
+{
+ public delegate void ChangedEventHandler(bool newValue);
+
+ [ComVisible(true)]
+ public class InstructorModeRibbon : Office.IRibbonExtensibility
+ {
+ private Office.IRibbonUI ribbon;
+
+ // OnClick is an event, implemented by a delegate ButtonEventHandler.
+ public event ChangedEventHandler PresentationModeChanged;
+ public event ChangedEventHandler ShapeModeChanged;
+
+ public InstructorModeRibbon()
+ {
+ }
+
+ #region IRibbonExtensibility Members
+
+ public string GetCustomUI(string ribbonID)
+ {
+ return GetResourceText("Office2013InstructorModeAddin.InstructorModeRibbon.xml");
+ }
+
+ #endregion
+
+ #region Properties
+
+ private bool projectedViewState = true;
+ public bool ProjectedViewState
+ {
+ get
+ {
+ return projectedViewState;
+ }
+ set
+ {
+ if (value != projectedViewState)
+ {
+ projectedViewState = value;
+ PresentationModeChanged(value);
+ }
+ this.InvalidateButtons();
+ }
+ }
+
+ private bool unrestrictedState = true;
+ public bool UnrestrictedState
+ {
+ get
+ {
+ return unrestrictedState;
+ }
+ set
+ {
+ if (value != unrestrictedState)
+ {
+ unrestrictedState = value;
+ ShapeModeChanged(value);
+ }
+ this.InvalidateButtons();
+ }
+ }
+
+ private const string ProjectedView = "ProjectedView";
+ private const string ProjectedSet = "ProjectedSet";
+ private const string InstructorView = "InstructorView";
+ private const string InstructorSet = "InstructorSet";
+
+ private bool projectedViewEnabled = true;
+ public bool ProjectedViewEnabled
+ {
+ get
+ {
+ return projectedViewEnabled;
+ }
+ set
+ {
+ projectedViewEnabled = value;
+ this.InvalidateButtons();
+ }
+ }
+ private bool projectedSetEnabled = true;
+ public bool ProjectedSetEnabled
+ {
+ get
+ {
+ return projectedSetEnabled;
+ }
+ set
+ {
+ projectedSetEnabled = value;
+ this.InvalidateButtons();
+ }
+ }
+
+ private bool instructorViewEnabled = true;
+ public bool InstructorViewEnabled
+ {
+ get
+ {
+ return instructorViewEnabled;
+ }
+ set
+ {
+ instructorViewEnabled = value;
+ this.InvalidateButtons();
+ }
+ }
+ private bool instructorSetEnabled = true;
+ public bool InstructorSetEnabled
+ {
+ get
+ {
+ return instructorSetEnabled;
+ }
+ set
+ {
+ instructorSetEnabled = value;
+ this.InvalidateButtons();
+ }
+ }
+
+ #endregion Properties
+
+ #region Ribbon Callbacks
+ //Create callback methods here. For more information about adding callback methods, visit http://go.microsoft.com/fwlink/?LinkID=271226
+
+ public void Ribbon_Load(Office.IRibbonUI ribbonUI)
+ {
+ this.ribbon = ribbonUI;
+ }
+
+ public bool OnGetEnabled(Office.IRibbonControl control)
+ {
+ switch (control.Id)
+ {
+ case ProjectedView:
+ return ProjectedViewEnabled;
+ case InstructorView:
+ return InstructorViewEnabled;
+ case ProjectedSet:
+ return ProjectedSetEnabled;
+ case InstructorSet:
+ return InstructorSetEnabled;
+ }
+
+ return false;
+ }
+
+ public bool OnGetPressed(Office.IRibbonControl control)
+ {
+ switch (control.Id)
+ {
+ case ProjectedView:
+ return this.ProjectedViewState;
+ case InstructorView:
+ return !this.ProjectedViewState;
+ case ProjectedSet:
+ return this.UnrestrictedState;
+ case InstructorSet:
+ return !this.UnrestrictedState;
+ }
+
+ return false;
+ }
+
+ public void OnClick(Office.IRibbonControl control, bool isPressed)
+ {
+ switch (control.Id)
+ {
+ case ProjectedView:
+ this.ProjectedViewState = true;
+ break;
+ case InstructorView:
+ this.ProjectedViewState = false;
+ break;
+ case ProjectedSet:
+ this.UnrestrictedState = true;
+ break;
+ case InstructorSet:
+ this.UnrestrictedState = false;
+ break;
+ }
+
+ this.InvalidateButtons();
+ }
+
+ public void OnExport(Office.IRibbonControl control)
+ {
+ System.Windows.Forms.MessageBox.Show("Saving...NOT IMPLEMENTED");
+ }
+
+
+ #endregion
+
+ private void InvalidateButtons()
+ {
+ if (this.ribbon != null)
+ {
+ this.ribbon.InvalidateControl(ProjectedView);
+ this.ribbon.InvalidateControl(InstructorView);
+ this.ribbon.InvalidateControl(ProjectedSet);
+ this.ribbon.InvalidateControl(InstructorSet);
+ }
+ }
+
+ #region Helpers
+
+ private static string GetResourceText(string resourceName)
+ {
+ Assembly asm = Assembly.GetExecutingAssembly();
+ string[] resourceNames = asm.GetManifestResourceNames();
+ for (int i = 0; i < resourceNames.Length; ++i)
+ {
+ if (string.Compare(resourceName, resourceNames[i], StringComparison.OrdinalIgnoreCase) == 0)
+ {
+ using (StreamReader resourceReader = new StreamReader(asm.GetManifestResourceStream(resourceNames[i])))
+ {
+ if (resourceReader != null)
+ {
+ return resourceReader.ReadToEnd();
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ #endregion
+ }
+}
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load">
+ <ribbon>
+ <tabs>
+ <tab idMso="TabAddIns">
+ <group id="CP3Group" label="Classroom Presenter 3.0">
+ <box id="box1" boxStyle="vertical">
+ <toggleButton id="ProjectedView"
+ size="normal"
+ label="Projected View"
+ screentip="Set the slide to show the projected view of the slide"
+ getPressed="OnGetPressed"
+ getEnabled="OnGetEnabled"
+ onAction="OnClick" />
+ <toggleButton id="InstructorView"
+ size="normal"
+ label="Instructor View"
+ screentip="Set the slide to show the instructors view of the slide"
+ getPressed="OnGetPressed"
+ getEnabled="OnGetEnabled"
+ onAction="OnClick" />
+ </box>
+ <separator id="separator1"/>
+ <box id="box2" boxStyle="vertical">
+ <toggleButton id="ProjectedSet"
+ size="normal"
+ label="Unrestricted"
+ screentip="Set the selected objects to be viewable in the projected view"
+ getPressed="OnGetPressed"
+ getEnabled="OnGetEnabled"
+ onAction="OnClick" />
+ <toggleButton id="InstructorSet"
+ size="normal"
+ label="Instructor Note"
+ screentip="Set the selected objects to be viewable only by the instructor"
+ getPressed="OnGetPressed"
+ getEnabled="OnGetEnabled"
+ onAction="OnClick" />
+ </box>
+ </group>
+ </tab>
+ </tabs>
+ </ribbon>
+</customUI>
+
Oops, something went wrong.

0 comments on commit e3e3127

Please sign in to comment.