Beispiel #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (sender is Button)
     {
         Button b = sender as Button;
         if (b.Tag != null && b.Tag is ContentServer.ButtonCommandTag)
         {
             ContentServer.ButtonCommandTag bct = b.Tag as ContentServer.ButtonCommandTag;
             content.ExecuteCommand(bct.Command);
         }
     }
 }
Beispiel #2
0
 private void button1_MouseClick(object sender, MouseEventArgs e)
 {
     if (sender is Button)
     {
         if (e.Button == System.Windows.Forms.MouseButtons.Right)
         {
             Button b = sender as Button;
             if (b.Tag != null && b.Tag is ContentServer.ButtonCommandTag)
             {
                 ContentServer.ButtonCommandTag bct = b.Tag as ContentServer.ButtonCommandTag;
                 if (bct.StringIndex >= 0)
                 {
                     ContentServer.currentEditButtonStringIndex = bct.StringIndex;
                     showEditTranslationMenu();
                 }
             }
         }
     }
 }