Exemplo n.º 1
0
        public SkinColorsDialog(Window parent, TDSkin skn)
            : base(parent, 0, wxPorting.L("Skin Colors"), Window.wxDefaultPosition, Window.wxDefaultSize,
                   WindowStyles.DD_DEFAULT_STYLE, wxPorting.L("Skin Colors"))
        {
            EVT_BUTTON((int)MenuIDs.ID_CHOICE, new wx.EventListener(OnColorChoice));

            m_skin = skn;

            BoxSizer column = new BoxSizer(Orientation.wxVERTICAL);

            AddSkinRow(this, column, wxPorting.L("Background"), m_background, m_skin.background);
            AddSkinRow(this, column, wxPorting.L("Free Track"), m_freeTrack, m_skin.free_track);
            AddSkinRow(this, column, wxPorting.L("Reserved Track"), m_reservedTrack, m_skin.reserved_track);
            AddSkinRow(this, column, wxPorting.L("Reserved for Shunting"), m_reservedShunting, m_skin.reserved_shunting);
            AddSkinRow(this, column, wxPorting.L("Occupied"), m_occupiedTrack, m_skin.occupied_track);
            AddSkinRow(this, column, wxPorting.L("Reserved for Working"), m_workingTrack, m_skin.working_track);
            AddSkinRow(this, column, wxPorting.L("Switch Outline"), m_outline, m_skin.outline);
            AddSkinRow(this, column, wxPorting.L("Text"), m_text, m_skin.text);

            BoxSizer row = new BoxSizer(Orientation.wxHORIZONTAL);

            row.Add(new Button(this, wxID_CANCEL, wxPorting.L("Cance&l")), 0, SizerFlag.wxALL, 4);
            row.Add(new Button(this, wxID_OK, wxPorting.L("&Close")), 0, SizerFlag.wxALL, 4);
            column.Add(row, 0, SizerFlag.wxALIGN_RIGHT | SizerFlag.wxGROW | SizerFlag.wxALL, 6);

            SetSizer(column);
            column.Fit(this);
            column.SetSizeHints(this);
        }
Exemplo n.º 2
0
        public ScenarioInfoDialog(Window parent)
            : base(parent, 0, wxPorting.L("Scenario Information"), Window.wxDefaultPosition, Window.wxDefaultSize,
                   WindowStyles.DD_DEFAULT_STYLE, wxPorting.L("Scenario Information"))
        {
            BoxSizer buttonCol  = new BoxSizer(Orientation.wxVERTICAL);
            BoxSizer column     = new BoxSizer(Orientation.wxVERTICAL);
            BoxSizer leftColumn = new BoxSizer(Orientation.wxVERTICAL);
            BoxSizer row        = new BoxSizer(Orientation.wxHORIZONTAL);
            ListItem col        = new ListItem();

            m_notes = new TextCtrl(this, wxID_ANY, Globals.wxEmptyString,
                                   Window.wxDefaultPosition, new Size(200, 100), WindowStyles.TE_MULTILINE);

            leftColumn.Add(m_notes, 2, SizerFlag.wxGROW | SizerFlag.wxALL, 3);

            row.Add(leftColumn, 60, SizerFlag.wxGROW | SizerFlag.wxRIGHT | SizerFlag.wxLEFT, 3);

            buttonCol.Add(row, 0, SizerFlag.wxGROW | SizerFlag.wxALL, 5);

            row = new BoxSizer(Orientation.wxHORIZONTAL);
            row.Add(new Button(this, wxID_OK, wxPorting.L("&OK")), 0, SizerFlag.wxALL, 4);
            row.Add(new Button(this, wxID_CANCEL, wxPorting.L("&Cancel")), 0, SizerFlag.wxALL, 4);

            buttonCol.Add(row, 0, SizerFlag.wxALIGN_RIGHT | SizerFlag.wxGROW | SizerFlag.wxALL, 6);
            SetSizer(buttonCol);
            buttonCol.Fit(this);
            buttonCol.SetSizeHints(this);
        }
