Beispiel #1
0
        private void AddInstrumentManuallyBtn_ItemClick(object sender, RoutedEventArgs routedEventArgs)
        {
            var window = new AddInstrumentManuallyWindow();

            window.ShowDialog();
            if (window.InstrumentAdded)
            {
                Instruments.Add(window.TheInstrument);
            }
            window.Close();
        }
Beispiel #2
0
        //show a window to modify the selected instrument
        private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs)
        {
            var inst   = (Instrument)InstrumentsGrid.SelectedItem;
            var window = new AddInstrumentManuallyWindow(inst, false);

            window.ShowDialog();

            CollectionViewSource.GetDefaultView(InstrumentsGrid.ItemsSource).Refresh();

            window.Close();
        }
Beispiel #3
0
        //show the window to add a new custom futures contract
        private void BtnAddCustomFutures_ItemClick(object sender, RoutedEventArgs routedEventArgs)
        {
            var window = new AddInstrumentManuallyWindow(addingContFut: true);

            window.ShowDialog();
            if (window.InstrumentAdded)
            {
                Instruments.Add(window.TheInstrument);
            }
            window.Close();
        }
Beispiel #4
0
        //show the window to add a new custom futures contract
        private void BtnAddCustomFutures_ItemClick(object sender, RoutedEventArgs routedEventArgs)
        {
            var window = new AddInstrumentManuallyWindow(_client, addingContFut: true);

            window.ShowDialog();
            if (window.ViewModel.AddedInstrument != null)
            {
                ViewModel.Instruments.Add(window.ViewModel.AddedInstrument);
            }
            window.Close();
        }
Beispiel #5
0
        //clone an instrument
        private void InstrumentContextCloneBtn_ItemClick(object sender, RoutedEventArgs routedEventArgs)
        {
            var inst   = (Instrument)InstrumentsGrid.SelectedItem;
            var window = new AddInstrumentManuallyWindow(inst);

            window.ShowDialog();
            if (window.InstrumentAdded)
            {
                Instruments.Add(window.TheInstrument);
            }
            window.Close();
        }
Beispiel #6
0
        //show a window to modify the selected instrument
        private void TableView_RowDoubleClick(object sender, MouseButtonEventArgs mouseButtonEventArgs)
        {
            var inst = (Instrument)InstrumentsGrid.SelectedItem;
            var window = new AddInstrumentManuallyWindow(inst, false);
            window.ShowDialog();

            CollectionViewSource.GetDefaultView(InstrumentsGrid.ItemsSource).Refresh();

            window.Close();
        }
Beispiel #7
0
 //clone an instrument
 private void InstrumentContextCloneBtn_ItemClick(object sender, RoutedEventArgs routedEventArgs)
 {
     var inst = (Instrument)InstrumentsGrid.SelectedItem;
     var window = new AddInstrumentManuallyWindow(inst);
     window.ShowDialog();
     if (window.InstrumentAdded)
     {
         Instruments.Add(window.TheInstrument);
     }
     window.Close();
 }
Beispiel #8
0
 private void AddInstrumentManuallyBtn_ItemClick(object sender, RoutedEventArgs routedEventArgs)
 {
     var window = new AddInstrumentManuallyWindow();
     window.ShowDialog();
     if (window.InstrumentAdded)
     {
         Instruments.Add(window.TheInstrument);
     }
     window.Close();
 }
Beispiel #9
0
 //show the window to add a new custom futures contract
 private void BtnAddCustomFutures_ItemClick(object sender, RoutedEventArgs routedEventArgs)
 {
     var window = new AddInstrumentManuallyWindow(addingContFut: true);
     window.ShowDialog();
     if (window.InstrumentAdded)
     {
         Instruments.Add(window.TheInstrument);
     }
     window.Close();
 }