private static void Panel(Lists.Structures.Panel Tool) { // Desenha o painel if (Tool.Texture_Num < Tex_Panel.Length) { Render(Win_Interface, Tex_Panel[Tool.Texture_Num], Tool.Position); } }
private static void Panel(BinaryWriter Data, Lists.Structures.Panel 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.Texture_Num); }
private static Lists.Structures.Panel Panel(BinaryReader Data) { // Carrega os dados Lists.Structures.Panel Tool = new Lists.Structures.Panel { Name = Data.ReadString(), Position = new System.Drawing.Point(Data.ReadInt32(), Data.ReadInt32()), Visible = Data.ReadBoolean(), Window = (Globals.Windows)Data.ReadByte(), Texture_Num = Data.ReadByte() }; return(Tool); }
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; }