Exemplo n.º 3
0
            //
            //
            //


            public SwitchboardCellDialog(Window parent)
                : base(parent, 0, wxPorting.T("Switchboard Name"), Window.wxDefaultPosition, Window.wxDefaultSize,
                       WindowStyles.DD_DEFAULT_STYLE, wxPorting.L("Switchboard Name"))
            {
                EVT_BUTTON((int)wx.MenuIDs.wxID_RESET, new wx.EventListener(OnRemove));
                EVT_BUTTON((int)wx.MenuIDs.wxID_OK, new wx.EventListener(OnSave));
                EVT_BUTTON((int)wx.MenuIDs.wxID_CANCEL, new wx.EventListener(OnClose));



                ArrayString strings;
                BoxSizer    column = new BoxSizer(Orientation.wxVERTICAL);
                BoxSizer    row    = new BoxSizer(Orientation.wxHORIZONTAL);

                StaticText header = new StaticText(this, 0, wxPorting.L("&Label"));

                m_name = new TextCtrl(this, 0, Globals.wxEmptyString, Window.wxDefaultPosition, Window.wxDefaultSize);

                row.Add(header, 35, SizerFlag.wxALIGN_LEFT | SizerFlag.wxRIGHT, 4);
                row.Add(m_name, 65, SizerFlag.wxGROW | SizerFlag.wxALIGN_RIGHT | SizerFlag.wxLEFT, 6);

                column.Add(row, 1, SizerFlag.wxGROW | SizerFlag.wxTOP | SizerFlag.wxRIGHT | SizerFlag.wxLEFT, 10);

                row = new BoxSizer(Orientation.wxHORIZONTAL);

                header = new StaticText(this, 0, wxPorting.L("&Itinerary Name"));
                m_itin = new TextCtrl(this, 0, Globals.wxEmptyString, Window.wxDefaultPosition, Window.wxDefaultSize);

                row.Add(header, 35, SizerFlag.wxALIGN_LEFT | SizerFlag.wxRIGHT, 4);
                row.Add(m_itin, 65, SizerFlag.wxGROW | SizerFlag.wxALIGN_RIGHT | SizerFlag.wxLEFT, 6);

                column.Add(row, 1, SizerFlag.wxGROW | SizerFlag.wxTOP | SizerFlag.wxRIGHT | SizerFlag.wxLEFT, 10);
                //	wxStaticLine *line = new wxStaticLine( this );

                //	column.Add(line);

                row = new BoxSizer(Orientation.wxHORIZONTAL);

                m_removebutton = new Button(this, (int)wx.MenuIDs.wxID_RESET, wxPorting.L("&Remove"));
                row.Add(m_removebutton, 0, SizerFlag.wxTOP | SizerFlag.wxGROW, 10);
                m_savebutton = new Button(this, wxID_OK, wxPorting.L("&Save"));
                m_savebutton.SetDefault();
                row.Add(m_savebutton, 0, SizerFlag.wxTOP | SizerFlag.wxGROW, 10);
                m_closebutton = new Button(this, wxID_CANCEL, wxPorting.L("Cl&ose"));
                row.Add(m_closebutton, 0, SizerFlag.wxTOP | SizerFlag.wxGROW, 10);

                column.Add(row, 1, SizerFlag.wxGROW | SizerFlag.wxTOP | SizerFlag.wxRIGHT | SizerFlag.wxLEFT, 10);

                SetSizer(column);
                column.Fit(this);
                column.SetSizeHints(this);
            }
