当前位置: 首页>>代码示例>>C#>>正文


C# RibbonControlEventArgs类代码示例

本文整理汇总了C#中RibbonControlEventArgs的典型用法代码示例。如果您正苦于以下问题:C# RibbonControlEventArgs类的具体用法?C# RibbonControlEventArgs怎么用?C# RibbonControlEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RibbonControlEventArgs类属于命名空间,在下文中一共展示了RibbonControlEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: button1_Click

        private void button1_Click(object sender, RibbonControlEventArgs e)
        {
            Outlook.Application application = new Outlook.Application();
            Outlook.NameSpace ns = application.GetNamespace("MAPI");

            try
            {
                //get selected mail item
                Object selectedObject = application.ActiveExplorer().Selection[1];
                Outlook.MailItem selectedMail = (Outlook.MailItem)selectedObject;

                //create message
                Outlook.MailItem newMail = application.CreateItem(Outlook.OlItemType.olMailItem) as Outlook.MailItem;
                newMail.Recipients.Add(ReadFile());
                newMail.Subject = "SPAM";
                newMail.Attachments.Add(selectedMail, Microsoft.Office.Interop.Outlook.OlAttachmentType.olEmbeddeditem);

                newMail.Send();
                selectedMail.Delete();

                System.Windows.Forms.MessageBox.Show("Spam notification has been sent.");
            }
            catch
            {
                System.Windows.Forms.MessageBox.Show("You must select a message to report.");
            }
        }
开发者ID:jamesfaske,项目名称:Report-Spam,代码行数:27,代码来源:Ribbon1.cs

示例2: btFuncMeta_Click

 private void btFuncMeta_Click(object sender, RibbonControlEventArgs e)
 {
     // SAPINTGUI.FormFunctionMetaEx formFunctionMetaEx = new SAPINTGUI.FormFunctionMetaEx();
        // formFunctionMetaEx.Show();
     FormFunctionMeta formFunctionMeta = new FormFunctionMeta();
     formFunctionMeta.Show();
 }
开发者ID:SyedMdKamruzzaman,项目名称:sap_interface,代码行数:7,代码来源:ManageTaskPaneRibbon.cs

示例3: branchComboBox_TextChanged

 private void branchComboBox_TextChanged(object sender, RibbonControlEventArgs e)
 {
     btnExport_Refresh();
     btnExportMonsterTable_Refresh();
     btnExportMetaTable_Refresh();
     branch = branchComboBox.Text;
 }
开发者ID:zeggoo,项目名称:IG_TableExporter,代码行数:7,代码来源:IG_Ribbon.cs

示例4: ConvertLatLon_button_Click

        private void ConvertLatLon_button_Click(object sender, RibbonControlEventArgs e)
        {
            DecimalDegrees decimalDegrees;
            DegreesDecimalMinutes degreesDecimalMinutes;
            DegreesMinutesSeconds degreesMinutesSeconds;

            try
            {
                switch (this.LatLonFromat_dropDown.SelectedItem.Label)
                {
                    case "Decimal Degrees":
                        decimalDegrees = new DecimalDegrees(this.Longitude_editBox.Text, this.Latitude_editBox.Text);
                        this.MGRS_editBox.Text = decimalDegrees.ToMilitaryGridReferenceSystem().Grid;
                        break;
                    case "Degrees Decimal Minutes":
                        degreesDecimalMinutes = new DegreesDecimalMinutes(this.Longitude_editBox.Text, this.Latitude_editBox.Text);
                        this.MGRS_editBox.Text = degreesDecimalMinutes.ToMilitaryGridReferenceSystem().Grid;
                        break;
                    case "Degrees Minutes Seconds":
                        degreesMinutesSeconds = new DegreesMinutesSeconds(this.Longitude_editBox.Text, this.Latitude_editBox.Text);
                        this.MGRS_editBox.Text = degreesMinutesSeconds.ToMilitaryGridReferenceSystem().Grid;
                        break;
                }
            }
            catch
            {
                MessageBox.Show("Invalid " + this.LatLonFromat_dropDown.SelectedItem.Label + " input.");
            }
        }
开发者ID:AlphaTangoIndia,项目名称:excel2earth,代码行数:29,代码来源:Ribbon.cs

示例5: RefreshButton_Click

 private void RefreshButton_Click(object sender, RibbonControlEventArgs e)
 {
     if (ViewModel.IsConnected)
     {
         ViewModel.RefreshFeeds.Execute(null);
     }
 }
开发者ID:Pamilator,项目名称:Server-Based-RSS-Feed-Aggregator-,代码行数:7,代码来源:MainContainerRibbon.cs

示例6: btnReportCustom_Click

 private void btnReportCustom_Click(object sender, RibbonControlEventArgs e)
 {
     if (this.ddlReportTo.SelectedItem != null)
     {
         Reporting.SendReports(this.ddlReportTo.SelectedItem.Tag.ToString());
     }
 }
