示例#1
0
 private void OnGridCellClicked(object sender, CellClickedEventArgs e)
 {
     if (GameState == GameStates.Idle)
     {
         PregameCells[e.Cell] = !PregameCells[e.Cell];
         UpdateGameVisualization(0, PregameCells);
     }
 }
示例#2
0
        private void OnCellClicked(CellClickedEventArgs e)
        {
            EventHandler <CellClickedEventArgs> handler = CellClicked;

            if (handler != null)
            {
                handler(this, e);
            }
        }
 private void RelationGrid_CellDoubleClicked(object sender, CellClickedEventArgs e)
 {
     if (!this.CanModify) return;
     if (e.Cell.Column.Key == "QuotationSource.Name" || e.Cell.Column.Key == FieldSR.SourceSymbol)
     {
         VmInstrumentSourceRelation vmRelation = e.Cell.Row.Data as VmInstrumentSourceRelation;
         if (vmRelation != null)
         {
             InstrumentSourceRelationWindow window = new InstrumentSourceRelationWindow((VmInstrument)this.DataContext, EditMode.Modify, vmRelation);
             App.MainFrameWindow.MainFrame.Children.Add(window);
             window.IsModal = true;
             window.Show();
         }
     }
 }
        private void SettingSchedulerGrid_RowSelected(object sender, CellClickedEventArgs e)
        {
            TaskScheduler currentTaskScheduler = this._SettingSchedulerGrid.ActiveCell.Row.Data as TaskScheduler;
            this._TaskDetailGrid.DataContext = currentTaskScheduler;
            this._ParameterSettingGrid.ItemsSource = currentTaskScheduler.ParameterSettings;
            this._TaskTypeComboBox.SelectedIndex = (int)currentTaskScheduler.TaskType;
            this._ActionTypeComboBox.SelectedIndex = (int)currentTaskScheduler.ActionType;
            this.ExchangeTextBox.Text = currentTaskScheduler.ExchangeCode;
            //if (currentTaskScheduler.ExchangInstruments.Count > 0)
            //{
            //    this._InstrumentListBox.Visibility = Visibility.Visible;
            //    this.InstrumentCaption.Visibility = Visibility.Visible;

            //    this._InstrumentListBox.ItemsSource = currentTaskScheduler.ExchangInstruments;
            //}
            //else
            //{
            //    this._InstrumentListBox.Visibility = Visibility.Collapsed;
            //    this.InstrumentCaption.Visibility = Visibility.Collapsed;
            //}

            this.GetInstrumentList(currentTaskScheduler.ExchangInstruments);
        }
        private void SettingSchedulerGrid_CellDoubleClicked(object sender, CellClickedEventArgs e)
        {
            TaskScheduler currentTaskScheduler = e.Cell.Row.Data as TaskScheduler;

            this.ShowNewTaskWindow(EditMode.Modify, currentTaskScheduler);
        }
 private void RoleGrid_CellClicked(object sender, CellClickedEventArgs e)
 {
     try
     {
         string roleName = e.Cell.Value.ToString();
         RoleData role = this._roleDatas.SingleOrDefault(r => r.RoleName == roleName);
         this._SelectRole = role;
         this.RoleName.Text = this._SelectRole.RoleName;
         this.RoleName.IsReadOnly = true;
         FunctionGridData functionGrid = new FunctionGridData();
         functionGrid.CastFunctionToGridData(role.FunctionPermissions, this._AllFunctions);
         this._FunctionGridDatas = functionGrid;
         DataPermissionGridData dataPermissionGrid = new DataPermissionGridData();
         dataPermissionGrid.CastDataPermissionToGridData(role.DataPermissions, this._AllData);
         this._DataPermissionGridDatas = dataPermissionGrid;
         this.FunctionPermission.ItemsSource = this._FunctionGridDatas.CategoryDatas;
         this.FunctionPermission.EditingSettings.AllowEditing = EditingType.None;
         this.DataPermission.ItemsSource = this._DataPermissionGridDatas.IExchangeCodes;
         this.DataPermission.EditingSettings.AllowEditing = EditingType.None;
         this.Submit.Visibility = System.Windows.Visibility.Hidden;
         this.Cancel.Visibility = System.Windows.Visibility.Hidden;
     }
     catch (Exception ex)
     {
         Logger.TraceEvent(System.Diagnostics.TraceEventType.Error, "RoleManager/RoleGrid_CellClicked.\r\n{0}", ex.ToString());
     }
 }
 void _TradingSummaryGrid_CellClicked(object sender, CellClickedEventArgs e)
 {
     try
     {
        // AccountLevelItem accountLevelItem = ((AccountLevelItem)e.Cell.Row.Data);
     }
     catch
     {
     }
 }
示例#8
0
 private void cellsView_CellClicked(object sender, CellClickedEventArgs e)
 {
     r_GameLogic.PerformHumanMove(e.Line, e.Col);
 }
示例#9
0
 private void OnGridCellClicked(CellClickedEventArgs e)
 {
     GridCellClicked?.Invoke(this, e);
 }