Ejemplo n.º 1
0
    private void buttonNewIR_Click(object sender, EventArgs e)
    {
      _learnIR = new LearnIR(
        TV2BlasterPlugin.LearnIR,
        TV2BlasterPlugin.BlastIR,
        TV2BlasterPlugin.TransceiverInformation.Ports);

      _learnIR.ShowDialog(this);

      _learnIR = null;

      RefreshIRList();
    }
Ejemplo n.º 2
0
    private void EditIR()
    {
      if (listViewIR.SelectedItems.Count != 1)
        return;

      try
      {
        string command = listViewIR.SelectedItems[0].Text;
        string fileName = Path.Combine(Common.FolderIRCommands, command + Common.FileExtensionIR);

        if (File.Exists(fileName))
        {
          _learnIR = new LearnIR(
            TV2BlasterPlugin.LearnIR,
            TV2BlasterPlugin.BlastIR,
            TV2BlasterPlugin.TransceiverInformation.Ports,
            command);

          _learnIR.ShowDialog(this);

          _learnIR = null;
        }
        else
        {
          RefreshIRList();

          throw new FileNotFoundException("IR file missing", fileName);
        }
      }
      catch (Exception ex)
      {
        Log.Error(ex);
        MessageBox.Show(this, ex.Message, "Failed to edit IR file", MessageBoxButtons.OK, MessageBoxIcon.Error);
      }
    }
    private void buttonLearnIR_Click(object sender, EventArgs e)
    {
      _learnIR = new LearnIR(
        Program.LearnIR,
        Program.BlastIR,
        Program.TransceiverInformation.Ports);

      _learnIR.ShowDialog(this);

      _learnIR = null;

      SetupIRList();
    }
Ejemplo n.º 4
0
    private void EditIRCommand(object sender, EventArgs e)
    {
      if (listViewIR.SelectedItems.Count != 1)
        return;

      string command = listViewIR.SelectedItems[0].Text;
      string fileName = Path.Combine(Common.FolderIRCommands, command + Common.FileExtensionIR);

      if (File.Exists(fileName))
      {
        _learnIR = new LearnIR(
          Program.LearnIR,
          Program.BlastIR,
          Program.TransceiverInformation.Ports,
          command);

        _learnIR.ShowDialog(this);

        _learnIR = null;
      }
      else
      {
        MessageBox.Show(this, "File not found: " + fileName, "IR file missing", MessageBoxButtons.OK,
                        MessageBoxIcon.Exclamation);
        RefreshIRList();
      }
    }
Ejemplo n.º 5
0
    private void NewIRCommand(object sender, EventArgs e)
    {
      _learnIR = new LearnIR(
        Program.LearnIR,
        Program.BlastIR,
        Program.TransceiverInformation.Ports);

      _learnIR.ShowDialog(this);

      _learnIR = null;

      RefreshIRList();
    }
Ejemplo n.º 6
0
    private void buttonNewIR_Click(object sender, EventArgs e)
    {
      _learnIR = new LearnIR(
        MPControlPlugin.LearnIR,
        MPControlPlugin.BlastIR,
        MPControlPlugin.TransceiverInformation.Ports);

      _learnIR.ShowDialog(this);

      _learnIR = null;

      RefreshIRList();
      RefreshEventMapperCommands();
    }