예제 #1
0
 public manageTargetsDialog(main m,LinkedList<nodeTarget> targets,manageMode mmode,nodeTarget targetToEdit)
 {
     InitializeComponent();
     this.m = m;
     this.targets = targets;
     this.targetToEdit = targetToEdit;
     setMode(mmode);
 }
예제 #2
0
 public void loadSettings()
 {
     Hashtable saveblock;
     IFormatter formatter = new BinaryFormatter();
     if (File.Exists(Application.StartupPath + "/settings.dat"))
     {
         try
         {
             Stream st = File.OpenRead(Application.StartupPath + "/settings.dat");
             saveblock = (Hashtable)formatter.Deserialize(st);
             st.Close();
             recentFiles = (LinkedList<string>)saveblock["recentFiles"];
             serialSettings = (Hashtable)saveblock["serialSettings"];
             targets = (LinkedList<nodeTarget>)saveblock["targets"];
             currentTarget = (nodeTarget)saveblock["currentTarget"];
             currentLoadedFile = (string)saveblock["currentLoadedFile"];
             myid = (byte)saveblock["myid"];
         }
         catch (Exception) { }
     }
 }
예제 #3
0
 void tidel_Click(object sender, EventArgs e)
 {
     targetItemDelete tidel = (targetItemDelete)sender;
     if (tidel.getTargetItem().getNodeTarget().Equals(currentTarget)) currentTarget = null;
     targets.Remove(tidel.getTargetItem().getNodeTarget());
     refreshTargets();
     saveSettings();
 }
예제 #4
0
 public targetItem(nodeTarget nt)
 {
     this.nt = nt;
     if (nt == null) nt = new nodeTarget();
 }
예제 #5
0
 private void targetItem_Click(object sender, EventArgs e)
 {
     targetItem ti = (targetItem)sender;
     currentTarget = ti.getNodeTarget();
     for (int i = 2; i < menu_target.DropDownItems.Count; i++)
     {
         ((targetItem)menu_target.DropDownItems[i]).Checked = false;
     }
     ti.Checked = true;
     saveSettings();
 }