Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();
            keyAction = new KeyActionClass("keyconfig.txt", actionList);

            configWindow = new Window1(this, keyAction);
            keyAction = configWindow.keyAction;
            rand = new Random(DateTime.Now.Millisecond);
        }
Esempio n. 2
0
 public Window2(Window1 w, MainWindow mw)
 {
     callWindow = w;
     playWindow = mw;
     InitializeComponent();
     refresh();
     dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
     dispatcherTimer.Tick += new EventHandler(timerTick);
     dispatcherTimer.Interval = new TimeSpan(0, 0, 1);   // 1second
     dispatcherTimer.Start();
 }
Esempio n. 3
0
 public Window3(Window1 w, MainWindow mw)
 {
     callWindow = w;
     playWindow = mw;
     InitializeComponent();
     foreach(String act in playWindow.actionList)
     {
         StackPanel sp = new StackPanel();
         sp.Orientation = Orientation.Horizontal;
         Label lbl = new Label();
         lbl.Content = act;
         lbl.Width = actionLbl.Width;
         sp.Children.Add(lbl);
         ComboBox cb = new ComboBox();
         cb.Width = keyLbl.Width;
         cb.SelectionChanged += actionKeyChanged;
         loadKeyItems(cb);
         setSelected(cb,act);
         sp.Children.Add(cb);
         keyStackPanel.Children.Add(sp);
     }
     fixSource = true;
 }