public ChequePage()
 {
     HackyCommunicationClass.RegisterChequePage(this);
     InitializeComponent();
     RedrawItems();
     initialized = true;
     Loaded     += MyWindow_Loaded;
 }
Exemple #2
0
 public MainWindow()
 {
     InitializeComponent();
     ItemDefinitionController.CreateSerialization();
     ItemDefinitionController.InitializeItemDefinitions();
     CurrentUri = MenuCategories;
     TheFrame.NavigationService.Navigate(CurrentUri);
     CurrentButton = MenuButton;
     Global.Main   = this;
     HackyCommunicationClass.registerMainWindow(this);
 }
 public MenuPage()
 {
     InitializeComponent();
     HackyCommunicationClass.registerMenuPage(this);
     ScrollTo(ScrollPosition);
     HideNewItemFlyout();
     UpdateItemFlyout();
     if (false)
     {
         ScrollDebugger sd = new ScrollDebugger(this);
         sd.Show();
     }
 }
Exemple #4
0
        public BillSplitter()
        {
            InitializeComponent();

            HackyCommunicationClass.RegisterBillSplitter(this);
            recalculateBillSplitterTotals();

            Circle currentUserCircle = new Circle("currentUserId", new SolidColorBrush(Colors.Blue), "Me");
            Circle otherUserCircle   = new Circle("otherUserId", new SolidColorBrush(Colors.Red), "TG");
            Circle otherUser2Circle  = new Circle("otherUserId2", new SolidColorBrush(Colors.Green), "CD");

            CircleDock.Children.Insert(0, new Circle(currentUserCircle));
            CircleDock.Children.Insert(1, otherUserCircle);
            CircleDock.Children.Insert(2, otherUser2Circle);

            billSplitterComponent.Children.Clear();


            if (ChequePage.confirmedItems.Count() > 0)
            {
                foreach (Tuple <OrderedItem, List <string> > tuple in ChequePage.confirmedItems)
                {
                    billSplitterItemControl control = new billSplitterItemControl(tuple);
                    control.ItemName.Text  = tuple.Item1.itemDefinition.name;
                    control.ItemPrice.Text = "$" + (tuple.Item1.EffectiveCost() / 100.0).ToString("F");

                    if (tuple.Item2.Contains("currentUserId"))
                    {
                        control.DropArea.Children.Add(new Circle(currentUserCircle));
                    }
                    if (tuple.Item2.Contains("otherUserId"))
                    {
                        control.DropArea.Children.Add(new Circle(otherUserCircle));
                    }
                    if (tuple.Item2.Contains("otherUserId2"))
                    {
                        control.DropArea.Children.Add(new Circle(otherUser2Circle));
                    }

                    billSplitterComponent.Children.Add(control);
                }
            }
        }
        public CategoriesPage()
        {
            InitializeComponent();

            HackyCommunicationClass.registerCategoriesPage(this);
        }