Ejemplo n.º 1
0
        public void OnClick(object sender, EventArgs e)
        {
            IButtonMetadata meta = PluginManager.GetMedadata();

            MessageBox.Show(string.Format("{0} has been pressed\r\n\r\nDataGrid contains {1} rows", meta.Text, PluginManager.DataGrid.Rows.Count), this.GetType().Assembly.GetName().Name, MessageBoxButtons.OK);
            PluginLogger.Debug("{0} has been pressed", meta.Text);
        }
Ejemplo n.º 2
0
    public static void LogAsDebug(this object message)
    {
        var    method = new StackFrame(1).GetMethod();
        string caller = method.DeclaringType.ToString() + "." + method.Name;

        PluginLogger.Debug(caller + "|" + message ?? "<null>");
    }
Ejemplo n.º 3
0
        public void OnClick(object sender, EventArgs e)
        {
            IMenuMetadata meta = PluginManager.GetMedadata();

            MessageBox.Show(string.Format("{0} has been pressed", meta.Text), this.GetType().Assembly.GetName().Name, MessageBoxButtons.OK);
            PluginLogger.Debug("{0} has been pressed", meta.Text);
        }
Ejemplo n.º 4
0
 public static void LogAsDebugAsync(this object message, int asyncDelay = 0)
 {
     Task.Factory.StartNew(() =>
     {
         if (asyncDelay > 0)
         {
             System.Threading.Thread.Sleep(asyncDelay);
         }
         PluginLogger.Debug(message);
     });
 }
Ejemplo n.º 5
0
 public void SubMenuOnClick(object sender, EventArgs e)
 {
     MessageBox.Show(string.Format("{0} has been pressed", ((ToolStripMenuItem)sender).Text), this.GetType().Assembly.GetName().Name, MessageBoxButtons.OK);
     PluginLogger.Debug("{0} has been pressed", ((ToolStripMenuItem)sender).Text);
 }