Esempio n. 1
0
 private void PluginCommands_Shown(object sender, EventArgs e)
 {
     if (PluginRequestData.New)
     {
         PluginName.ReadOnly = false;
         PluginID.ReadOnly   = false;
         PluginName.Text     = Path.GetFileNameWithoutExtension(@PluginRequestData.FileName);
         Create.Visible      = true;
         Cancel.Visible      = true;
         Create.Text         = "Create Documentation";
         Cancel.Text         = "Cancel Creation";
         DataPanel.Visible   = false;
     }
     else
     {
         PluginName.ReadOnly    = true;
         PluginID.ReadOnly      = true;
         PluginName.Text        = Path.GetFileNameWithoutExtension(@PluginRequestData.FileName);
         PluginName.TabStop     = false;
         PluginID.TabStop       = false;
         PluginID.Text          = PluginRequestData.SerialNumber;
         Create.Visible         = false;
         Cancel.Visible         = true;
         Save.Visible           = true;
         Cancel.Text            = "Cancel";
         PluginRequestData.Save = false;
         DataPanel.Visible      = true;;
         CommandNumber.Focus();
     }
     FillTheScreen();
 }
 public GenKillOneCommand CalculateGenAndKill(BasicBlock block, ThreeAddressCommand command)
 {
     Kill.Clear();
     Gen = null;
     if (command.GetType() == typeof(Assignment))
     {
         Gen = new CommandNumber(block.BlockId, block.Commands.IndexOf(command));
         string target = (command as Assignment).Target.Name;
         foreach (var c in CommandStorage[target])
             if (c.BlockId != block.BlockId && c.CommandId != block.Commands.IndexOf(command))
                 Kill.Add(new CommandNumber(c.BlockId, c.CommandId));
     }
     return new GenKillOneCommand(Gen, Kill);
 }
Esempio n. 3
0
 /// <inheritdoc cref="object.ToString" />
 public override string ToString()
 {
     return(string.Format
            (
                "Number: {0}, IPAddress: {1}, "
                + "Name: {2}, ID: {3}, Workstation: {4}, "
                + "Started: {5}, LastCommand: {6}, "
                + "CommandNumber: {7}, ProcessID: {8}, "
                + "State: {9}",
                Number.ToVisibleString(),
                IPAddress.ToVisibleString(),
                Name.ToVisibleString(),
                ClientID.ToVisibleString(),
                Workstation.ToVisibleString(),
                Started.ToVisibleString(),
                LastCommand.ToVisibleString(),
                CommandNumber.ToVisibleString(),
                ProcessID.ToVisibleString(),
                State.ToVisibleString()
            ));
 }
Esempio n. 4
0
 public GenKillOneCommand(CommandNumber gen, ISet <CommandNumber> kill)
 {
     Gen  = gen;
     Kill = kill;
 }