开发者ID:s0lt4r,项目名称:spamgrabber,代码行数:7,代码来源:SpamGrabber+Ribbon.cs

示例7: editPoll_Click

        private void editPoll_Click(object sender, RibbonControlEventArgs e)
        {
            // Get the current slide
            PowerPoint.Slide sld = Globals.ThisAddIn.Application.ActiveWindow.View.Slide;

            // Get access to the xml for that slide
            CustomXMLPart xml = sld.CustomerData._Index(1);
            string question = xml.SelectSingleNode("/CP3Poll/PollQuestion").Text;
            string type = xml.SelectSingleNode("/CP3Poll/PollType").Text;
            string correctAnswer = xml.SelectSingleNode("/CP3Poll/PollCorrectAnswer").Text;

            // Ensure we got valid results
            if (question != null && type != null && correctAnswer != null)
            {
                // If this is a multiple choice question
                // TODO: Change this question type thing to an enum
                if (type.ToLower().Contains("multiple choice"))
                {
                    string[] answers = new string[5];
                    // Iterate through each possible correctAnswer
                    for (int i = 1; i <= 5; ++i)
                    {
                        // Add the correctAnswer to the array
                        answers[i-1] = xml.SelectSingleNode("/CP3Poll/PollAnswers/Answer" + i).Text;
                    }
                    Form1 editPoll = new Form1(question, correctAnswer, answers);
                    editPoll.Show();
                }
                else
                { // True / false
                    Form1 editPoll = new Form1(question, correctAnswer);
                    editPoll.Show();
                }
            }
        }
开发者ID:kevinbrink,项目名称:PowerPoint_Poll,代码行数:35,代码来源:cp3_ribbon.cs

示例8: Configure_Click

 private void Configure_Click(object sender, RibbonControlEventArgs e)
 {
     ThisAddIn addIn = Globals.ThisAddIn;
     NamedRangeProvider nrp = addIn.NamedRangeProvider;
     nrp.Clear();
     var d = new ProjectConfigurationDialogue(addIn, nrp);
     if (m_bounds.HasValue) {
         d.Bounds = m_bounds.Value;
         d.StartPosition = FormStartPosition.Manual;
     }
     d.Mode = addIn.Mode;
     ProjectInvocationRule[] rules = addIn.Rules;
     d.SetRules(rules);
     var result = d.ShowDialog();
     if (result == DialogResult.OK) {
         addIn.Mode = d.Mode;
         addIn.Rules = rules = d.GetRules();
         addIn.WriteRules();
     }
     else {
         /* It is possible that something has been changed in Excel - a range name, for example -
          * and this has had an effect on the validity of a project invocation rule.  Even if the
          * user cancels the dialogue, we should take this opportunity to ensure that the Run
          * button's enabled state is set correctly.
          * */
         foreach (ProjectInvocationRule rule in rules) {
             rule.UpdateValidity();
         }
         addIn.UpdateExecutionState();
     }
     m_bounds = d.Bounds;
 }
开发者ID:piquant,项目名称:AbsyntaxExcelAddIn,代码行数:32,代码来源:Ribbon.cs