Exemplo n.º 4
0
    public static Sizer frmSobre(Window parent, bool call_fit, bool set_sizer)
    {
        BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL);

        StaticBox      item2 = new StaticBox(parent, -1, "");
        StaticBoxSizer item1 = new StaticBoxSizer(item2, Orientation.wxVERTICAL);

        StaticBitmap item3 = new StaticBitmap(parent, ID_STATICBITMAP, ListaBitmaps(6), Window.wxDefaultPosition, Window.wxDefaultSize);

        item1.Add(item3, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        StaticText item4 = new StaticText(parent, ID_TEXT, "Versão: 1.0.0", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item1.Add(item4, 0, Alignment.wxALIGN_RIGHT | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5);

        StaticText item5 = new StaticText(parent, ID_TEXT, "Todos os direitos reservados para: Henrique F. de Souza", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item1.Add(item5, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        StaticText item6 = new StaticText(parent, ID_TEXT, "Sistema integrante do projeto Livrus Virtus,", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item1.Add(item6, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        StaticText item7 = new StaticText(parent, ID_TEXT, "versão programado no wxDesigner.", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item1.Add(item7, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        item0.Add(item1, 0, Stretch.wxGROW | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5);

        Button item8 = new Button(parent, BTN_OK, "OK", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item8.Name = "btnOk";
        item0.Add(item8, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        if (set_sizer)
        {
            // parent.SetAutoLayout( true );
            parent.SetSizer(item0);
            if (call_fit)
            {
                item0.Fit(parent);
                item0.SetSizeHints(parent);
            }
        }

        return(item0);
    }
    public HelloWorldFrame(Window parent, int id, string title)
        :
        base(parent, id, "Helloworldframe", wxDefaultPosition, wxDefaultSize, wxDEFAULT_FRAME_STYLE)
    {
        mainbutton        = new Button(this, (int)Cmd.ID_MAINBUTTON, "Press Me");
        mainbutton.Click += new EventListener(OnButtonClicked);

        text1 = new TextCtrl(this, (int)Cmd.ID_TEXT1, "");
        text2 = new TextCtrl(this, (int)Cmd.ID_TEXT2, "");
        sizer = new BoxSizer(Orientation.wxVERTICAL);
        sizer.Add(mainbutton, 1, Direction.wxALL | Stretch.wxEXPAND, 2);
        sizer.Add(text1, 1, Direction.wxALL | Stretch.wxEXPAND, 2);
        sizer.Add(text2, 1, Direction.wxALL | Stretch.wxEXPAND, 2);
        sizer.Fit(this);
        sizer.SetSizeHints(this);
        SetSizer(sizer);
        Layout();
    }
Exemplo n.º 6
0
    public static Sizer frmSplash(Window parent, bool call_fit, bool set_sizer)
    {
        BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL);

        StaticBitmap item1 = new StaticBitmap(parent, ID_STATICBITMAP, ListaBitmaps(6), Window.wxDefaultPosition, Window.wxDefaultSize);

        item0.Add(item1, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        if (set_sizer)
        {
            // parent.SetAutoLayout( true );
            parent.SetSizer(item0);
            if (call_fit)
            {
                item0.Fit(parent);
                item0.SetSizeHints(parent);
            }
        }

        return(item0);
    }
Exemplo n.º 7
0
    public static Sizer frmAlterarSenha(Window parent, bool call_fit, bool set_sizer)
    {
        BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL);

        GridSizer item1 = new GridSizer(0, 2, 0, 0);

        BoxSizer item2 = new BoxSizer(Orientation.wxVERTICAL);

        StaticText item3 = new StaticText(parent, ID_TEXT, "Login:"******"", Window.wxDefaultPosition, new Size(100, -1), 0);

        item4.Name = "edtLogin";
        item2.Add(item4, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 0);

        item1.Add(item2, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        BoxSizer item5 = new BoxSizer(Orientation.wxVERTICAL);

        StaticText item6 = new StaticText(parent, ID_TEXT, "Senha atual:", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item5.Add(item6, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5);

        TextCtrl item7 = new TextCtrl(parent, EDT_SENHAATUAL, "", Window.wxDefaultPosition, new Size(100, -1), 0);

        item7.Name = "edtSenhaAtual";
        item5.Add(item7, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 0);

        item1.Add(item5, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        BoxSizer item8 = new BoxSizer(Orientation.wxVERTICAL);

        StaticText item9 = new StaticText(parent, ID_TEXT, "Nova senha:", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item8.Add(item9, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5);

        TextCtrl item10 = new TextCtrl(parent, EDT_NOVASENHA, "", Window.wxDefaultPosition, new Size(100, -1), 0);

        item10.Name = "edtNovaSenha";
        item8.Add(item10, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0);

        item1.Add(item8, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        BoxSizer item11 = new BoxSizer(Orientation.wxVERTICAL);

        StaticText item12 = new StaticText(parent, ID_TEXT, "Confirmar senha:", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item11.Add(item12, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5);

        TextCtrl item13 = new TextCtrl(parent, EDT_CONFIRMSENHA, "", Window.wxDefaultPosition, new Size(100, -1), 0);

        item13.Name = "edtConfirmarSenha";
        item11.Add(item13, 0, Alignment.wxALIGN_CENTER_VERTICAL, 5);

        item1.Add(item11, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        item0.Add(item1, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5);

        BoxSizer item14 = new BoxSizer(Orientation.wxHORIZONTAL);

        Button item15 = new Button(parent, BTN_SALVAR, "Salvar", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item15.Name = "btnSalvar";
        item14.Add(item15, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        Button item16 = new Button(parent, BTN_LIMPAR, "Limpar", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item16.Name = "btnLimpar";
        item14.Add(item16, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        Button item17 = new Button(parent, BTN_FECHAR, "Fechar", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item17.Name = "btnFechar";
        item14.Add(item17, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        item0.Add(item14, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        if (set_sizer)
        {
            // parent.SetAutoLayout( true );
            parent.SetSizer(item0);
            if (call_fit)
            {
                item0.Fit(parent);
                item0.SetSizeHints(parent);
            }
        }

        return(item0);
    }
Exemplo n.º 8
0
    public static Sizer frmLogin(Window parent, bool call_fit, bool set_sizer)
    {
        BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL);

        BoxSizer item1 = new BoxSizer(Orientation.wxHORIZONTAL);

        StaticBitmap item2 = new StaticBitmap(parent, ID_STATICBITMAP, ListaBitmaps(5), Window.wxDefaultPosition, Window.wxDefaultSize);

        item1.Add(item2, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0);

        BoxSizer item3 = new BoxSizer(Orientation.wxVERTICAL);

        BoxSizer item4 = new BoxSizer(Orientation.wxVERTICAL);

        StaticText item5 = new StaticText(parent, LAB_LOGIN, "Login:"******"labLogin";
        item4.Add(item5, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5);

        TextCtrl item6 = new TextCtrl(parent, EDT_LOGIN, "", Window.wxDefaultPosition, new Size(80, -1), 0);

        item6.Name = "edtLogin";
        item4.Add(item6, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0);

        item3.Add(item4, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        BoxSizer item7 = new BoxSizer(Orientation.wxVERTICAL);

        StaticText item8 = new StaticText(parent, LAB_SENHA, "Senha:", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item8.Name = "labSenha";
        item7.Add(item8, 0, Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxRIGHT | Direction.wxBOTTOM, 5);

        TextCtrl item9 = new TextCtrl(parent, EDT_SENHA, "", Window.wxDefaultPosition, new Size(80, -1), TextCtrl.wxTE_PASSWORD);

        item9.Name = "edtSenha";
        item7.Add(item9, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0);

        item3.Add(item7, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        item1.Add(item3, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0);

        item0.Add(item1, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        BoxSizer item10 = new BoxSizer(Orientation.wxHORIZONTAL);

        Button item11 = new Button(parent, BTN_LOGIN, "Login", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item11.SetDefault();
        item11.Name = "btnLogin";
        item10.Add(item11, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        Button item12 = new Button(parent, BTN_CANCELAR, "Cancelar", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item12.Name = "btnCancelar";
        item10.Add(item12, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        item0.Add(item10, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        if (set_sizer)
        {
            // parent.SetAutoLayout( true );
            parent.SetSizer(item0);
            if (call_fit)
            {
                item0.Fit(parent);
                item0.SetSizeHints(parent);
            }
        }

        return(item0);
    }
Exemplo n.º 9
0
    public static Sizer frmCadAssuntos(Window parent, bool call_fit, bool set_sizer)
    {
        BoxSizer item0 = new BoxSizer(Orientation.wxVERTICAL);

        FlexGridSizer item1 = new FlexGridSizer(0, 2, 0, 0);

        item1.AddGrowableCol(0);

        FlexGridSizer item2 = new FlexGridSizer(0, 1, 0, 0);

        item2.AddGrowableRow(0);
        item2.AddGrowableRow(1);

        BoxSizer item3 = new BoxSizer(Orientation.wxVERTICAL);

        StaticText item4 = new StaticText(parent, LAB_CODIGO, "Código:", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item4.Name = "labCodigo";
        item3.Add(item4, 5, Alignment.wxALIGN_CENTER_VERTICAL, 0);

        TextCtrl item5 = new TextCtrl(parent, EDT_CODIGO, "", Window.wxDefaultPosition, new Size(80, -1), 0);

        item5.Name = "edtCodigo";
        item3.Add(item5, 0, Alignment.wxALIGN_CENTER, 0);

        item2.Add(item3, 0, Alignment.wxALIGN_CENTER_VERTICAL, 0);

        BoxSizer item6 = new BoxSizer(Orientation.wxVERTICAL);

        StaticText item7 = new StaticText(parent, LAB_DESCRICAO, "Assunto:", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item7.Name = "labDescricao";
        item6.Add(item7, 5, Alignment.wxALIGN_CENTER_VERTICAL, 0);

        TextCtrl item8 = new TextCtrl(parent, EDT_DESCRICAO, "", Window.wxDefaultPosition, new Size(200, -1), 0);

        item8.Name = "edtDescricao";
        item6.Add(item8, 0, Alignment.wxALIGN_CENTER, 0);

        item2.Add(item6, 0, Alignment.wxALIGN_CENTER, 0);

        item1.Add(item2, 0, Alignment.wxALIGN_CENTER_HORIZONTAL | Direction.wxALL, 5);

        BoxSizer item9 = new BoxSizer(Orientation.wxVERTICAL);

        Button item10 = new Button(parent, BTN_PESQUISAR, "Pesquisar", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item10.SetDefault();
        item10.Name = "btnPesquisar";
        item9.Add(item10, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0);

        Button item11 = new Button(parent, BTN_ANTERIOR, "Anterior", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item11.Name    = "btnAnterior";
        item11.Enabled = false;
        item9.Add(item11, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        Button item12 = new Button(parent, BTN_PROXIMO, "Próximo", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item12.Name    = "btnProximo";
        item12.Enabled = false;
        item9.Add(item12, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 0);

        item1.Add(item9, 0, Alignment.wxALIGN_CENTER_HORIZONTAL | Direction.wxALL, 5);

        item0.Add(item1, 0, Stretch.wxGROW | Alignment.wxALIGN_CENTER_VERTICAL, 0);

        BoxSizer item13 = new BoxSizer(Orientation.wxHORIZONTAL);

        Button item14 = new Button(parent, BTN_SALVAR, "Salvar", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item14.Name    = "btnSalvar";
        item14.Enabled = false;
        item13.Add(item14, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        Button item15 = new Button(parent, BTN_EXCLUIR, "Excluir", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item15.Name    = "btnExcluir";
        item15.Enabled = false;
        item13.Add(item15, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        Button item16 = new Button(parent, BTN_LIMPAR, "Limpar", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item16.Name = "btnLimpar";
        item13.Add(item16, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        Button item17 = new Button(parent, BTN_FECHAR, "Fechar", Window.wxDefaultPosition, Window.wxDefaultSize, 0);

        item17.Name = "btnFechar";
        item13.Add(item17, 0, Alignment.wxALIGN_CENTER | Direction.wxALL, 5);

        item0.Add(item13, 0, Alignment.wxALIGN_RIGHT | Alignment.wxALIGN_CENTER_VERTICAL | Direction.wxALL, 5);

        if (set_sizer)
        {
            // parent.SetAutoLayout( true );
            parent.SetSizer(item0);
            if (call_fit)
            {
                item0.Fit(parent);
                item0.SetSizeHints(parent);
            }
        }

        return(item0);
    }