コード例 #1
0
        protected void OnStop(object sender, EventArgs e)
        {
            this.ContentTimer.Stop();
            this.ContentTimer.Enabled = false;
            try
            {
                var accessOutlook7 = new AccessOutlook();
                if (EventLog.SourceExists("Application"))
                {
                    this.QuotesEventLog.WriteEntry("The QuotesWin32 services stopted successfully at "
                                                   + Convert.ToString(System.DateTime.Now)
                                                   + ".", EventLogEntryType.Information);
                }
            }
            catch (Exception exception)
            {
                if (EventLog.SourceExists("Application"))
                {
                    this.QuotesEventLog.WriteEntry("The QuotesWin services discovered an unexpected error: "
                                                   + Convert.ToString(DateTime.Now)
                                                   + ". "
                                                   + exception.Message,
                                                   EventLogEntryType.Information);
                }
            }

            mnuItems[0].Enabled = true;
            mnuItems[1].Enabled = false;
            mnuItems[1].Checked = true;
            mnuItems[0].Checked = false;
            mnuItems[2].Checked = false;
            mnuItems[2].Enabled = false;
        }
コード例 #2
0
        private void LoadQuote(bool newTemplate)
        {
            var accessOutlook = new AccessOutlook();

            if (accessOutlook.IsOutlookRunning())
            {
                accessOutlook.SignatureRawText(true, newTemplate);
            }
        }