示例9: buttonLaunch_Click

        private void buttonLaunch_Click(object sender, RibbonControlEventArgs e)
        {
            //Reading the data.
            var rangePossibleValues = ((Excel.Range)Globals.ThisAddIn.Application.get_Range(this.editBoxPossibleValues.Text));
            var rangeRulesMatrix = ((Excel.Range)Globals.ThisAddIn.Application.get_Range(this.editBoxRulesMatrix.Text));
            var listPossibleValues = convertRangeToStringArrays(rangePossibleValues, true);
            var listRulesMatrix = convertRangeToStringArrays(rangeRulesMatrix, false);

            //Generating the solution.
            try
            {
                var model = new SmartPermutations(listPossibleValues, listRulesMatrix);
                string[,] permutationMatrix = model.ComputePermutationMatrix();

                //Copying the data to a new sheet.
                Excel.Worksheet newWorksheet;
                newWorksheet = (Excel.Worksheet)Globals.ThisAddIn.Application.ActiveWorkbook.Worksheets.Add();

                var startCell = (Excel.Range)newWorksheet.Cells[1, 1];
                var endCell = (Excel.Range)newWorksheet.Cells[permutationMatrix.GetLength(0), permutationMatrix.GetLength(1)];
                var writeRange = newWorksheet.Range[startCell, endCell];

                writeRange.Value2 = permutationMatrix;
            }
            catch (ExceptionInvalidData ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
开发者ID:BietteMaxime,项目名称:SmartPermutationsExcelAddIn,代码行数:29,代码来源:ControlsRibbon.cs

示例10: btnHelp_Click

 public static void btnHelp_Click(object sender, RibbonControlEventArgs e)
 {
     string baseurl = string.Empty;
     baseurl = System.Configuration.ConfigurationManager.AppSettings["helpurl"];
     var module = ((RibbonButton)sender).Tag as AddinModule;
     System.Diagnostics.Process.Start(baseurl + module.HelpHref);
 }
开发者ID:PSDevGithub,项目名称:PSExcelAddin2010,代码行数:7,代码来源:GeneralModuleObjects.cs

示例11: buttonGenerateData_Click

 private void buttonGenerateData_Click(object sender, RibbonControlEventArgs e)
 {
     using (DataSchemaForm form = new DataSchemaForm())
     {
         form.ShowDialog();
     }
 }
开发者ID:helgihaf,项目名称:Alpha,代码行数:7,代码来源:DataSchemaRibbon.cs

示例12: button1_Click

        private void button1_Click(object sender, RibbonControlEventArgs e)
        {
            if (settingsWindow.ShowDialog() == DialogResult.OK)
            {
                foreach (Workbook wb in Globals.ThisAddIn.Application.Workbooks)
                {
                    if (IsWorkbookInBasePath(wb))
                    {
                        var cfg = new ConfigManager(wb);
                        dic_wb_cm.Add(wb, cfg);
                        if (wb == Globals.ThisAddIn.Application.ActiveWorkbook)
                            cfg.ShowUIPane(true);
                    }
                    else
                    {
                        ConfigManager cfg = null;
                        if (dic_wb_cm.TryGetValue(wb, out cfg))
                        {
                            cfg.Dispose();
                            dic_wb_cm.Remove(wb);
                        }
                    }
                }

                foreach (var cfg in dic_wb_cm.Values.ToArray())
                {
                    if (!IsWorkbookInBasePath(cfg.Wb))
                    {
                        cfg.Dispose();
                        dic_wb_cm.Remove(cfg.Wb);
                    }
                }
            }
        }
开发者ID:tyrant39001,项目名称:Tyrant,代码行数:34,代码来源:Ribbon1.cs

示例13: ImportIcsData_Click

    private async void ImportIcsData_Click (object sender, RibbonControlEventArgs e)
    {
      try
      {
        EnsureSynchronizationContext ();

        var dataInputWindow = CreateWindowWithTextBox();
        dataInputWindow.Item1.ShowDialog();

        var entitySynchronizationLogger = new EntitySynchronizationLogger ();

        await OutlookTestContext.EventRepository.Create (
            async appointmentWrapper => await OutlookTestContext.EntityMapper.Map2To1 (
                OutlookTestContext.DeserializeICalendar (dataInputWindow.Item2.Text),
                appointmentWrapper,
                entitySynchronizationLogger),
            NullEventSynchronizationContext.Instance);

        var reportWindow = CreateWindowWithTextBox();
        reportWindow.Item2.Text = "SynchronizationReport:\r\n" + Serializer<EntitySynchronizationReport>.Serialize (entitySynchronizationLogger.GetReport());
        reportWindow.Item1.ShowDialog();
      }
      catch (Exception x)
      {
        ExceptionHandler.Instance.DisplayException (x, s_logger);
      }
    }
开发者ID:aluxnimm,项目名称:outlookcaldavsynchronizer,代码行数:27,代码来源:TestAutomationRibbon.cs

示例14: button1_Click

        //Botton "Export Data"
        private void button1_Click(object sender, RibbonControlEventArgs e)
        {
            try
            {
                int START_ROW = 9;
                int START_COL = 3;
                Excel.Worksheet active_worksheet = Globals.ThisAddIn.Application.ActiveSheet;

                //Acquire Target Data and Export
                Target TargetData = new Target();
                TargetData.GetData(active_worksheet);
                TargetData.ExportData();

                //Acquire Comparable Data and Export
                for (int col_index = START_COL; active_worksheet.Cells[START_ROW, col_index].Value != null ; col_index ++)
                {
                    Comparable comparable_data = new Comparable();
                    comparable_data.GetData(active_worksheet, START_ROW, col_index);
                    comparable_data.ExportData();
                }

                MessageBox.Show("Successfully export data.");
            }
            catch (Exception exception)
            {
                Debug.WriteLine(exception.ToString());

            }
        }
开发者ID:LeaveYeah,项目名称:ExcelAddInWACC,代码行数:30,代码来源:RibbonWACC.cs

示例15: selectButton_Click

 private void selectButton_Click(object sender, RibbonControlEventArgs e)
 {
     Object val = Globals.Program.currUserKey.GetValue("Folder", "");
     if (val != null && val.GetType() == this.openFile.Filter.GetType())
         select.setSelectedFolder(val.ToString());
     select.ShowDialog();
 }
开发者ID:RichardRanft,项目名称:Importer,代码行数:7,代码来源:ImporterRibbon.cs


注:本文中的RibbonControlEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。