Пример #1
0
 private void listBox1_DoubleClick(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         LogEvent le = (LogEvent)listBox1.SelectedItem;
         if (le.PMR != null)
         {
             if (le.PMR.actualModule != null)
             {
                 try
                 {
                     UserControl uc = le.PMR.actualModule.GetControl();
                     if (uc != null)
                     {
                         ThemedForm f = new ThemedForm();
                         f.Size = new System.Drawing.Size(640, 480);
                         System.Reflection.Assembly target = System.Reflection.Assembly.GetExecutingAssembly();
                         f.Icon = new System.Drawing.Icon(target.GetManifestResourceStream("PassThru.Resources.newIcon.ico"));
                         f.Text = le.PMR.actualModule.adapter.InterfaceInformation.Name + ": " + le.PMR.actualModule.MetaData.Name + " - " + le.PMR.actualModule.MetaData.Version;
                         f.Controls.Add(uc);
                         ColorScheme.SetColorScheme(f);
                         f.Show();
                     }
                 }
                 catch (Exception ne)
                 {
                     LogCenter.WriteErrorLog(ne);
                 }
             }
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Builds the module Help window
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonHelp_Click(object sender, EventArgs e)
 {
     try
     {
         ThemedForm f = new ThemedForm();
         f.Size = new System.Drawing.Size(640, 480);
         System.Reflection.Assembly target = System.Reflection.Assembly.GetExecutingAssembly();
         f.Icon = new System.Drawing.Icon(target.GetManifestResourceStream("PassThru.Resources.newIcon.ico"));
         f.Text = "Help";
         Help uc = new Help(checkedListBoxModules.SelectedItem);
         uc.Dock = DockStyle.Fill;
         f.Controls.Add(uc);
         ColorScheme.SetColorScheme(f);
         f.Show();
     }
     catch(Exception ne)
     {
         LogCenter.WriteErrorLog(ne);
     }
 }
 /// <summary>
 /// Builds the module Help window
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void buttonHelp_Click(object sender, EventArgs e)
 {
     try
     {
         ThemedForm f = new ThemedForm();
         f.Size = new System.Drawing.Size(640, 480);
         System.Reflection.Assembly target = System.Reflection.Assembly.GetExecutingAssembly();
         f.Icon = new System.Drawing.Icon(target.GetManifestResourceStream("PassThru.Resources.newIcon.ico"));
         f.Text = "Help";
         Help uc = new Help(checkedListBoxModules.SelectedItem);
         uc.Dock = DockStyle.Fill;
         f.Controls.Add(uc);
         ColorScheme.SetColorScheme(f);
         f.Show();
     }
     catch (Exception ne)
     {
         LogCenter.WriteErrorLog(ne);
     }
 }
 private void buttonOpenConfiguration_Click(object sender, EventArgs e)
 {
     try
     {
         UserControl uc = na.modules.GetModule(checkedListBoxModules.SelectedIndex).GetControl();
         if (uc != null)
         {
             ThemedForm f = new ThemedForm();
             f.Size = new System.Drawing.Size(640, 480);
             System.Reflection.Assembly target = System.Reflection.Assembly.GetExecutingAssembly();
             f.Icon = new System.Drawing.Icon(target.GetManifestResourceStream("PassThru.Resources.newIcon.ico"));
             f.Text = na.InterfaceInformation.Name + ": " + na.modules.GetModule(checkedListBoxModules.SelectedIndex).MetaData.Name + " - " + na.modules.GetModule(checkedListBoxModules.SelectedIndex).MetaData.Version;
             f.Controls.Add(uc);
             ColorScheme.SetColorScheme(f);
             f.Show();
         }
     }
     catch (Exception ne)
     {
         LogCenter.WriteErrorLog(ne);
     }
 }
Пример #5
0
 private void buttonOpenConfiguration_Click(object sender, EventArgs e)
 {
     try
     {
         UserControl uc = na.modules.GetModule(checkedListBoxModules.SelectedIndex).GetControl();
         if (uc != null)
         {
             ThemedForm f = new ThemedForm();
             f.Size = new System.Drawing.Size(640, 480);
             System.Reflection.Assembly target = System.Reflection.Assembly.GetExecutingAssembly();
             f.Icon = new System.Drawing.Icon(target.GetManifestResourceStream("PassThru.Resources.newIcon.ico"));
             f.Text = na.InterfaceInformation.Name + ": " + na.modules.GetModule(checkedListBoxModules.SelectedIndex).MetaData.Name + " - " + na.modules.GetModule(checkedListBoxModules.SelectedIndex).MetaData.Version;
             f.Controls.Add(uc);
             ColorScheme.SetColorScheme(f);
             f.Show();
         }
     }
     catch (Exception ne)
     {
         LogCenter.WriteErrorLog(ne);
     }
 }
Пример #6
0
 public Controls(ThemedForm form, Control panel)
 {
     contentPanel = panel;
     themedform   = form;
 }
Пример #7
0
 private void listBox1_DoubleClick(object sender, EventArgs e)
 {
     if (listBox1.SelectedItem != null)
     {
         LogEvent le = (LogEvent)listBox1.SelectedItem;
         if (le.PMR != null)
         {
             if (le.PMR.actualModule != null)
             {
                 try
                 {
                     UserControl uc = le.PMR.actualModule.GetControl();
                     if (uc != null)
                     {
                         ThemedForm f = new ThemedForm();
                         f.Size = new System.Drawing.Size(640, 480);
                         System.Reflection.Assembly target = System.Reflection.Assembly.GetExecutingAssembly();
                         f.Icon = new System.Drawing.Icon(target.GetManifestResourceStream("PassThru.Resources.newIcon.ico"));
                         f.Text = le.PMR.actualModule.adapter.InterfaceInformation.Name + ": " + le.PMR.actualModule.MetaData.Name + " - " + le.PMR.actualModule.MetaData.Version;
                         f.Controls.Add(uc);
                         ColorScheme.SetColorScheme(f);
                         f.Show();
                     }
                 }
                 catch (Exception ne)
                 {
                     LogCenter.WriteErrorLog(ne);
                 }
             }
         }
     }
 }