コード例 #1
0
        public void Add(int uid, TreeviewManager ViewManager)
        {
            Cupboard cupboard = new Cupboard(uid);

            ViewManager.AddViewCupboard(uid, cupboard);
            CupboardList.Add(cupboard);
        }
コード例 #2
0
ファイル: ViewBox.cs プロジェクト: QuentinSoffie/kitbox
 public ViewBox(int uidCupboard, int uid, Box box, TreeviewManager treeView)
 {
     InitializeComponent();
     this.Uid          = uid;
     this.Box          = box;
     this.MainTreeView = treeView;
     this.UidCupboard  = uidCupboard;
     LoadGUI();
 }
コード例 #3
0
ファイル: ViewCupboard.cs プロジェクト: QuentinSoffie/kitbox
 public ViewCupboard(int uid, Cupboard cupboard, MySqlConnection dataBase, TreeviewManager treeView)
 {
     InitializeComponent();
     this.Uid      = uid;
     this.Cupboard = cupboard;
     MainTreeView  = treeView;
     DataBase      = dataBase;
     pepCombobox6.SelectedIndex = 0;
     LoadGUI();
 }
コード例 #4
0
 public Customer(MySqlConnection _database, Authentication _authentification, string _username, string _password)
 {
     InitializeComponent();
     OurOrder         = new Kitbox.Order.Order();
     MainTreeview     = new TreeviewManager(pepTreeView1, splitContainer1.Panel2.Controls, OurOrder);
     DataBase         = _database;
     Authentification = _authentification;
     Username         = _username;
     Password         = _password;
     Kitbox.Database.Reader.InitializeComponents(DataBase);
     toolStripStatusLabel1.Text = "Welcome " + Username;
 }
コード例 #5
0
ファイル: ExplodeView.cs プロジェクト: yuan505/Explode
        public ExplodeView(IGlobal global)
        {
            m_Global = global;
            //Pass m_Global to DebugMethod class so it can print to the listener
            DebugMethods.SetGlobal(m_Global);

            //Create UI elements:
            m_MaxForm = new MaxFormEx
            {
                Size            = new Size(302, 500),
                Text            = "Explode",
                BackColor       = Color.FromArgb(68, 68, 68),
                FormBorderStyle = FormBorderStyle.None
            };

            var treeviewManager = new TreeviewManager();

            //Create Controller
            m_Controller = new Controller(this, treeviewManager);

            //give treeview a controller
            treeviewManager.Controller = m_Controller;

            //Hook up event
            m_Controller.ExplodeChanged   += m_Controller_ExplodeChanged;
            m_Controller.DebugTextChanged += m_Controller_DebugTextChanged;

            //Create UI
            m_HelpPanel = new HelpPanel
            {
                Location = new Point(1, 306),
            };

            var addButton = new ButtonLabel
            {
                Size              = new Size(125, 25),
                Location          = new Point(10, 327),
                BackColor         = Color.FromArgb(90, 90, 90),
                ForeColor         = Color.FromArgb(220, 220, 220),
                Text              = "Add LP",
                TextAlign         = ContentAlignment.MiddleCenter,
                MouseDownProperty = false
            };

            addButton.MouseUp += addButton_MouseUp;

            var addHPButton = new ButtonLabel
            {
                Size              = new Size(125, 25),
                Location          = new Point(151, 327),
                BackColor         = Color.FromArgb(90, 90, 90),
                ForeColor         = Color.FromArgb(220, 220, 220),
                Text              = "Add HP",
                TextAlign         = ContentAlignment.MiddleCenter,
                MouseDownProperty = false
            };

            addHPButton.MouseUp += addHPButton_MouseUp;

            var explodeButton = new ButtonLabel
            {
                Size              = new Size(125, 25),
                Location          = new Point(10, 377),
                BackColor         = Color.FromArgb(90, 90, 90),
                ForeColor         = Color.FromArgb(220, 220, 220),
                Text              = "Explode",
                TextAlign         = ContentAlignment.MiddleCenter,
                MouseDownProperty = false
            };

            explodeButton.MouseUp += explodeButton_MouseUp;

            var exportButton = new ButtonLabel
            {
                Size              = new Size(125, 25),
                Location          = new Point(151, 377),
                BackColor         = Color.FromArgb(90, 90, 90),
                ForeColor         = Color.FromArgb(220, 220, 220),
                Text              = "Export",
                TextAlign         = ContentAlignment.MiddleCenter,
                MouseDownProperty = false
            };

            exportButton.MouseUp += exportButton_MouseUp;

            m_ExplodeAndExportButton = new ButtonLabel
            {
                Size              = new Size(266, 25),
                Location          = new Point(10, 409),
                BackColor         = Color.FromArgb(90, 90, 90),
                ForeColor         = Color.FromArgb(220, 220, 220),
                Text              = "Explode & Export",
                TextAlign         = ContentAlignment.MiddleCenter,
                MouseDownProperty = false
            };
            m_ExplodeAndExportButton.MouseUp += explodeAndExportButton_MouseUp;

            //Add Controls
            m_MaxForm.Controls.Add(treeviewManager);
            m_MaxForm.Controls.Add(m_HelpPanel);
            m_MaxForm.Controls.Add(addButton);
            m_MaxForm.Controls.Add(addHPButton);
            m_MaxForm.Controls.Add(explodeButton);
            m_MaxForm.Controls.Add(exportButton);
            m_MaxForm.Controls.Add(m_ExplodeAndExportButton);

            //Show form
            IntPtr maxHandle = global.COREInterface.MAXHWnd;

            m_MaxForm.Show(new ArbitraryWindow(maxHandle));


#if DEBUG
            Form debugForm = new Form();
            debugForm.Size = new Size(300, 300);
            debugForm.Show(new ArbitraryWindow(maxHandle));
            debugForm.Closing += debugForm_Closing;

            Button button = new Button();
            button.Size     = new Size(200, 25);
            button.Location = new Point(10, 10);
            button.Text     = "Create BB for Parent Node";
            button.Click   += button_Click;

            Button movebutton = new Button();
            movebutton.Size     = new Size(200, 25);
            movebutton.Location = new Point(10, 90);
            movebutton.Text     = "movesomething";
            movebutton.Click   += movebutton_Click;

            Button getVertInfoFromID = new Button();
            getVertInfoFromID.Size     = new Size(200, 25);
            getVertInfoFromID.Location = new Point(10, 50);
            getVertInfoFromID.Text     = "Close";
            getVertInfoFromID.Click   += getVertInfoFromID_Click;

            debugForm.Controls.Add(button);
            debugForm.Controls.Add(getVertInfoFromID);
            debugForm.Controls.Add(movebutton);
#endif
        }
コード例 #6
0
        public Box AddBox(int uidCupboard, int uid, Door door, Slider slider, List <Panel> panels, List <Traverse> traverses, Cups cups, string state, TreeviewManager viewManager)
        {
            Box newBox = new Box(uid, door, slider, panels, traverses, cups);

            newBox.State = state;
            viewManager.AddViewBox(uidCupboard, uid, newBox);
            ListeBoxes.Add(newBox);
            return(newBox);
        }