public void btnformatTable_Click(Office.IRibbonControl rib, string galleryID, int selectedIndex) { pptfunctions funObj = new pptfunctions(); string tbltype = null; if (funObj.TSCThemeLoaded()) { clstblformat tableObj = new clstblformat(); switch (galleryID) { case "ftable1": { tbltype = "Atable1"; break; } case "ftable2": { tbltype = "Atable2"; break; } case "ftable3": { tbltype = "Atable3"; break; } case "ftable4": { tbltype = "Atable4"; break; } case "ftable5": { tbltype = "Atable5"; break; } case "ftable6": { tbltype = "Atable6"; break; } case "ftable7": { tbltype = "Atable7"; break; } case "ftable8": { tbltype = "Atable8"; break; } } tableObj.tableformat(tbltype); } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
//Start a new presentation with TSC 2015 Theme. public void TSCP_Callback12(Office.IRibbonControl rib) { pptfunctions funObj = new pptfunctions(); funObj.addNewPPT_In_tsc_format(rib); PPTAttribute.UserTracker(rib); }
public void TSCP_Callback82(Office.IRibbonControl rib) { tscformat choObj = new tscformat(); choObj.tsc_loadtheme(); PPTAttribute.UserTracker(rib); }
public void btnInsertTable_Click(Office.IRibbonControl rib, string galleryID, int selectedIndex) { pptfunctions funObj = new pptfunctions(); if (funObj.TSCThemeLoaded()) { frmtable tableObj = new frmtable(); switch (galleryID) { case "Atable1": { PPTAttribute.tableType.Add("Atable1"); break; } case "Atable2": { PPTAttribute.tableType.Add("Atable2"); break; } case "Atable3": { PPTAttribute.tableType.Add("Atable3"); break; } case "Atable4": { PPTAttribute.tableType.Add("Atable4"); break; } case "Atable5": { PPTAttribute.tableType.Add("Atable5"); break; } case "Atable6": { PPTAttribute.tableType.Add("Atable6"); break; } case "Atable7": { PPTAttribute.tableType.Add("Atable7"); break; } case "Atable8": { PPTAttribute.tableType.Add("Atable8"); break; } } tableObj.ShowDialog(); } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
//Load TSC 2018 Theme in active presentation. public void TSCP_Callback11(Office.IRibbonControl rib) { pptfunctions funObj = new pptfunctions(); funObj.ApplyPPT_Theme(rib); PPTAttribute.UserTracker(rib); //this.ribbon.InvalidateControl("customButton13"); }
public void btnformatPPT_Click(Office.IRibbonControl rib) { frmPPTFormat frmObj = new frmPPTFormat(); pptfunctions funObj = new pptfunctions(); frmObj.ShowDialog(); PPTAttribute.UserTracker(rib); }
public void btnfeedback_Click(Office.IRibbonControl rib) { Outlook.Application mailObj = Marshal.GetActiveObject("Outlook.Application") as Outlook.Application; Outlook.MailItem newmail = mailObj.CreateItem(Outlook.OlItemType.olMailItem); newmail.Subject = "Feedback - TSC PPT Addin"; newmail.To = "[email protected];[email protected]"; newmail.Display(); PPTAttribute.UserTracker(rib); }
//Growth Rates public void TSCP_Callback51(Office.IRibbonControl rib) { PowerPoint.Application ppApp = Globals.ThisAddIn.Application; pptfunctions funObj = new pptfunctions(); Shapecheck shpObj = new Shapecheck(); frmChartcalc chartObj = new frmChartcalc(); //frmCalculator frmObj = new frmCalculator(); Shapecheck PPTshpchk = new Shapecheck(); List <string> SelectedCharts = new List <string>(); SelectedCharts = PPTshpchk.FindSelectedCharts(); PowerPoint.Presentation ActivePPT = Globals.ThisAddIn.Application.ActivePresentation; int numSelCht = SelectedCharts.Count; if (numSelCht == 0) { MessageBox.Show("Please select a chart for CAGR/AAGR calculation.", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } int sld_num = ppApp.ActiveWindow.Selection.SlideRange.SlideNumber; PowerPoint.Chart myChart = ActivePPT.Slides[sld_num].Shapes[SelectedCharts[0]].Chart; string chType = shpObj.chartType(myChart); if (funObj.TSCThemeLoaded()) { if (numSelCht == 0) { //frmObj.Show(); MessageBox.Show("Please select a chart CAGR/AAGR calculation.", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (numSelCht > 1) { MessageBox.Show("Please select a single chart CAGR/AAGR calculation.", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } else if (numSelCht == 1) { //PPT.Chart myChart = //string chType = PPTshpchk.chartType(); if (chType != "Pie") { chartObj.ShowDialog(); } else { MessageBox.Show("Please select a column chart for CAGR/AAGR Calculation.", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } } } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
public void btnSave_Click(Office.IRibbonControl rib) //Maksood { clsSave csave = new clsSave(); if (rib.Id == "btnSaveSelectedSlide") { csave.pSaveSelectedSlide(); } else if (rib.Id == "btnSaveAllSlide") { csave.pSeprateEachSlide(); } PPTAttribute.UserTracker(rib); }
public void TSCP_Callback_Chart(Office.IRibbonControl rib) { pptfunctions funObj = new pptfunctions(); if (funObj.TSCThemeLoaded()) { funObj.InsertCharts(rib); } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
public void btnbullet_Click(Office.IRibbonControl rib) { pptfunctions funObj = new pptfunctions(); if (funObj.TSCThemeLoaded()) { funObj.formatbullettxt(rib); } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
//Developed by vandna public void btnAlignshape_Click(Office.IRibbonControl rib) { clsAlignObject objAlign = new TSCPPT_Addin.clsAlignObject(); pptfunctions funObj = new pptfunctions(); if (funObj.TSCThemeLoaded()) { objAlign.funAlignObject(rib); } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
//Developed by vandna public void btnselectshape_Click(Office.IRibbonControl rib) { clsSelectObject selObj = new clsSelectObject(); pptfunctions funObj = new pptfunctions(); if (funObj.TSCThemeLoaded()) { selObj.Select_Same_Object(rib); } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
public void TSCP_Callback46(Office.IRibbonControl rib) { pptfunctions funObj = new pptfunctions(); if (funObj.TSCThemeLoaded()) { frmChartformat chartobj = new frmChartformat(); chartobj.ShowDialog(); //funObj.formatChart(tscColors, cDataLabels, cYAxis,rib); } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
public void btnRemove_Click(Office.IRibbonControl rib) //Maksood { pptfunctions funObj = new pptfunctions(); clsClean cClean = new clsClean(); if (funObj.TSCThemeLoaded()) { if (rib.Id == "btnRemoveDoubleSpace") { cClean.pRemoveDoubleSpace_Clean(); } else if (rib.Id == "btnRemoveSlideAnimations") { cClean.pRemoveAnimation(); } else if (rib.Id == "btnRemove3D_effects") { cClean.pRemove3D_Effect(); } else if (rib.Id == "btnRemoveMargin") { cClean.pRemoveMargin(); } else if (rib.Id == "btnParagraphSpacing") { cClean.setParagraphSpacing(); } } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
public void ChartGalleryOnAction(Office.IRibbonControl rib, string galleryID, int selectedIndex) { pptfunctions funObj = new pptfunctions(); if (funObj.TSCThemeLoaded()) { frmChartformat chartobj = new frmChartformat(); switch (galleryID) { case "chart1": { funObj.formatChart("item1", rib); break; } case "chart2": { funObj.formatChart("item2", rib); break; } case "chart3": { funObj.formatChart("item3", rib); break; } case "chart4": { funObj.formatChart("item4", rib); break; } } } else { MessageBox.Show("This functionality works with TSC Theme. Please Load TSC theme and try again. Thanks", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); } PPTAttribute.UserTracker(rib); }
public void GalleryOnAction(Office.IRibbonControl rib, string galleryID, int selectedIndex) { PowerPoint.Application ppApp = Globals.ThisAddIn.Application; string bgrCode = null; char Csplit = ','; switch (galleryID) { case "itm11": { bgrCode = "102,114,0"; break; } case "itm12": { bgrCode = "133,142,51"; break; } case "itm13": { bgrCode = "163,170,102"; break; } case "itm14": { bgrCode = "194,199,153"; break; } case "itm15": { bgrCode = "224,227,204"; break; } case "itm21": { bgrCode = "155,174,0"; break; } case "itm22": { bgrCode = "175,190,91"; break; } case "itm23": { bgrCode = "195,206,202,"; break; } case "itm24": { bgrCode = "215,223,153"; break; } case "itm25": { bgrCode = "235,239,204"; break; } case "itm31": { bgrCode = "97,85,75"; break; } case "itm32": { bgrCode = "128,119,110"; break; } case "itm33": { bgrCode = "160,153,146"; break; } case "itm34": { bgrCode = "191,186,183"; break; } case "itm35": { bgrCode = "223,221,219"; break; } case "itm41": { bgrCode = "57,42,30"; break; } case "itm42": { bgrCode = "90,76,67"; break; } case "itm43": { bgrCode = "126,115,108"; break; } case "itm44": { bgrCode = "168,159,152"; break; } case "itm45": { bgrCode = "210,205,102"; break; } case "itm51": { bgrCode = "193,184,162"; break; } case "itm52": { bgrCode = "205,198,181"; break; } case "itm53": { bgrCode = "218,212,199"; break; } case "itm54": { bgrCode = "230,227,218"; break; } case "itm55": { bgrCode = "243,241,236"; break; } case "itm61": { bgrCode = "78,204,124"; break; } case "itm62": { bgrCode = "113,214,150"; break; } case "itm63": { bgrCode = "149,224,177"; break; } case "itm64": { bgrCode = "184,235,203"; break; } case "itm65": { bgrCode = "220,245,229"; break; } case "itm71": { bgrCode = "9,84,187"; break; } case "itm72": { bgrCode = "51,187,37"; break; } case "itm73": { bgrCode = "251,194,13"; break; } case "itm74": { bgrCode = "127,127,127"; break; } case "itm75": { bgrCode = "217,217,217"; break; } } List <string> Ccode = new List <string>(); Ccode = bgrCode.Split(Csplit).ToList(); if (ppApp.ActiveWindow.Selection.Type != PowerPoint.PpSelectionType.ppSelectionShapes) { MessageBox.Show("Please select a single shape to format.", PPTAttribute.msgTitle, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } foreach (PowerPoint.Shape shp in ppApp.ActiveWindow.Selection.ShapeRange) { try { shp.Fill.ForeColor.RGB = System.Drawing.Color.FromArgb(Convert.ToInt32(Ccode[0]), Convert.ToInt32(Ccode[1]), Convert.ToInt32(Ccode[2])).ToArgb(); } catch { } } PPTAttribute.UserTracker(rib); }