示例#1
0
 //Instantiate the order gui
 public OrderView(Stock stock_list, StockControl stock_control, StockApp stock_app)
     : base(Gtk.WindowType.Toplevel)
 {
     this.Build ();
     this.stock_list = stock_list;
     this.stock_app = stock_app;
     order = stock_control;
 }
示例#2
0
 //Constructor, invokes code to create tree view
 public StockApp(Stock stock_list)
     : base(Gtk.WindowType.Toplevel)
 {
     this.Build ();
     app = this;
     this.stock_list = stock_list;
     stock_control = new StockControl (stock_list);
     CreateTree ();
 }
示例#3
0
文件: Main.cs 项目: geekscruff/m3app1
        public static void Main(string[] args)
        {
            Application.Init ();

            //create stock list and  stock application
            Stock stock_list  = new Stock();
            StockApp stock_app = new StockApp (stock_list);
            stock_app.Show ();

            Application.Run ();
        }
示例#4
0
 //Build stock view; flags are used to determine which button (add / update) is shown
 public StockView(Stock stock_list, StockApp app, int i)
     : base(Gtk.WindowType.Toplevel)
 {
     this.Build ();
     this.stock_list = stock_list;
     this.app = app;
     this.flag = i;
     if (flag == 1) {
         togglebutton3.Label = "Add";
         togglebutton3.Clicked += new System.EventHandler (this.OnAddEvent);
         button1.Clicked += new System.EventHandler (this.OnCancelEvent);
     } else if (flag == 2) {
         togglebutton3.Label = "Update";
         togglebutton3.Clicked += new System.EventHandler (this.OnEditEvent);
         button1.Clicked += new System.EventHandler (this.OnCancelEvent);
     }
 }
示例#5
0
 public StockControl(Stock stock_list)
 {
     this.stock_list = stock_list;
     order_history = new OrderHistory ();
 }