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