Beispiel #1
0
 private static void CheckBox(BinaryWriter Data, Lists.Structures.CheckBox Tool)
 {
     // Escreve os dados
     Data.Write(Tool.Name);
     Data.Write(Tool.Position.X);
     Data.Write(Tool.Position.Y);
     Data.Write(Tool.Visible);
     Data.Write((byte)Tool.Window);
     Data.Write(Tool.Text);
     Data.Write(Tool.Checked);
 }
Beispiel #2
0
 private static Lists.Structures.CheckBox CheckBox(BinaryReader Data)
 {
     // Carrega os dados
     Lists.Structures.CheckBox Tool = new Lists.Structures.CheckBox
     {
         Name     = Data.ReadString(),
         Position = new System.Drawing.Point(Data.ReadInt32(), Data.ReadInt32()),
         Visible  = Data.ReadBoolean(),
         Window   = (Globals.Windows)Data.ReadByte(),
         Text     = Data.ReadString(),
         Checked  = Data.ReadBoolean()
     };
     return(Tool);
 }
Beispiel #3
0
    private static void CheckBox(Lists.Structures.CheckBox Tool)
    {
        // Define as propriedades dos retângulos
        Rectangle Rec_Source  = new Rectangle(new Point(), new Size(TSize(Tex_CheckBox).Width / 2, TSize(Tex_CheckBox).Height));
        Rectangle Rec_Destiny = new Rectangle(Tool.Position, Rec_Source.Size);

        // Desenha a textura do marcador pelo seu estado
        if (Tool.Checked)
        {
            Rec_Source.Location = new Point(TSize(Tex_CheckBox).Width / 2, 0);
        }

        // Desenha o marcador
        byte Margin = 4;

        Render(Win_Interface, Tex_CheckBox, Rec_Source, Rec_Destiny);
        DrawText(Win_Interface, Tool.Text, Rec_Destiny.Location.X + TSize(Tex_CheckBox).Width / 2 + Margin, Rec_Destiny.Location.Y + 1, SFML.Graphics.Color.White);
    }
Beispiel #4
0
    private void butConfirm_Click(object sender, EventArgs e)
    {
        // Adiciona uma nova ferramenta
        Lists.Structures.Tool Tool = new Lists.Structures.Tool();
        switch ((Globals.Tools_Types)cmbType.SelectedIndex)
        {
        case Globals.Tools_Types.Button: Tool = new Lists.Structures.Button(); break;

        case Globals.Tools_Types.Panel: Tool = new Lists.Structures.Panel(); break;

        case Globals.Tools_Types.CheckBox: Tool = new Lists.Structures.CheckBox(); break;

        case Globals.Tools_Types.TextBox: Tool = new Lists.Structures.TextBox(); break;
        }
        Lists.Tool.Nodes[cmbWindows.SelectedIndex].Nodes.Add("[" + ((Globals.Tools_Types)cmbType.SelectedIndex).ToString() + "] ");
        Tool.Window = (Globals.Windows)cmbWindows.SelectedIndex;
        Lists.Tool.Nodes[cmbWindows.SelectedIndex].LastNode.Tag = Tool;
        grpNew.Visible = false;
    }