Example #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();
        }
Example #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();
        }
Example #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();
        }
Example #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();
        }
Example #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();
        }
Example #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();
        }
Example #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();
 }
Example #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();
 }
Example #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();
 }